-
Notifications
You must be signed in to change notification settings - Fork 117
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
melange test does not connect to qemu runner #1732
Comments
stevebeattie
added a commit
to stevebeattie/melange
that referenced
this issue
Jan 13, 2025
The Test pipeline environment does not get a build user included by default; this causes test pipelines to fail when the qemu runner is used because the initial connection attempt to get the host public key always uses the build user to connect. Fix this by adding the build user to all Test environments, both the primary pipeline and any subpipelines. Fixes: chainguard-dev#1732 Signed-off-by: Steve Beattie <[email protected]>
I have a WIP fix for this in main...stevebeattie:melange:add-build-user-to-test-environments but I need to fix up the test_test.go tests to expect the added user, and also I'm not entirely sure this is the right approach to fix this. |
4 tasks
stevebeattie
added a commit
to stevebeattie/melange
that referenced
this issue
Jan 14, 2025
The Test pipeline environment does not get a build user included by default; this causes test pipelines to fail when the qemu runner is used because the initial connection attempt to get the host public key always uses the build user to connect. Fix this by adding the build user to all Test environments, both the primary pipeline and any subpipelines. Fixes: chainguard-dev#1732 Signed-off-by: Steve Beattie <[email protected]>
1 task
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Attempting to run
melange test
fails to make its initial connection to the qemu guest like so, whereasmelange build
will succeed with the qemu runner:Note that, when attempting to reproduce, the
make test/PKG
target inwolfi-dev/os/Makefile
does nothonor the
$MELANGE_OPTS
environment variable as emitted bymake fetch-kernel
; in order to run the test target with the qemu runner,MELANGE_EXTRA_OPTS="--runner qemu"
must be set.This failure is due to the
build
user not being created within the guest via the apko, unlike what happens during a build. Qhen the qemu runner tries to capture the ssh host public key from the guest, it tries to connect as thebuild
user atmelange/pkg/container/qemu_runner.go
Lines 656 to 667 in fe10319
Manually editing the above to set
User: "root",
cause the connection to be made and the tests to run.One can see the difference in the apko configuration emitted by melange as part of the build and test output.
melange build for nano:
melange test for nano:
There is a larger, overarching issue that what user is used in the build environment is inconsistent between the different build environments; qemu runner runs the build as
root
whereas docker runs it asbuild
.The text was updated successfully, but these errors were encountered: