Skip to content

Commit

Permalink
Avoid running drivegroup based osd deployment post-upgrade
Browse files Browse the repository at this point in the history
In a post-upgrade scenario the user still has old-style profiles defined in the
pillar.

Since we don't force the user to move to the new drive-group implementation
right after the upgrade, we have to detect that they are running in 'legacy'
mode and stop.
  • Loading branch information
Joshua Schmid committed Apr 25, 2019
1 parent 715e071 commit 21cdcef
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions srv/salt/_modules/dg.py
Original file line number Diff line number Diff line change
Expand Up @@ -823,6 +823,14 @@ def c_v_commands(**kwargs):

def deploy(**kwargs):
""" Execute the generated ceph-volume commands """
# do not run this when there is still ceph:storage in the pillar
# this indicates that we are in a post-upgrade scenario and
# the drive assignment was not ported to drive-groups yet.
if __pillar__.get('ceph', {}).get('storage'):
return ("You seem to have configured old-style profiles."
"Will not deploy using Drive-Groups."
"Please consult <insert doc/man> for guidance"
"on how to migrate to Drive-Groups")
return __salt__['helper.run'](c_v_commands(**kwargs))


Expand Down

0 comments on commit 21cdcef

Please sign in to comment.