Skip to content

lxc: systemd containers cant be seeded #23847

Closed

Description

@kiorky

I suspect systemd-tmpfiles to cleanup the /tmp/* before the attached bootstrap script has a change to apply them system wide.

this is with one of our custom images which can have a slow startup, and so the systemd-tmpfiles is done a bit late.

cc @terminalmage

Im looking if there is a generic way to handle this.

Activity

  1. kiorky commented on May 18, 2015

    @kiorky
    ContributorAuthor

    yep, at least the symptom is confirmed, if i replace ExecStart=system-tmpfiles.* by ExecStart=/bin/true inside the systemd-tmpfiles-setup.service unit, the seed files are not removed, we need a poller before the copy_to calls, to try to ensure that the container is running, when using systemd :/

  2. kiorky commented on May 18, 2015

    @kiorky
    ContributorAuthor

    i mean by running, that systemd is not in the 'starting' state.

  3. kiorky commented on May 18, 2015

    @kiorky
    ContributorAuthor
    Table 2. Manager Operational States
    Name    Description
    initializing: Early bootup, before basic.target is reached or the maintenance state entered.
    
    starting: Late bootup, before the job queue becomes idle for the first time, or one of the rescue targets are reached.
    
    running: The system is fully operational.
    
    degraded: The system is operational but one or more units failed.
    
    maintenance: The rescue or emergency target is active.
    
    stopping: The manager is shutting down.
    
  4. kiorky commented on May 18, 2015

    @kiorky
    ContributorAuthor

    so we need if systemd is detected to temper execution until we are not in starting, initalizing, this protected via a decent 300s default timeout.

    Im implementing that

    cc @terminalmage @thatch45

  5. kiorky commented on May 18, 2015

    @kiorky
    ContributorAuthor

    (At least if 300s has arrised, so the system has a problem, there is a great chance that the tmp unit is already started and we can proceed on.)

  6. kiorky commented on May 18, 2015

    @kiorky
    ContributorAuthor
  7. kiorky commented on May 19, 2015

    @kiorky
    ContributorAuthor
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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions