summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHuan Xie <huan.xie@citrix.com>2017-04-11 00:46:54 -0700
committerHuan Xie <huan.xie@citrix.com>2017-04-21 03:32:12 -0700
commit9a2beb2950e455d3f90bf157fbc9e3d7db6bc853 (patch)
treeb26ac98282a1b80d7adfd9e36e471c962a7d49e5
parente50e18ab2a04148506e33ed671714adf6c522044 (diff)
Deprecate XenServer 6.5 on MOS10
We will depracate support of XenServer 6.5 since MOS10, this patch is to implement this via: (1) Add XCP version check in compute_pre_test.py to make sure the minimal XCP version is 2.1.0 (2) Replace the guest tool to xe-guest-utilities_7.0.0-24_all.deb (3) Update related documents to only support XS7.0 and XS7.1 Change-Id: I0a0420d158faf18de3534f501dd2a25d818cc9be
Notes
Notes (review): Code-Review+2: Bob Ball <bob.ball@citrix.com> Code-Review+1: Naichuan Sun <naichuan.sun@citrix.com> Verified+1: Citrix XenServer CI Workflow+1: Jianghua Wang <jianghua.wang@citrix.com> Verified+2: Jenkins Submitted-by: Jenkins Submitted-at: Fri, 21 Apr 2017 16:41:51 +0000 Reviewed-on: https://review.openstack.org/455562 Project: openstack/fuel-plugin-xenserver Branch: refs/heads/master
-rw-r--r--doc/source/description.rst2
-rw-r--r--doc/source/index.rst2
-rw-r--r--doc/source/test-plan.rst4
-rwxr-xr-xplugin_source/deployment_scripts/compute_post_deployment.py19
-rwxr-xr-xplugin_source/deployment_scripts/compute_pre_test.py8
-rw-r--r--plugin_source/deployment_scripts/utils.py8
-rw-r--r--plugin_source/deployment_scripts/xe-guest-utilities_6.5.0-1393_amd64.debbin54758 -> 0 bytes
-rw-r--r--plugin_source/deployment_scripts/xe-guest-utilities_7.0.0-24_all.debbin0 -> 1107266 bytes
-rw-r--r--plugin_source/deployment_tasks.yaml2
9 files changed, 24 insertions, 21 deletions
diff --git a/doc/source/description.rst b/doc/source/description.rst
index 09f8ec9..4396fad 100644
--- a/doc/source/description.rst
+++ b/doc/source/description.rst
@@ -8,7 +8,7 @@ Requirements
8Requirement Version/Comment 8Requirement Version/Comment
9========================= ============================ 9========================= ============================
10Fuel 9.0 10Fuel 9.0
11XenServer 6.5+XS65ESP013, 7.0 and 7.1 11XenServer 7.0 and 7.1
12XenServer plugin for Fuel @PLUGIN_VERSION@ 12XenServer plugin for Fuel @PLUGIN_VERSION@
13========================= ============================ 13========================= ============================
14 14
diff --git a/doc/source/index.rst b/doc/source/index.rst
index a3128db..4912faf 100644
--- a/doc/source/index.rst
+++ b/doc/source/index.rst
@@ -15,7 +15,7 @@ can also be downloaded directly from `citrix.com
15Citrix account. 15Citrix account.
16 16
17Documentation for XenServer can be found on `docs.vmd.citrix.com 17Documentation for XenServer can be found on `docs.vmd.citrix.com
18<http://docs.vmd.citrix.com/XenServer/6.5.0/1.0/en_gb/>`_ and for how 18<http://docs.citrix.com/en-us/xenserver/xenserver-7-0.html>`_ and for how
19XenServer works within OpenStack at docs.openstack.org in the 19XenServer works within OpenStack at docs.openstack.org in the
20`OpenStack Configuration Reference 20`OpenStack Configuration Reference
21<http://docs.openstack.org/juno/config-reference/content/introduction-to-xen.html>`_ 21<http://docs.openstack.org/juno/config-reference/content/introduction-to-xen.html>`_
diff --git a/doc/source/test-plan.rst b/doc/source/test-plan.rst
index 13b3f06..1d44556 100644
--- a/doc/source/test-plan.rst
+++ b/doc/source/test-plan.rst
@@ -67,8 +67,8 @@ https://docs.mirantis.com/openstack/fuel/fuel-9.0/mos-planning-guide.html
67Product compatibility matrix 67Product compatibility matrix
68---------------------------- 68----------------------------
69 69
70The plugin is compatible with MOS 9.0 and XenServer versions 6.5 SP1 70The plugin is compatible with MOS 9.0 and XenServer versions 7.0
71(with hotfix XS65ESP013), 7.0 and 7.1, with all hotfixes applied. 71and 7.1, with all hotfixes applied.
72 72
73 73
74Prerequirements 74Prerequirements
diff --git a/plugin_source/deployment_scripts/compute_post_deployment.py b/plugin_source/deployment_scripts/compute_post_deployment.py
index e71b49f..2c0f0d5 100755
--- a/plugin_source/deployment_scripts/compute_post_deployment.py
+++ b/plugin_source/deployment_scripts/compute_post_deployment.py
@@ -438,12 +438,7 @@ def check_and_setup_ceilometer(himn, username, password):
438 restart_services('ceilometer-polling') 438 restart_services('ceilometer-polling')
439 439
440 440
441def enable_conntrack_service(himn, username, xcp_version): 441def enable_conntrack_service(himn, username):
442 if LooseVersion(xcp_version) < LooseVersion('2.1.0'):
443 # Only support conntrack-tools since XS7.0(XCP2.1.0) and above
444 LOG.info('No need to enable conntrack-tools with XCP %s' % xcp_version)
445 return
446
447 # use conntrack statistic mode, so change conntrackd.conf 442 # use conntrack statistic mode, so change conntrackd.conf
448 if not os.path.exists('/etc/conntrackd/conntrackd.conf.back'): 443 if not os.path.exists('/etc/conntrackd/conntrackd.conf.back'):
449 utils.ssh(himn, username, 444 utils.ssh(himn, username,
@@ -463,14 +458,6 @@ def enable_conntrack_service(himn, username, xcp_version):
463 utils.ssh(himn, username, 'service', 'conntrackd', 'restart') 458 utils.ssh(himn, username, 'service', 'conntrackd', 'restart')
464 459
465 460
466def get_xcp_version(himn, username):
467 xcp_ver = utils.ssh(himn, username,
468 ('xe host-param-get uuid=$(xe host-list --minimal) '
469 'param-name=software-version '
470 'param-key=platform_version'))
471 return xcp_ver
472
473
474if __name__ == '__main__': 461if __name__ == '__main__':
475 install_xenapi_sdk() 462 install_xenapi_sdk()
476 astute = utils.get_astute() 463 astute = utils.get_astute()
@@ -487,7 +474,7 @@ if __name__ == '__main__':
487 474
488 if username and password and endpoints and himn_local: 475 if username and password and endpoints and himn_local:
489 route_to_compute(endpoints, HIMN_IP, himn_local, username) 476 route_to_compute(endpoints, HIMN_IP, himn_local, username)
490 xcp_version = get_xcp_version(HIMN_IP, username) 477 xcp_version = utils.get_xcp_version(HIMN_IP, username)
491 if install_xapi: 478 if install_xapi:
492 install_suppack(HIMN_IP, username, XS_PLUGIN_ISO, xcp_version) 479 install_suppack(HIMN_IP, username, XS_PLUGIN_ISO, xcp_version)
493 enable_linux_bridge(HIMN_IP, username) 480 enable_linux_bridge(HIMN_IP, username)
@@ -504,7 +491,7 @@ if __name__ == '__main__':
504 install_logrotate_script(HIMN_IP, username) 491 install_logrotate_script(HIMN_IP, username)
505 492
506 # enable conntrackd service in Dom0 493 # enable conntrackd service in Dom0
507 enable_conntrack_service(HIMN_IP, username, xcp_version) 494 enable_conntrack_service(HIMN_IP, username)
508 495
509 # neutron-l2-agent in compute node 496 # neutron-l2-agent in compute node
510 modify_neutron_rootwrap_conf(HIMN_IP, username, password) 497 modify_neutron_rootwrap_conf(HIMN_IP, username, password)
diff --git a/plugin_source/deployment_scripts/compute_pre_test.py b/plugin_source/deployment_scripts/compute_pre_test.py
index 83cf9e3..90654b1 100755
--- a/plugin_source/deployment_scripts/compute_pre_test.py
+++ b/plugin_source/deployment_scripts/compute_pre_test.py
@@ -1,5 +1,6 @@
1#!/usr/bin/env python 1#!/usr/bin/env python
2 2
3from distutils.version import LooseVersion
3import json 4import json
4import os 5import os
5import stat 6import stat
@@ -8,6 +9,7 @@ from utils import HIMN_IP
8 9
9XS_RSA = '/root/.ssh/xs_rsa' 10XS_RSA = '/root/.ssh/xs_rsa'
10VERSION_HOTFIXES = '@VERSION_HOTFIXES@' 11VERSION_HOTFIXES = '@VERSION_HOTFIXES@'
12MIN_XCP_VERSION = '2.1.0'
11 13
12utils.setup_logging('compute_pre_test.log') 14utils.setup_logging('compute_pre_test.log')
13LOG = utils.LOG 15LOG = utils.LOG
@@ -38,6 +40,12 @@ def ssh_copy_id(host, username, password):
38 40
39 41
40def check_host_compatibility(himn, username): 42def check_host_compatibility(himn, username):
43 xcp_version = utils.get_xcp_version(himn, username)
44 if LooseVersion(xcp_version) < LooseVersion(MIN_XCP_VERSION):
45 utils.reportError('Platform version %s should equal or greater than %s'
46 % (xcp_version, MIN_XCP_VERSION))
47 return
48
41 version_hotfixes = json.loads(VERSION_HOTFIXES) 49 version_hotfixes = json.loads(VERSION_HOTFIXES)
42 50
43 ver = utils.ssh(himn, username, 51 ver = utils.ssh(himn, username,
diff --git a/plugin_source/deployment_scripts/utils.py b/plugin_source/deployment_scripts/utils.py
index a75c3a7..c90dee2 100644
--- a/plugin_source/deployment_scripts/utils.py
+++ b/plugin_source/deployment_scripts/utils.py
@@ -302,3 +302,11 @@ def add_cron_job(user, job_entry):
302 execute(crontab_cmd, '-u', user, temp_path) 302 execute(crontab_cmd, '-u', user, temp_path)
303 os.close(temp_fd) 303 os.close(temp_fd)
304 os.remove(temp_path) 304 os.remove(temp_path)
305
306
307def get_xcp_version(himn, username):
308 xcp_ver = ssh(himn, username,
309 ('xe host-param-get uuid=$(xe host-list --minimal) '
310 'param-name=software-version '
311 'param-key=platform_version'))
312 return xcp_ver
diff --git a/plugin_source/deployment_scripts/xe-guest-utilities_6.5.0-1393_amd64.deb b/plugin_source/deployment_scripts/xe-guest-utilities_6.5.0-1393_amd64.deb
deleted file mode 100644
index 042686c..0000000
--- a/plugin_source/deployment_scripts/xe-guest-utilities_6.5.0-1393_amd64.deb
+++ /dev/null
Binary files differ
diff --git a/plugin_source/deployment_scripts/xe-guest-utilities_7.0.0-24_all.deb b/plugin_source/deployment_scripts/xe-guest-utilities_7.0.0-24_all.deb
new file mode 100644
index 0000000..7dbdfbb
--- /dev/null
+++ b/plugin_source/deployment_scripts/xe-guest-utilities_7.0.0-24_all.deb
Binary files differ
diff --git a/plugin_source/deployment_tasks.yaml b/plugin_source/deployment_tasks.yaml
index 8f93e83..4a8ce16 100644
--- a/plugin_source/deployment_tasks.yaml
+++ b/plugin_source/deployment_tasks.yaml
@@ -5,7 +5,7 @@
5 requires: ['network_configuration_end'] 5 requires: ['network_configuration_end']
6 type: shell 6 type: shell
7 parameters: 7 parameters:
8 cmd: 'dpkg -i ./xe-guest-utilities_6.5.0-1393_amd64.deb' 8 cmd: 'dpkg -i ./xe-guest-utilities_7.0.0-24_all.deb'
9 timeout: 60 9 timeout: 60
10- id: 'compute-pre-test' 10- id: 'compute-pre-test'
11 version: 2.0.0 11 version: 2.0.0