-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Environment variable LOGNAME or USER does not correspond to effective user id #130
Comments
Opened ticket upstream, but we could be defensive with a slightly tighter regex. |
Hi there @tompscanlan this is not a bug in the plugin, as the returned version from Are you invoking the script via a crontab? If you are invoking Packer from a crontab, specify a username or set the user to $LOGNAME via |
I forget details now, but invocation was not via crontab, but was indirect like Makefile -> scriptA.sh -> scriptB.sh which may have switched users. The real issue is upstream I believe, My ask here is to improve the error message. I dug for a bit and could have saved time with a better error. If it doesn't make sense to change, then no worries, just close. |
Hi, 2024/10/18 16:27:59 Starting build run: virtualbox-iso.AlmaLinux
2024/10/18 16:27:59 Running builder: virtualbox-iso
2024/10/18 16:27:59 [INFO] (telemetry) Starting builder virtualbox-iso.AlmaLinux
2024/10/18 16:27:59 packer-plugin-virtualbox_v1.1.1_x5.0_linux_amd64 plugin: 2024/10/18 16:27:59 VBoxManage path: /usr/bin/VBoxManage
2024/10/18 16:28:00 packer-plugin-virtualbox_v1.1.1_x5.0_linux_amd64 plugin: 2024/10/18 16:28:00 VBoxManage --version output: WARNING: Environment variable LOGNAME or USER does not correspond to effective user id.
2024/10/18 16:28:00 packer-plugin-virtualbox_v1.1.1_x5.0_linux_amd64 plugin: 7.1.0_rpmfusionr164728
2024/10/18 16:28:00 [INFO] (telemetry) ending virtualbox-iso.AlmaLinux
7.1.0_rpmfusionr164728
==> Wait completed after 82 milliseconds 839 microseconds
2024/10/18 16:28:00 machine readable: error-count []string{"1"}
==> Some builds didn't complete successfully and had errors:
2024/10/18 16:28:00 machine readable: virtualbox-iso.AlmaLinux,error []string{"Error reading version for guest additions download: No version found: WARNING: Environment variable LOGNAME or USER does not correspond to effective user id.\n7.1.0_rpmfusionr164728"}
7.1.0_rpmfusionr164728
==> Builds finished but no artifacts were created.
2024/10/18 16:28:00 [INFO] (telemetry) Finalizing.
2024-10-18T16:28:00Z: Build 'virtualbox-iso.AlmaLinux' errored after 82 milliseconds 745 microseconds: Error reading version for guest additions download: No version found: WARNING: Environment variable LOGNAME or USER does not correspond to effective user id.
7.1.0_rpmfusionr164728
==> Wait completed after 82 milliseconds 839 microseconds
==> Some builds didn't complete successfully and had errors:
--> virtualbox-iso.AlmaLinux: Error reading version for guest additions download: No version found: WARNING: Environment variable LOGNAME or USER does not correspond to effective user id.
7.1.0_rpmfusionr164728 On the host side everything's as expected: [user@localhost]$ vboxmanage --version
7.1.0_rpmfusionr164728 |
The message is this
|
Overview of the Issue
Running packer on a host indirectly. I'm seeing a warning that looks like it is causing a parsing error. when doing a
VBoxManage --version
.This is the error:
Reproduction Steps
I'm only able reproduce using this indirect call to packer through another tool. Error seems to be here:
packer-plugin-virtualbox/builder/virtualbox/common/driver_4_2.go
Line 321 in 54c5a24
Plugin and Packer version
Packer v1.10.2
Simplified Packer Buildfile
If the file is longer than a few dozen lines, please include the URL to the
gist of the log or use the Github detailed
format
instead of posting it directly in the issue.
Operating system and Environment details
Happens on Ubuntu and Rocky Linux.
Log Fragments and crash.log files
The text was updated successfully, but these errors were encountered: