Skip to content

Commit

Permalink
Add PROD-37068 upgrade check
Browse files Browse the repository at this point in the history
Related-Prod: PROD-37068
Change-Id: I7df7b9e5c34308fb20e6d8cc7a0741fc2410600d
  • Loading branch information
cvieri committed Feb 23, 2023
1 parent 68b37b5 commit 640b73e
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions src/com/mirantis/mcp/UpgradeChecks.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -202,3 +202,32 @@ Please set pillar "redis:server:version" to "5.0" to openstack/telemetry.yml and
}
return waStatus
}

def check_37068 (salt, venvPepper, String cluster_name, Boolean raise_exc) {
def waStatus = [prodId: "PROD-37068", isFixed: "", waInfo: ""]
def dogtag_enabled = salt.getPillar(venvPepper, 'I@dogtag:server', "dogtag:server:enabled").get("return")[0].values()[0]
def pushgateway_enabled = salt.getPillar(venvPepper, 'I@docker:client:stack:monitoring', "prometheus:pushgateway:enabled").get("return")[0].values()[0]
if (dogtag_enabled == '' || dogtag_enabled == 'false' || dogtag_enabled == null) {
waStatus.isFixed = 'Nothing to do. Dogtag is disabled.'
return waStatus
} else {
if (pushgateway_enabled == '' || pushgateway_enabled == 'false' || pushgateway_enabled == null) {
waStatus.isFixed = 'Nothing to do. Pushgateway is disabled.'
return waStatus
} else {
def stacklightMonitorHostnamePillar = salt.getPillar(venvPepper, 'I@dogtag:server', 'dogtag:server:stacklight_monitor_hostname').get("return")[0].values()[0]
if (stacklightMonitorHostnamePillar == '' || stacklightMonitorHostnamePillar == 'null' || stacklightMonitorHostnamePillar == null) {
waStatus.isFixed = "Work-around should be applied manually"
waStatus.waInfo = """To enable dogtag certificates expriration alerts you MUST set stacklight monitor endpoint. \n
Please set pillar "dogtag:server:stacklight_monitor_hostname" to the value of _param:stacklight_monitor_hostname in openstack/barbican.yml and refresh pillars."""
if (raise_exc) {
error('Pillar dogtag:server:stacklight_monitor_hostname is not defined.\n' +
waStatus.waInfo)
}
return waStatus
}
waStatus.isFixed = "Work-around for PROD-37068 already applied, nothing todo"
return waStatus
}
}
}

0 comments on commit 640b73e

Please sign in to comment.