aboutsummaryrefslogtreecommitdiffstats
path: root/mcp/reclass
AgeCommit message (Expand)AuthorFilesLines
2017-11-27[baremetal] VCP VM base img: Switch URL to AWS S3Alexandru Avadanii1-1/+1
2017-11-27Align options of glusterfs nova_instances volumeMichael Polenchuk2-3/+4
2017-11-27Merge "Revert "Apply apache state on proxy nodes""Michael Polenchuk1-8/+0
2017-11-25Bring in newer glusterfs for mtime unsplit brainAlexandru Avadanii3-0/+6
2017-11-24Revert "Apply apache state on proxy nodes"Alexandru Avadanii1-8/+0
2017-11-24Switch nofeature-ha compute nodes to UCA repoMichael Polenchuk5-1/+15
2017-11-20[baremetal] public gateway setup on prx nodesGuillermo Herrero15-108/+27
2017-11-17Merge "[baremetal] MaaS: Remove curtin netconfig via Salt"Alexandru Avadanii2-0/+7
2017-11-16Merge "Update opendaylight/neutron patch"Michael Polenchuk2-18/+0
2017-11-16Merge "[baremetal] Re-assign mgmt network to proxy nodes"Michael Polenchuk7-9/+35
2017-11-15Enable neutron trunk portsMichael Polenchuk5-0/+11
2017-11-15Update opendaylight/neutron patchMichael Polenchuk2-18/+0
2017-11-14[baremetal] Re-assign mgmt network to proxy nodesAlexandru Avadanii7-9/+35
2017-11-13[baremetal] MaaS: Remove curtin netconfig via SaltAlexandru Avadanii2-0/+7
2017-11-12[baremetal] prx: Fix empty Apache module listAlexandru Avadanii1-1/+2
2017-11-12salt formulas: Pin via reclass instead of salt.shAlexandru Avadanii2-0/+18
2017-11-10Apply apache state on proxy nodesMichael Polenchuk1-0/+8
2017-10-31Connect proxy nodes to public networkMichael Polenchuk2-1/+17
2017-10-30[virtual] Horizon: server: secure = FalseAlexandru Avadanii1-0/+4
2017-10-19[virtual] Rise memory for ovs/dpdk scenarioMichael Polenchuk1-1/+1
2017-10-18Merge "[baremetal] PDF-based network config"Alexandru Avadanii14-159/+419
2017-10-18[baremetal] PDF-based network configAlexandru Avadanii14-159/+419
2017-10-18[virtual] Horizon: Use v2 API instead of v3Alexandru Avadanii1-1/+1
2017-10-18[baremetal] reclass: Fix class order for commonAlexandru Avadanii44-35/+56
2017-10-16Return back glusterfs client stateMichael Polenchuk1-2/+0
2017-10-14Add license headers where missingAlexandru Avadanii109-10/+749
2017-10-14reclass: baremetal: Factor out common codeAlexandru Avadanii55-3343/+1218
2017-10-11reclass: Fix all remaining yamllint warningAlexandru Avadanii2-3/+3
2017-10-11Fix parametrized nic name variablesGuillermo Herrero17-51/+42
2017-10-10yamllint: Fix recently introduced errorsAlexandru Avadanii5-8/+8
2017-10-08reclass: Revert virt.nic to hardcoded eth{0,1}Alexandru Avadanii3-6/+6
2017-10-07Merge "Parametrized network config: nic device names"Alexandru Avadanii39-100/+143
2017-10-06Update opendaylight version to nitrogenMichael Polenchuk2-0/+2
2017-10-06Parametrized network config: nic device namesGuillermo Herrero39-100/+143
2017-10-06[virtual] Extend cinder volume sizeMichael Polenchuk1-1/+1
2017-10-03Identify jump host bridges based on IDF / PDF netsAlexandru Avadanii4-17/+18
2017-10-02Align salt version & reposMichael Polenchuk32-29/+3
2017-10-02[virtual] Reset mtu for compute management bridgeMichael Polenchuk1-1/+0
2017-09-28MaaS: Fix missing service.maas.cluster.single incAlexandru Avadanii3-0/+3
2017-09-27PDF parsing supportAlexandru Avadanii3-91/+96
2017-09-27Change vlan tag of lf-pod private networkMichael Polenchuk1-1/+1
2017-09-26Merge "Extended PDF support to all baremetal scenarios"Alexandru Avadanii13-179/+175
2017-09-26[virtual] Switch compute nodes to uca repoMichael Polenchuk2-14/+11
2017-09-26Extended PDF support to all baremetal scenariosGuillermo Herrero13-179/+175
2017-09-25Fix or silence all yamllint warningsAlexandru Avadanii89-1165/+1273
2017-09-23reclass: Drop MaaS public IP and interfaceAlexandru Avadanii8-34/+2
2017-09-23reclass: pod_config: Revert MaaS IPs to .3Alexandru Avadanii1-3/+3
2017-09-22Merge "Adjust memory allocation size"Alexandru Avadanii7-6/+25
2017-09-22Adjust memory allocation sizeMichael Polenchuk7-6/+25
2017-09-21Pod Descriptor File compatible reclass structureGuillermo Herrero13-114/+206
class="n">sleep(SLEEP_TIME * attempts) if timeout: err('Deployment timed out, environment %s is not operational, ' 'snapshot will not be performed' % self.env_id) if ready: log('Environment %s successfully deployed' % self.env_id) else: self.collect_error_logs() err('Deployment failed, environment %s is not operational' % self.env_id, self.collect_logs) def _start_deploy_task(self): out, _ = exec_cmd('fuel2 env deploy {}'.format(self.env_id), False) id = self._deployment_task_id(out) return id def _deployment_task_id(self, response): response = str(response) if response.startswith('Deployment task with id'): for s in response.split(): if s.isdigit(): return int(s) raise DeployNotStart('Unable to start deployment: {}'.format(response)) def _deployment_status(self, id): task = self._task_fields(id) if task['status'] == 'error': if any(msg in task['message'] for msg in ERROR_MSGS): raise NodesGoOffline(task['message']) return task['status'], task['progress'], task['message'] def _task_fields(self, id): try: out, _ = exec_cmd('fuel2 task show {} -f json'.format(id), False) task_info = json.loads(out) properties = {} # for 9.0 this can be list of dicts or dict # see https://bugs.launchpad.net/fuel/+bug/1625518 if isinstance(task_info, list): for d in task_info: properties.update({d['Field']: d['Value']}) else: return task_info return properties except ValueError as e: err('Unable to fetch task info: {}'.format(e)) def collect_logs(self): log('Cleaning out any previous deployment logs') exec_cmd('rm -f /var/log/remote/fuel-snapshot-*', False) exec_cmd('rm -f /root/deploy-*', False) log('Generating Fuel deploy snap-shot') if exec_cmd('fuel snapshot < /dev/null &> snapshot.log', False)[1] != 0: log('Could not create a Fuel snapshot') else: exec_cmd('mv /root/fuel-snapshot* /var/log/remote/', False) log('Collecting all Fuel Snapshot & deploy log files') r, _ = exec_cmd('tar -czhf /root/deploy-%s.log.tar.gz /var/log/remote' % time.strftime("%Y%m%d-%H%M%S"), False) log(r) def verify_node_status(self): node_list = parse(exec_cmd('fuel --env %s node' % self.env_id)) failed_nodes = [] for node in node_list: if node[N['status']] != 'ready': failed_nodes.append((node[N['id']], node[N['status']])) if failed_nodes: summary = '' for node, status in failed_nodes: summary += '[node %s, status %s]\n' % (node, status) err('Deployment failed: %s' % summary, self.collect_logs) def health_check(self): log('Now running sanity and smoke health checks') r = exec_cmd('fuel health --env %s --check sanity,smoke --force' % self.env_id) log(r) if 'failure' in r: err('Healthcheck failed!', self.collect_logs) def deploy(self): self.run_deploy() self.verify_node_status() if not self.no_health_check: self.health_check() self.collect_logs()