diff --git a/client-cli/cli_lib/cluster.py b/client-cli/cli_lib/cluster.py index 2ead7814..d003e2df 100644 --- a/client-cli/cli_lib/cluster.py +++ b/client-cli/cli_lib/cluster.py @@ -129,7 +129,7 @@ def format_info(cluster_information, oformat): if state == 'total' or state == 'start': continue - if state in ['disable', 'migrate', 'unmigrate']: + if state in ['disable', 'migrate', 'unmigrate', 'provision']: colour = ansiprint.blue() else: colour = ansiprint.yellow() diff --git a/client-cli/cli_lib/vm.py b/client-cli/cli_lib/vm.py index 289e4576..0186de67 100644 --- a/client-cli/cli_lib/vm.py +++ b/client-cli/cli_lib/vm.py @@ -437,7 +437,8 @@ def format_info(config, domain_information, long_output): 'disable': ansiprint.blue(), 'fail': ansiprint.red(), 'migrate': ansiprint.blue(), - 'unmigrate': ansiprint.blue() + 'unmigrate': ansiprint.blue(), + 'provision': ansiprint.blue() } ainformation.append('{}State:{} {}{}{}'.format(ansiprint.purple(), ansiprint.end(), dstate_colour[domain_information['state']], domain_information['state'], ansiprint.end())) ainformation.append('{}Current Node:{} {}'.format(ansiprint.purple(), ansiprint.end(), domain_information['node'])) diff --git a/client-common/cluster.py b/client-common/cluster.py index dbd0f5a9..289115e6 100644 --- a/client-common/cluster.py +++ b/client-common/cluster.py @@ -73,7 +73,7 @@ def getClusterInformation(zk_conn): vm_report_status = list(range(0, vm_count)) for index, vm in enumerate(vm_list): vm_state = vm['state'] - if vm_state not in ['start', 'disable', 'migrate', 'unmigrate']: + if vm_state not in ['start', 'disable', 'migrate', 'unmigrate', 'provision']: vm_healthy_status[index] = False else: vm_healthy_status[index] = True @@ -114,7 +114,7 @@ def getClusterInformation(zk_conn): 'stop,ready', 'stop,flush', 'stop,flushed', 'stop,unflush' ] vm_state_combinations = [ - 'start', 'restart', 'shutdown', 'stop', 'disable', 'fail', 'migrate', 'unmigrate' + 'start', 'restart', 'shutdown', 'stop', 'disable', 'fail', 'migrate', 'unmigrate', 'provision' ] ceph_osd_state_combinations = [ 'up,in', 'up,out', 'down,in', 'down,out' diff --git a/node-daemon/pvcd/VMInstance.py b/node-daemon/pvcd/VMInstance.py index 4b759603..e08b3206 100644 --- a/node-daemon/pvcd/VMInstance.py +++ b/node-daemon/pvcd/VMInstance.py @@ -487,6 +487,9 @@ class VMInstance(object): # restart # shutdown # stop + # States we don't (need to) handle are: + # disable + # provision # Conditional pass one - Are we already performing an action if self.instart == False \