Repository navigation
chroot to rootPrefix - #26
Conversation
|
/cc @sdemos if this looks like a good location for |
sdemos
left a comment
There was a problem hiding this comment.
overall looks good to me, just a couple of questions.
There was a problem hiding this comment.
It's fine if this never actually gets cleaned up right? The daemon calls reboot and then sleeps for 7 days, so it pretty much never exits cleanly.
There was a problem hiding this comment.
I believe it would be fine.
There was a problem hiding this comment.
Will this syscall fail if the prefix doesn't exist? If it does, will the error message be helpful? If not, it might be worth checking existence first and then printing a pretty error message.
Alternatively, we control the daemonset definition so maybe this isn't worth doing.
There was a problem hiding this comment.
You make a good point. We do control the daemonset def but it would still be helpful to provide a better error message.
There was a problem hiding this comment.
Updated with a check and two different error messages depending upon the failure.
|
Rebased. @sdemos removed the |
|
/hold cancel |
|
this all looks good to me. another thing we should consider doing after this is removing most of the volume mounts in the manifest. it seems like we don't have to mount in anything but the rootfs if we are just chrooting into it immediately since all the stuff we were mounting is presumably in the rootfs anyway. we don't have to do that here though, we can clean it up in a future pr. on a process note, do I just do |
🎉
Agreed. Though some may still be needed for the MCD to start before it chroots. We can figure that out later 😄.
Using the |
|
/lgtm |
|
@sdemos: changing LGTM is restricted to assignees, and only openshift/machine-config-operator repo collaborators may be assigned issues. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
|
/assign @sdemos |
|
@sdemos: GitHub didn't allow me to assign the following users: sdemos. Note that only openshift members and repo collaborators can be assigned. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
|
/cc @sdemos |
|
@sdemos: GitHub didn't allow me to request PR reviews from the following users: sdemos. Note that only openshift members and repo collaborators can review this PR, and authors cannot review their own PRs. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
|
/cc @sdemos |
There was a problem hiding this comment.
You also need to chdir after chroot, otherwise your working directory could be outside of your chroot.
There was a problem hiding this comment.
What is this supposed to do? I fear that . could be pretty much anything when this defer fires, depending on what intermediate code does in-between.
There was a problem hiding this comment.
Thinking a bit more about this, I fear that these defers here will actually never fire, as this function fatal-exits on errors.
There was a problem hiding this comment.
I think I'm going to remove the defers as they will never be called anyway. As @sdemos pointed out earlier, the MCD doesn't really exit cleanly. It runs forever unless it's more or less killed.
|
Thanks @lucab, will update. |
Signed-off-by: Steve Milner <[email protected]>
rootPrefix has been renamed to rootMount and now is used as the location to chroot. File operations no longer require joining a global prefix due to the MCD running within the chroot. Signed-off-by: Steve Milner <[email protected]>
|
@sdemos PTAL |
|
/lgtm sorry for the delay. |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ashcrow, sdemos The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
bump recent openshift/library xpaas content
chroot to rootPrefix
Prereq for #17