diff --git a/salt/common/tools/sbin_jinja/so-raid-status b/salt/common/tools/sbin_jinja/so-raid-status index 3fe238c23..ca3c34608 100755 --- a/salt/common/tools/sbin_jinja/so-raid-status +++ b/salt/common/tools/sbin_jinja/so-raid-status @@ -9,7 +9,7 @@ . /usr/sbin/so-common -software_raid=("SOSMN" "SOSMN-DE02" "SOSSNNV" "SOSSNNV-DE02" "SOS10k-DE02" "SOS10KNV" "SOS10KNV-DE02" "SOS10KNV-DE02" "SOS2000-DE02" "SOS-GOFAST-LT-DE02" "SOS-GOFAST-MD-DE02" "SOS-GOFAST-HV-DE02") +software_raid=("SOSMN" "SOSMN-DE02" "SOSSNNV" "SOSSNNV-DE02" "SOS10k-DE02" "SOS10KNV" "SOS10KNV-DE02" "SOS10KNV-DE02" "SOS2000-DE02" "SOS-GOFAST-LT-DE02" "SOS-GOFAST-MD-DE02" "SOS-GOFAST-HV-DE02" "HVGUEST") hardware_raid=("SOS1000" "SOS1000F" "SOSSN7200" "SOS5000" "SOS4000") {%- if salt['grains.get']('sosmodel', '') %} @@ -87,6 +87,11 @@ check_boss_raid() { } check_software_raid() { + if [[ ! -f /proc/mdstat ]]; then + SWRAID=0 + return + fi + SWRC=$(grep "_" /proc/mdstat) if [[ -n $SWRC ]]; then # RAID is failed in some way @@ -107,7 +112,9 @@ if [[ "$is_hwraid" == "true" ]]; then fi if [[ "$is_softwareraid" == "true" ]]; then check_software_raid - check_boss_raid + if [ "$model" != "HVGUEST" ]; then + check_boss_raid + fi fi sum=$(($SWRAID + $BOSSRAID + $HWRAID)) diff --git a/salt/manager/tools/sbin/soup b/salt/manager/tools/sbin/soup index a3b5daa23..2d36cf7eb 100755 --- a/salt/manager/tools/sbin/soup +++ b/salt/manager/tools/sbin/soup @@ -24,6 +24,14 @@ BACKUPTOPFILE=/opt/so/saltstack/default/salt/top.sls.backup SALTUPGRADED=false SALT_CLOUD_INSTALLED=false SALT_CLOUD_CONFIGURED=false +# Check if salt-cloud is installed +if rpm -q salt-cloud &>/dev/null; then + SALT_CLOUD_INSTALLED=true +fi +# Check if salt-cloud is configured +if [[ -f /etc/salt/cloud.profiles.d/socloud.conf ]]; then + SALT_CLOUD_CONFIGURED=true +fi # used to display messages to the user at the end of soup declare -a FINAL_MESSAGE_QUEUE=() @@ -489,6 +497,10 @@ up_to_3.1.0() { post_to_3.1.0() { /usr/sbin/so-kibana-space-defaults + # ensure manager has new version of socloud.conf + if [[ $SALT_CLOUD_CONFIGURED == true ]]; then + salt-call state.apply salt.cloud.config concurrent=True + fi POSTVERSION=3.1.0 } @@ -663,15 +675,6 @@ upgrade_check_salt() { upgrade_salt() { echo "Performing upgrade of Salt from $INSTALLEDSALTVERSION to $NEWSALTVERSION." echo "" - # Check if salt-cloud is installed - if rpm -q salt-cloud &>/dev/null; then - SALT_CLOUD_INSTALLED=true - fi - # Check if salt-cloud is configured - if [[ -f /etc/salt/cloud.profiles.d/socloud.conf ]]; then - SALT_CLOUD_CONFIGURED=true - fi - echo "Removing yum versionlock for Salt." echo "" yum versionlock delete "salt" diff --git a/salt/salt/cloud/cloud.profiles.d/socloud.conf.jinja b/salt/salt/cloud/cloud.profiles.d/socloud.conf.jinja index f8e5d5555..44bef4108 100644 --- a/salt/salt/cloud/cloud.profiles.d/socloud.conf.jinja +++ b/salt/salt/cloud/cloud.profiles.d/socloud.conf.jinja @@ -27,6 +27,7 @@ sool9_{{host}}: log_file: /opt/so/log/salt/minion grains: hypervisor_host: {{host ~ "_" ~ role}} + sosmodel: HVGUEST preflight_cmds: - | {%- set hostnames = [MANAGERHOSTNAME] %}