Check local storage type

Fail the deployment if local sr type is not a file-based SR type

Change-Id: Ia6e289befa2fecda89d8f8ad2e38a62f57b548f0
This commit is contained in:
John Hua 2016-08-10 14:06:33 +08:00 committed by Bob Ball
parent 1725b5aaba
commit eac05bedc1
3 changed files with 13 additions and 1 deletions

View File

@ -2,4 +2,4 @@ HYPERVISOR_NAME=XenServer
HYPERVISOR_LOWER=xenserver
PLUGIN_NAME=fuel-plugin-xenserver
PLUGIN_VERSION=3.90
PLUGIN_REVISION=5
PLUGIN_REVISION=6

View File

@ -17,6 +17,8 @@ XenServer plugin for Fuel @PLUGIN_VERSION@
Machines used to run the OpenStack services. Installation of
XenServer and configuration of these Virtual Machines must be
performed manually.
* File-based storage (EXT / NFS) must be used. If using local storage
then select "Enable thin provisioning" at host installation time
* Each hypervisor must have the same access credentials as Fuel
does not support per-node settings.
* One Virtual Machine, which will be used to run Nova (the compute

View File

@ -222,6 +222,15 @@ def check_host_compatibility(himn, username):
'and product version is %s') % (hotfix, ver))
def check_local_sr(himn, username):
sr_type = ssh(himn, username,
('xe sr-param-get param-name=type uuid=`xe pool-list params=default-SR --minimal`'))
if sr_type != "ext" and sr_type != "nfs":
reportError(('Default SR type should be EXT or NFS. If using local storage, Please make sure thin'
' provisioning is enabled on your host during installation.'))
def install_xenapi_sdk():
"""Install XenAPI Python SDK"""
execute('cp', 'XenAPI.py', DIST_PACKAGES_DIR)
@ -486,6 +495,7 @@ if __name__ == '__main__':
if username and password and endpoints and himn_local:
ssh_copy_id(HIMN_IP, username, password)
check_host_compatibility(HIMN_IP, username)
check_local_sr(HIMN_IP, username)
route_to_compute(endpoints, HIMN_IP, himn_local, username)
if install_xapi:
install_suppack(HIMN_IP, username)