Skip to content

Commit

Permalink
dist: fix local-fs.target dependency
Browse files Browse the repository at this point in the history
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
  • Loading branch information
syuu1228 committed Oct 5, 2023
1 parent 498e3ec commit aca209a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
3 changes: 1 addition & 2 deletions dist/common/scripts/scylla_coredump_setup
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
7 changes: 3 additions & 4 deletions dist/common/scripts/scylla_raid_setup
Original file line number Diff line number Diff line change
Expand Up @@ -167,19 +167,18 @@ if __name__ == '__main__':

uuidpath = f'/dev/disk/by-uuid/{uuid}'

after = 'local-fs.target'
after = ''
wants = ''
if raid and args.raid_level != '0':
after += f' {md_service}'
after += f'\nAfter={md_service}'
wants = f'\nWants={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}{wants}
DefaultDependencies=no
[Mount]
Expand Down

0 comments on commit aca209a

Please sign in to comment.