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

ceph-disk: resolve race conditions #12136

Merged
merged 2 commits into from Nov 23, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/ceph-disk/ceph_disk/main.py
Expand Up @@ -4442,6 +4442,8 @@ def main_trigger(args):
)
return

if get_ceph_user() == 'ceph':
command_check_call(['chown', 'ceph:ceph', args.dev])
parttype = get_partition_type(args.dev)
partid = get_partition_uuid(args.dev)

Expand Down
2 changes: 2 additions & 0 deletions systemd/ceph-disk@.service
@@ -1,5 +1,7 @@
[Unit]
Description=Ceph disk activation: %f
After=local-fs.target
Wants=local-fs.target
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor nitpick, but shouldn't this be Requires=?
You want this unit to fail if the local fs can't be mounted (although, if that happens, you have bigger problems).

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would make sense to me also. I chose to go with the same kind of dependency as the other .service and .target defined by Ceph. As you say: if that is not present...we're in trouble big time ;-)


[Service]
Type=oneshot
Expand Down