-
-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
openshift: 1.5.0 -> 3.6.0 #28345
openshift: 1.5.0 -> 3.6.0 #28345
Conversation
- Updated from 1.5.0 to 3.6.0 (this is just the next version, but Red Hat did quite the version bump there) - Added 'v' to the version; it is used by `oc cluster up` to determine which image should be downloaded. - Added myself as a maintainer.
@moretea, thanks for your PR! By analyzing the history of the files in this pull request, we identified @bachp, @offlinehacker and @Mic92 to be potential reviewers. |
The command `oc cluster up` mainly runs code though Docker containers. However, in pkg/bootstrap/docker/host/host.go, nsenter is used to run some commands on the host. For this to work on NixOS, we need to provide the absolute path to the required programs.
@offlinehacker @bachp could you take a look? |
Changes look good to me. I never tried |
|
||
substituteInPlace pkg/bootstrap/docker/host/host.go \ | ||
--replace 'nsenter --mount=/rootfs/proc/1/ns/mnt mkdir' \ | ||
'nsenter --mount=/rootfs/proc/1/ns/mnt ${coreutils}/bin/mount' |
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.
mount is in util-linux only
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.
Yes, thanks.
}; | ||
|
||
buildInputs = [ which ]; | ||
|
||
goPackagePath = null; | ||
patchPhase = '' | ||
patchShebangs ./hack | ||
substituteInPlace pkg/bootstrap/docker/host/host.go \ | ||
--replace 'nsenter --mount=/rootfs/proc/1/ns/mnt findmnt' \ | ||
'nsenter --mount=/rootfs/proc/1/ns/mnt ${utillinux}/bin/findmnt' |
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.
Please also make replace nsenter
with ${utillinux}/bin/nsenter
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.
That will break stuff! These nsenter
's are run from within the openshift container. It enters the namespace of the host of the container, and then executes e.g. findmt, mount & mkdir in there.
I think that solves all of the issues. |
I only tested the |
It was broken before right? So maybe I should backport it to stable? |
@Mic92 The command line part, which is the only part I used so far was always working. At least I never had issues. On the other hand having 3.6.0 in stable would also be good :) |
Unfortunately,oc cluster up
still does not work after this update (but neither did it work on 1.5.0)oc cluster up
to determine which image should be downloaded.Things done
(nix.useSandbox on NixOS,
or option
build-use-sandbox
innix.conf
on non-NixOS)
./result/bin/
)