ceph-upgrade: enable msgr2 while upgrading to nautilus

Related-Prod: PROD-34577
Change-Id: Id0b8aae4959c68c83be10022991e0dd57f64d773
diff --git a/ceph-upgrade.groovy b/ceph-upgrade.groovy
index 548b49d..96a19c8 100644
--- a/ceph-upgrade.groovy
+++ b/ceph-upgrade.groovy
@@ -112,9 +112,9 @@
             // restart services
             stage("Restart ${target} services on ${minion}") {
                 if (target == 'osd') {
-                    def device_grain_name =  salt.getPillar(pepperEnv,"I@ceph:osd","ceph:osd:lvm_enabled")['return'].first().containsValue(true) ? "ceph_volume" : "ceph_disk"
-                    def ceph_disks = salt.getGrain(pepperEnv, minion, 'ceph')['return'][0].values()[0].values()[0][device_grain_name]
-                    ceph_disks[0].values()[0].values()[0].each { osd, param ->
+                    def device_grain_name =  salt.getPillar(master,"I@ceph:osd","ceph:osd:lvm_enabled")['return'].first().containsValue(true) ? "ceph_volume" : "ceph_disk"
+                    def ceph_disks = salt.getGrain(master, minion, 'ceph')['return'][0].values()[0].values()[0][device_grain_name]
+                    ceph_disks.each { osd, param ->
                         salt.cmdRun(master, "${minion}", "systemctl restart ceph-${target}@${osd}")
                         ceph.waitForHealthy(master, ADMIN_HOST, flags)
                     }
@@ -192,6 +192,10 @@
 
         if (STAGE_UPGRADE_MON.toBoolean() == true) {
             upgrade(pepperEnv, 'mon')
+
+            if (TARGET_RELEASE == 'nautilus' ) {
+                salt.cmdRun(pepperEnv, ADMIN_HOST, "ceph mon enable-msgr2")
+            }
         }
 
         if (STAGE_UPGRADE_MGR.toBoolean() == true) {