From 21cdcef004e5f53ce53b9a3a83811af313d5ad41 Mon Sep 17 00:00:00 2001 From: Joshua Schmid Date: Wed, 24 Apr 2019 14:34:09 +0200 Subject: [PATCH] Avoid running drivegroup based osd deployment post-upgrade 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. --- srv/salt/_modules/dg.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/srv/salt/_modules/dg.py b/srv/salt/_modules/dg.py index b6cb80e15..a57895ca4 100644 --- a/srv/salt/_modules/dg.py +++ b/srv/salt/_modules/dg.py @@ -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 for guidance" + "on how to migrate to Drive-Groups") return __salt__['helper.run'](c_v_commands(**kwargs))