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

overlay-setup: Ensure units ordered after /var overlay #404

Merged
merged 1 commit into from
Apr 25, 2024

Conversation

dbnicholson
Copy link
Member

Trying to create a list of units that require /var as in 0cddd9e is a losing game. It also doesn't really work properly since you can't order against all instances of a templated unit like [email protected].

As suggested by upstream[1], the more robust way to handle this is to order the service before var.mount. That requires handling the /var mount in the service, but fortunately that's straightforward for this narrow use case.

With that change, the service will also run before ostree-remount.service, which means it has to take care of marking the /sysroot mount as private. Without that, the /var overlay mount will be mirrored under /sysroot.

  1. Early boot services requiring /var are not ordered after local-fs.target systemd/systemd#32343

https://phabricator.endlessm.com/T35323

Trying to create a list of units that require /var as in 0cddd9e is a
losing game. It also doesn't really work properly since you can't order
against all instances of a templated unit like [email protected].

As suggested by upstream[1], the more robust way to handle this is to
order the service before var.mount. That requires handling the /var
mount in the service, but fortunately that's straightforward for this
narrow use case.

With that change, the service will also run before
ostree-remount.service, which means it has to take care of marking the
/sysroot mount as private. Without that, the /var overlay mount will be
mirrored under /sysroot.

1. systemd/systemd#32343

https://phabricator.endlessm.com/T35323
@dbnicholson dbnicholson requested a review from dsd April 24, 2024 21:40
@starnight starnight merged commit b977dd2 into master Apr 25, 2024
2 checks passed
@starnight starnight deleted the T35323-live-overlay-ordering-round-2 branch April 25, 2024 03:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants