Skip to content

Commit

Permalink
dist: move local-fs.target to Before=
Browse files Browse the repository at this point in the history
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
  • Loading branch information
syuu1228 committed May 31, 2021
1 parent 0106367 commit 4effa50
Show file tree
Hide file tree
Showing 2 changed files with 5 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 @@ -65,8 +65,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
[Mount]
What=/var/lib/scylla/coredump
Expand Down
8 changes: 4 additions & 4 deletions dist/common/scripts/scylla_raid_setup
Original file line number Diff line number Diff line change
Expand Up @@ -161,15 +161,15 @@ if __name__ == '__main__':
os.makedirs(mount_at, exist_ok=True)

uuid = run(f'blkid -s UUID -o value {fsdev}', shell=True, check=True, capture_output=True, encoding='utf-8').stdout.strip()
after = 'local-fs.target'
after = ''
if raid:
after += f' {md_service}'
after += f'After={md_service}'
unit_data = f'''
[Unit]
Description=Scylla data directory
Before=scylla-server.service
After={after}
Wants={md_service}
Before=local-fs.target scylla-server.service
{after}
[Mount]
What=/dev/disk/by-uuid/{uuid}
Expand Down

0 comments on commit 4effa50

Please sign in to comment.