Merge "Add changes for validation pipeline."
diff --git a/generate-cookiecutter-products.groovy b/generate-cookiecutter-products.groovy
index 0c57300..f6090c0 100644
--- a/generate-cookiecutter-products.groovy
+++ b/generate-cookiecutter-products.groovy
@@ -146,7 +146,6 @@
sh "wget -O create-config-drive ${config_drive_script_url} && chmod +x create-config-drive"
sh "wget -O user_data.sh ${user_data_script_url}"
-
// load data from model
def smc = [:]
smc['SALT_MASTER_MINION_ID'] = "cfg.${clusterDomain}"
@@ -154,6 +153,8 @@
smc['DEPLOY_NETWORK_GW'] = templateContext['default_context']['deploy_network_gateway']
smc['DEPLOY_NETWORK_NETMASK'] = templateContext['default_context']['deploy_network_netmask']
smc['DNS_SERVERS'] = templateContext['default_context']['dns_server01']
+ smc['CICD_CONTROL_ADDRESS'] = templateContext['default_context']['cicd_control_address']
+ smc['INFRA_CONFIG_ADDRESS'] = templateContext['default_context']['infra_config_address']
for (i in common.entries(smc)) {
sh "sed -i \"s,export ${i[0]}=.*,export ${i[0]}=${i[1]},\" user_data.sh"
diff --git a/restore-cassandra.groovy b/restore-cassandra.groovy
index 89afc6c..4b554b0 100644
--- a/restore-cassandra.groovy
+++ b/restore-cassandra.groovy
@@ -58,7 +58,7 @@
// wait until supervisor-database service is up
salt.commandStatus(saltMaster, 'I@cassandra:backup:client', 'service supervisor-database status', 'running')
-
+ sleep(5)
// performs restore
salt.cmdRun(saltMaster, 'I@cassandra:backup:client', "su root -c 'salt-call state.sls cassandra'")
salt.runSaltProcessStep(saltMaster, 'I@cassandra:backup:client', 'system.reboot', null, null, true, 5)
@@ -73,7 +73,7 @@
// wait until contrail-status is up
salt.commandStatus(saltMaster, 'I@opencontrail:control', "contrail-status | grep -v == | grep -v \'disabled on boot\' | grep -v nodemgr | grep -v active | grep -v backup", null, false)
-
+
salt.cmdRun(saltMaster, 'I@opencontrail:control', "nodetool status")
salt.cmdRun(saltMaster, 'I@opencontrail:control', "contrail-status")
}
diff --git a/test-service.groovy b/test-service.groovy
index cb9265c..cf1dcc6 100644
--- a/test-service.groovy
+++ b/test-service.groovy
@@ -80,13 +80,13 @@
if (common.checkContains('TEST_DOCKER_INSTALL', 'true')) {
test.install_docker(saltMaster, TEST_TEMPEST_TARGET)
}
+
stage('Run OpenStack tests') {
test.runTempestTests(saltMaster, TEST_TEMPEST_IMAGE, TEST_TEMPEST_TARGET, TEST_TEMPEST_PATTERN)
}
- stage('Copy Tempest results to config node') {
- test.copyTempestResults(saltMaster, TEST_TEMPEST_TARGET)
- }
+ writeFile(file: 'report.xml', text: salt.getFileContent(saltMaster, TEST_TEMPEST_TARGET, '/root/report.xml'))
+ junit(keepLongStdio: true, testResults: 'report.xml', healthScaleFactor: Double.parseDouble(TEST_JUNIT_RATIO))
}
} catch (Throwable e) {
diff --git a/xtrabackup-restore-mysql-db.groovy b/xtrabackup-restore-mysql-db.groovy
index 6401789..303c282 100644
--- a/xtrabackup-restore-mysql-db.groovy
+++ b/xtrabackup-restore-mysql-db.groovy
@@ -74,8 +74,12 @@
salt.commandStatus(saltMaster, 'I@galera:master', 'service mysql status', 'running')
salt.runSaltProcessStep(saltMaster, 'I@galera:slave', 'service.start', ['mysql'], null, true)
- sleep(15)
+ try {
+ salt.commandStatus(saltMaster, 'I@galera:slave', 'service mysql status', 'running')
+ } catch (Exception er) {
+ common.warningMsg('Either there are no galera slaves or something failed when starting mysql on galera slaves')
+ }
+ sleep(5)
salt.cmdRun(saltMaster, 'I@galera:master', "su root -c 'salt-call mysql.status | grep -A1 wsrep_cluster_size'")
-
}
}