Replace runSaltProcessStep by cmdRun
This patch replaces runSaltProcessStep in osUpgrade and osDistUpgrade
functions by cmdRun which has the ability to check the return error code
Change-Id: I131dd0e415afc8cbc0a08f9143739dcc7a3a71e4
Related-Prod: PROD-29862
diff --git a/src/com/mirantis/mk/Debian.groovy b/src/com/mirantis/mk/Debian.groovy
index d6c82db..6bb1f50 100644
--- a/src/com/mirantis/mk/Debian.groovy
+++ b/src/com/mirantis/mk/Debian.groovy
@@ -265,8 +265,8 @@
common.infoMsg("Running upgrade on ${target}")
salt.runSaltProcessStep(env, target, 'pkg.refresh_db', [], null, true)
- def cmd = 'export DEBIAN_FRONTEND=noninteractive; apt-get -y -q --allow-downgrades -o Dpkg::Options::=\"--force-confdef\" -o Dpkg::Options::=\"--force-confold\" upgrade;'
- salt.runSaltProcessStep(env, target, 'cmd.run', [cmd])
+ def cmd = 'export DEBIAN_FRONTEND=noninteractive; apt-get -y -q --allow-downgrades -o Dpkg::Options::=\"--force-confdef\" -o Dpkg::Options::=\"--force-confold\" upgrade'
+ salt.cmdRun(env, target, cmd)
}
/**
@@ -281,8 +281,8 @@
common.infoMsg("Running dist-upgrade on ${target}")
salt.runSaltProcessStep(env, target, 'pkg.refresh_db', [], null, true)
- def cmd = 'export DEBIAN_FRONTEND=noninteractive; apt-get -y -q --allow-downgrades -o Dpkg::Options::=\"--force-confdef\" -o Dpkg::Options::=\"--force-confold\" dist-upgrade;'
- salt.runSaltProcessStep(env, target, 'cmd.run', [cmd])
+ def cmd = 'export DEBIAN_FRONTEND=noninteractive; apt-get -y -q --allow-downgrades -o Dpkg::Options::=\"--force-confdef\" -o Dpkg::Options::=\"--force-confold\" dist-upgrade'
+ salt.cmdRun(env, target, cmd)
}
/**