Merge lp://qastaging/~gandelman-a/charms/precise/ceph/avoid_recreate_existing_dirs into lp://qastaging/~charmers/charms/precise/ceph/trunk

Proposed by Adam Gandelman
Status: Rejected
Rejected by: James Page
Proposed branch: lp://qastaging/~gandelman-a/charms/precise/ceph/avoid_recreate_existing_dirs
Merge into: lp://qastaging/~charmers/charms/precise/ceph/trunk
Diff against target: 16 lines (+4/-2)
1 file modified
hooks/hooks.py (+4/-2)
To merge this branch: bzr merge lp://qastaging/~gandelman-a/charms/precise/ceph/avoid_recreate_existing_dirs
Reviewer Review Type Date Requested Status
Dave Cheney (community) Needs Information
Review via email: mp+171175@code.qastaging.launchpad.net

Description of the change

Avoids errors if for some reason /var/run/ceph + mon hosts' directory exist already during bootstrap.

To post a comment you must log in.
62. By Adam Gandelman

Only call makedirs once.

Revision history for this message
Dave Cheney (dave-cheney) wrote :

Thank you for for this proposal. I'm not sure it is quite right. It looks like this change is trying to implement mkdir -p, which will work fine for /var/run/ceph because it is highly likely that /var/run will exist, but for path, which is /var/lib/ceph/mon/ceph-%s, my reading of the python mkdir function is it will fail if /var/lib/ceph/mon exists.

Is there a python helper in the std lib that implements the more lenient semantics of mkdir -p ?

review: Needs Information

Unmerged revisions

62. By Adam Gandelman

Only call makedirs once.

61. By Adam Gandelman

Only create /var/run/ceph + mon path if they need to be.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches