Skip to content

Fix dependency on chroot #543

Closed
Closed

Description

@cgwalters

Today the way the MCD chroot into the host creates all sort of problems. I believe this was done for a few reasons:

  • We can speak DBus to e.g. systemd/rpm-ostree
  • When processing Ignition we don't have to deal with the rootfs prefix

And over time we've had to add hacks like #370 to pick up things from the Kube side.

Dealing with DBus is easy, we can just bind mount /run/dbus/system-bus-socket into our code.

The filesystem bits are hard mainly because of symlinks. See e.g. AT_NO_JUMPS patches and rpm-ostree os-release change.

I think for the filesystem stuff...basically we need to split the MCD into two containers (in the same pod); the "kube mcd" and the "host mgmt MCD". Only the latter "hostmgmt" MCD would be chrooted.

Or...actually perhaps even easier, have a single MCD that execs the child process chrooted. The child process gets passed the Ignition configs as temporary files.

In fact it's almost like we exec in once-from mode.

Activity

  1. cgwalters commented on Mar 12, 2019

    @cgwalters
    MemberAuthor

    One thing that might actually help us a lot architecturally too is to also have the "once-from" code (basically Ignition handling) also be built into an RPM that goes into the host. And then when we want to run it rather than using chroot we actually systemd-run it just like we do for rpm-ostree.

  2. added
    kind/bug
    on Mar 12, 2019
  3. ashcrow commented on Mar 12, 2019

    @ashcrow
    Member

    👍 to coreos/rpm-ostree@e94f8c9 ... though we will need to build that package and get it into composes for it to be used.

    Or...actually perhaps even easier, have a single MCD that execs the child process chrooted. The child process gets passed the Ignition configs as temporary files.
    In fact it's almost like we exec in once-from mode.

    I like this path.

  4. cgwalters commented on Mar 12, 2019

    @cgwalters
    MemberAuthor

    I just did #545
    which I think simplifies the code and will help avoid the immediate crasher.

    Basically, while I think going down the exec path is a good idea it's fairly risky/involved at the moment.
    Dropping our dependency on everything using cgo should get us unblocked.

  5. jlebon commented on Mar 12, 2019

    @jlebon
    Member

    Previous discussions on this subject in #45. Definitely agree overall we should only be chroot'ing for the parts we really have to.

    I just did #545
    which I think simplifies the code and will help avoid the immediate crasher

    What's the crasher BTW?

  6. cgwalters commented on Mar 12, 2019

    @cgwalters
    MemberAuthor

    What's the crasher BTW?

    0311 21:46:03.865051    2971 daemon.go:446] Fatal error checking initial state of node: Checking initial state: error detecting early SSH accesses: unable to open a handle to the library
    
  7. 3 remaining items

  8. cgwalters commented on Mar 18, 2019

    @cgwalters
    MemberAuthor

    Leaving this issue open; #545 merged which solves our immediate problem, but we should still do this at some point to avoid hacks like #370

  9. openshift-bot commented on Sep 4, 2020

    @openshift-bot
    Contributor

    Issues go stale after 90d of inactivity.

    Mark the issue as fresh by commenting /remove-lifecycle stale.
    Stale issues rot after an additional 30d of inactivity and eventually close.
    Exclude this issue from closing by commenting /lifecycle frozen.

    If this issue is safe to close now please do so with /close.

    /lifecycle stale

  10. added
    lifecycle/stale
    on Sep 4, 2020
  11. openshift-bot commented on Oct 4, 2020

    @openshift-bot
    Contributor

    Stale issues rot after 30d of inactivity.

    Mark the issue as fresh by commenting /remove-lifecycle rotten.
    Rotten issues close after an additional 30d of inactivity.
    Exclude this issue from closing by commenting /lifecycle frozen.

    If this issue is safe to close now please do so with /close.

    /lifecycle rotten
    /remove-lifecycle stale

  12. added
    lifecycle/rotten
    and removed
    lifecycle/stale
    on Oct 4, 2020
  13. openshift-bot commented on Nov 3, 2020

    @openshift-bot
    Contributor

    Rotten issues close after 30d of inactivity.

    Reopen the issue by commenting /reopen.
    Mark the issue as fresh by commenting /remove-lifecycle rotten.
    Exclude this issue from closing again by commenting /lifecycle frozen.

    /close

  14. openshift-ci-robot commented on Nov 3, 2020

    @openshift-ci-robot
    Contributor

    @openshift-bot: Closing this issue.

    Details

    In response to this:

    Rotten issues close after 30d of inactivity.

    Reopen the issue by commenting /reopen.
    Mark the issue as fresh by commenting /remove-lifecycle rotten.
    Exclude this issue from closing again by commenting /lifecycle frozen.

    /close

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/buglifecycle/rotten

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions