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
dist: The way to fix 'ordering cycle' issue on var-lib-scylla.mount might be wrong #8761
Milestone
Comments
syuu1228
added a commit
to syuu1228/scylla
that referenced
this issue
May 31, 2021
All mount units generated by systemd-fstab-generator have "Before=local-fs.target", it is opposite of our mount units. Seems like it is the reason we got "ordering cycle" error on scylladb#8482, we need to move local-fs.target to Before= to fix the error. Fixes scylladb#8761
@syuu1228 do we have this issue in our current images? if not let's close this |
syuu1228
added a commit
to syuu1228/scylla
that referenced
this issue
Oct 5, 2023
systemd man page says: systemd-fstab-generator(3) automatically adds dependencies of type Before= to all mount units that refer to local mount points for this target unit. So Before=local-fs.taget is the correct dependency for local mount points, but we currently specify "After=local-fs.target", it should be fixed. Fixes scylladb#8761
syuu1228
added a commit
to syuu1228/scylla
that referenced
this issue
Oct 5, 2023
systemd man page says: systemd-fstab-generator(3) automatically adds dependencies of type Before= to all mount units that refer to local mount points for this target unit. So "Before=local-fs.taget" is the correct dependency for local mount points, but we currently specify "After=local-fs.target", it should be fixed. Fixes scylladb#8761
@yaronkaikov I realized the issue is still not fixed, so I send a PR for this: #15647 |
syuu1228
added a commit
to syuu1228/scylla
that referenced
this issue
Nov 6, 2023
systemd man page says: systemd-fstab-generator(3) automatically adds dependencies of type Before= to all mount units that refer to local mount points for this target unit. So "Before=local-fs.taget" is the correct dependency for local mount points, but we currently specify "After=local-fs.target", it should be fixed. Also replaced "WantedBy=multi-user.target" with "WantedBy=local-fs.target", since .mount are not related with multi-user but depends local filesystems. Fixes scylladb#8761
syuu1228
added a commit
to syuu1228/scylla
that referenced
this issue
Nov 6, 2023
systemd man page says: systemd-fstab-generator(3) automatically adds dependencies of type Before= to all mount units that refer to local mount points for this target unit. So "Before=local-fs.taget" is the correct dependency for local mount points, but we currently specify "After=local-fs.target", it should be fixed. Also replaced "WantedBy=multi-user.target" with "WantedBy=local-fs.target", since .mount are not related with multi-user but depends local filesystems. Fixes scylladb#8761
denesb
pushed a commit
that referenced
this issue
Nov 6, 2023
systemd man page says: systemd-fstab-generator(3) automatically adds dependencies of type Before= to all mount units that refer to local mount points for this target unit. So "Before=local-fs.taget" is the correct dependency for local mount points, but we currently specify "After=local-fs.target", it should be fixed. Also replaced "WantedBy=multi-user.target" with "WantedBy=local-fs.target", since .mount are not related with multi-user but depends local filesystems. Fixes #8761 Closes #15647
@syuu1228 should we backport this? |
@denesb Yes |
denesb
pushed a commit
that referenced
this issue
Dec 19, 2023
systemd man page says: systemd-fstab-generator(3) automatically adds dependencies of type Before= to all mount units that refer to local mount points for this target unit. So "Before=local-fs.taget" is the correct dependency for local mount points, but we currently specify "After=local-fs.target", it should be fixed. Also replaced "WantedBy=multi-user.target" with "WantedBy=local-fs.target", since .mount are not related with multi-user but depends local filesystems. Fixes #8761 Closes #15647 (cherry picked from commit a232783)
denesb
pushed a commit
that referenced
this issue
Dec 19, 2023
systemd man page says: systemd-fstab-generator(3) automatically adds dependencies of type Before= to all mount units that refer to local mount points for this target unit. So "Before=local-fs.taget" is the correct dependency for local mount points, but we currently specify "After=local-fs.target", it should be fixed. Also replaced "WantedBy=multi-user.target" with "WantedBy=local-fs.target", since .mount are not related with multi-user but depends local filesystems. Fixes #8761 Closes #15647 (cherry picked from commit a232783)
Backported to 5.4 and 5.2. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
We had an issue on Ubuntu 20.04 AMI that /var/lib/scylla does mounted after reboot (#8482), and it was because systemd causes 'ordering cycle' error on our systemd units (var-lib-scylla.mount and var-lib-systemd-coredump.mount):
And we fixed it by adding
DefaultDependencies=no
on these mount units atd92a266.
However, I realized that auto-generated mount units on Ubuntu 20.04 specifies
Before=local-fs.target
:It is opposite on our mount units, we specifies
After=local-fs.target
:https://github.com/scylladb/scylla/blob/master/dist/common/scripts/scylla_raid_setup#L164
I suspect this is causing ordering cycle, so I changed the mount unit to
Before=local-fs.target scylla-server.service
and droppedDefaultDependencies=no
, tested if it works after reboot, then I found it works:So, I think we fixed the issue wrong way, we just needed to move local-fs.target from
After=
toBefore=
.The text was updated successfully, but these errors were encountered: