-
Notifications
You must be signed in to change notification settings - Fork 120
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
Re-add "Change the generated image to bci-busybox:15.6
(#252)" with additional fixes
#311
Conversation
bci-busybox:15.6
(#252)" bci-busybox:15.6
(#252)" with extra fixes
bci-busybox:15.6
(#252)" with extra fixesbci-busybox:15.6
(#252)" with additional fixes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few optional changes, otherwise LGTM.
e7fe924
to
095d683
Compare
Hi @pjbgf, I tested your suggested change but encountered the same issue that the PR aims to address. It turns out that while |
@jiaqiluo Just wanted to confirm before you merge, the issues we noticed around not being able to provision are no longer seen, correct? I see that you tested with Linode, could you also confirm that CI works if you run a |
Hi @jakefhyde, could you explain how the rancher-machine is being used in the provisioning test suites? To perform the tests you suggested, do I need to build a rancher-machine Docker image from this PR and use it in rancher/rancher? |
Yes exactly. Rancher CI uses whatever version of machine is configured in dapper, which is currently v0.15.0-rancher122. I would build a machine image, and then test with that, pointing dapper to use your version and run |
Using a custom Docker image built from this PR branch in |
rancher/rancher#46100
This PR includes:
bci-busybox:15.6
#252More information about the node-driver-downloading issue:
When provisioning an RKE2/K3s node-driver cluster in Rancher, Rancher deploys a Job that runs the
rancher-machine
container. This container first downloads the external node driver, then invokes therancher-machine
binary to create the VM in the cloud (code). The container runs with a security context configured asrunAsUser: 1000
andrunAsGroup: 1000
. In the original PR, the Job fails to move the downloaded node driver to /usr/local/bin/ due to a permissions issue.The fix for this issue involves changing the ownership of
/usr/local/bin
to themachine
user (UID 1000). This allows the running container to move the node driver to/usr/local/bin
while being unable to modify any existing binaries which are owned byroot
. Additionally, the security context set on the container ensures that the process runs as a non-root user.Dev validate
We can use
-e CATTLE_MACHINE_PROVISION_IMAGE=$IMAGE
in thedocker run
command to override therancher-machine
image used by the v1 provisioning framework.The Docker image built from this PR was tested in Rancher by provisioning a node-driver Linode K3s cluster, and the cluster was successfully provisioned.
Below are the pod logs: