mirror of
https://github.com/scylladb/scylladb.git
synced 2026-05-12 19:02:12 +00:00
dist: fix local-fs.target dependency
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 scylladb/scylladb#15647
(cherry picked from commit a23278308f)
This commit is contained in:
committed by
Botond Dénes
parent
2cef52aeaa
commit
bfc98d1909
5
dist/common/scripts/scylla_coredump_setup
vendored
5
dist/common/scripts/scylla_coredump_setup
vendored
@@ -62,8 +62,7 @@ ExternalSizeMax=1024G
|
||||
[Unit]
|
||||
Description=Save coredump to scylla data directory
|
||||
Conflicts=umount.target
|
||||
Before=scylla-server.service
|
||||
After=local-fs.target
|
||||
Before=local-fs.target scylla-server.service
|
||||
DefaultDependencies=no
|
||||
|
||||
[Mount]
|
||||
@@ -73,7 +72,7 @@ Type=none
|
||||
Options=bind
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
WantedBy=local-fs.target
|
||||
'''[1:-1]
|
||||
with open('/etc/systemd/system/var-lib-systemd-coredump.mount', 'w') as f:
|
||||
f.write(dot_mount)
|
||||
|
||||
12
dist/common/scripts/scylla_raid_setup
vendored
12
dist/common/scripts/scylla_raid_setup
vendored
@@ -257,19 +257,19 @@ if __name__ == '__main__':
|
||||
dev_type = 'realpath'
|
||||
LOGGER.error(f'Failed to detect uuid, using {dev_type}: {mount_dev}')
|
||||
|
||||
after = 'local-fs.target'
|
||||
after = ''
|
||||
wants = ''
|
||||
if raid and args.raid_level != '0':
|
||||
after += f' {md_service}'
|
||||
wants = f'\nWants={md_service}'
|
||||
after = wants = 'md_service'
|
||||
opt_discard = ''
|
||||
if args.online_discard:
|
||||
opt_discard = ',discard'
|
||||
unit_data = f'''
|
||||
[Unit]
|
||||
Description=Scylla data directory
|
||||
Before=scylla-server.service
|
||||
After={after}{wants}
|
||||
Before=local-fs.target scylla-server.service
|
||||
After={after}
|
||||
Wants={wants}
|
||||
DefaultDependencies=no
|
||||
|
||||
[Mount]
|
||||
@@ -279,7 +279,7 @@ Type=xfs
|
||||
Options=noatime{opt_discard}
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
WantedBy=local-fs.target
|
||||
'''[1:-1]
|
||||
with open(f'/etc/systemd/system/{mntunit_bn}', 'w') as f:
|
||||
f.write(unit_data)
|
||||
|
||||
Reference in New Issue
Block a user