Skip to content
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

Missing folder on restart in release 13.5.0 #368

Open
poquirion opened this issue Jul 3, 2024 · 4 comments
Open

Missing folder on restart in release 13.5.0 #368

poquirion opened this issue Jul 3, 2024 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@poquirion
Copy link
Contributor

poquirion commented Jul 3, 2024

/var/run/munge/ and /var/lock/subsys/ where missing after a soft restart was triggerd from the openstack interfce, preventing iptables.service and munge.service to restart properly.

@cmd-ntrf cmd-ntrf self-assigned this Jul 4, 2024
@cmd-ntrf cmd-ntrf added the bug Something isn't working label Jul 4, 2024
@cmd-ntrf cmd-ntrf transferred this issue from ComputeCanada/magic_castle Jul 4, 2024
@poquirion
Copy link
Contributor Author

poquirion commented Jul 10, 2024

I have restarted two machines today and on one of them all was good and on the other one, /var/lock/subsys/ was missing but /var/run/munge/ was there. It really looks like a race condition.

@cmd-ntrf
Copy link
Member

I research this a bit.

/var/lock/subsys is considered a legacy temporary folder. It is created by the systemd via systemd-tmpfiles-setup.service. The instructions to create the folder are in : /usr/lib/tmpfiles.d/legacy.conf.

Next time it happens, if you could look at the journalctl of the tmpfiles service and paste its content here, that would be helpful:

journalctl -u systemd-tmpfiles-setup.service

Also provide the journal of iptables, so we can look at the timestamp and determine if systemd-tmpfiles ran after iptables tried to start.

@cmd-ntrf
Copy link
Member

The creation of /var/run/munge/ is also the responsibility of systemd-tmpfiles-setup.service. The folder to created is defined in /usr/lib/tmpfiles.d/munge.conf.

munge service file does not explictly state systemd-tmpfiles-setup as a service that needs to be started before munge is started

Before=multi-user.target shutdown.target
After=system.slice systemd-journald.socket sysinit.target basic.target time-sync.target network.target

So there is a potential race condition as you stated.

@cmd-ntrf
Copy link
Member

cmd-ntrf commented Jul 11, 2024

sysinit.target has the following dependency:

After=proc-sys-fs-binfmt_misc.automount [...] systemd-tmpfiles-setup-dev.service [...]dev-mqueue.mount

Both munge and iptables depends on sysinit.target, so in theory /var/run/munge and /var/lock/subsys have to exist before sysinit.target is executed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants