summaryrefslogtreecommitdiffstats
path: root/fuel/deploy/install_fuel_master.py
diff options
context:
space:
mode:
authorSzilard Cserey <szilard.cserey@ericsson.com>2015-05-21 15:57:35 +0200
committerSzilard Cserey <szilard.cserey@ericsson.com>2015-06-17 12:09:30 +0200
commit2654b0628e30f54b0b8e89208ab04204858cfae5 (patch)
treeba385d757efb92f7c8f8b13d55ae6a7c483e9dc4 /fuel/deploy/install_fuel_master.py
parent321aff98523fbe442af7ca4d935c83e2196eacee (diff)
Fuel Config Reap + Additional Refactoring for Autodeployment
1. Refactor the whole autodeployment code in such a way that the preparation of Fuel VM + networking and the autodeployment itself can be executed all at once 2. Functionality added that allows reaping of Fuel configuration from an existing environment and create DHA and DEA configuration files from it JIRA: [BGS-2] Create Fuel deployment script Change-Id: I7101295ac4becfc5fa10eda757cec0c2ad127940 Signed-off-by: Szilard Cserey <szilard.cserey@ericsson.com>
Diffstat (limited to 'fuel/deploy/install_fuel_master.py')
-rw-r--r--fuel/deploy/install_fuel_master.py33
1 files changed, 6 insertions, 27 deletions
diff --git a/fuel/deploy/install_fuel_master.py b/fuel/deploy/install_fuel_master.py
index bb8e7e1..ea24ff0 100644
--- a/fuel/deploy/install_fuel_master.py
+++ b/fuel/deploy/install_fuel_master.py
@@ -32,15 +32,6 @@ class InstallFuelMaster(object):
self.dha.node_power_off(self.fuel_node_id)
- self.zero_mbr_set_boot_order()
-
- self.proceed_with_installation()
-
- def custom_install(self):
- log('Start Custom Fuel Installation')
-
- self.dha.node_power_off(self.fuel_node_id)
-
log('Zero the MBR')
self.dha.node_zero_mbr(self.fuel_node_id)
@@ -68,7 +59,7 @@ class InstallFuelMaster(object):
log('Let the Fuel deployment continue')
log('Found FUEL menu as PID %s, now killing it' % fuel_menu_pid)
- self.ssh_exec_cmd('kill %s' % fuel_menu_pid)
+ self.ssh_exec_cmd('kill %s' % fuel_menu_pid, False)
log('Wait until installation complete')
self.wait_until_installation_completed()
@@ -81,18 +72,6 @@ class InstallFuelMaster(object):
log('Fuel Master installed successfully !')
- def zero_mbr_set_boot_order(self):
- if self.dha.node_can_zero_mbr(self.fuel_node_id):
- log('Fuel Node %s capable of zeroing MBR so doing that...'
- % self.fuel_node_id)
- self.dha.node_zero_mbr(self.fuel_node_id)
- self.dha.node_set_boot_order(self.fuel_node_id, ['disk', 'iso'])
- elif self.dha.node_can_set_boot_order_live(self.fuel_node_id):
- log('Node %s can change ISO boot order live' % self.fuel_node_id)
- self.dha.node_set_boot_order(self.fuel_node_id, ['iso', 'disk'])
- else:
- err('No way to install Fuel node')
-
def wait_for_node_up(self):
WAIT_LOOP = 60
SLEEP_TIME = 10
@@ -103,8 +82,8 @@ class InstallFuelMaster(object):
success = True
break
except Exception as e:
- log('EXCEPTION [%s] received when SSH-ing into Fuel VM %s ... '
- 'sleeping %s seconds' % (e, self.fuel_ip, SLEEP_TIME))
+ log('Trying to SSH into Fuel VM %s ... sleeping %s seconds'
+ % (self.fuel_ip, SLEEP_TIME))
time.sleep(SLEEP_TIME)
finally:
self.ssh.close()
@@ -138,9 +117,9 @@ class InstallFuelMaster(object):
break
return fuel_menu_pid
- def ssh_exec_cmd(self, cmd):
+ def ssh_exec_cmd(self, cmd, check=True):
with self.ssh:
- ret = self.ssh.exec_cmd(cmd)
+ ret = self.ssh.exec_cmd(cmd, check=check)
return ret
def inject_own_astute_yaml(self):
@@ -159,7 +138,7 @@ class InstallFuelMaster(object):
self.work_dir, os.path.basename(self.dea_file)))
def wait_until_installation_completed(self):
- WAIT_LOOP = 180
+ WAIT_LOOP = 320
SLEEP_TIME = 10
CMD = 'ps -ef | grep %s | grep -v grep' % BOOTSTRAP_ADMIN