aboutsummaryrefslogtreecommitdiffstats
path: root/deploy/adapters/ansible/roles/open-contrail/tasks/provision
diff options
context:
space:
mode:
authorchenshuai@huawei.com <chenshuai@huawei.com>2016-01-16 16:51:54 +0800
committerchenshuai@huawei.com <chenshuai@huawei.com>2016-01-16 16:51:54 +0800
commit4113bc2656c86f6057dcf3bc5f18ac1e3619fd45 (patch)
tree6087160dbbdfae0d23fe7b739cede2e549298ad6 /deploy/adapters/ansible/roles/open-contrail/tasks/provision
parent717887c33a1abdb47bf4cf1e927c7a8b02fd63bd (diff)
bugfix: opencontrail neutron and nova plugins code
JIRA: COMPASS-274 Change-Id: I6ee4b9fac51a0fc5f4ac9916ea16ab9d363ec943 Signed-off-by: chenshuai@huawei.com <chenshuai@huawei.com>
Diffstat (limited to 'deploy/adapters/ansible/roles/open-contrail/tasks/provision')
-rw-r--r--deploy/adapters/ansible/roles/open-contrail/tasks/provision/.provision-compute.yml.swpbin0 -> 16384 bytes
-rwxr-xr-xdeploy/adapters/ansible/roles/open-contrail/tasks/provision/provision-compute.yml26
-rwxr-xr-xdeploy/adapters/ansible/roles/open-contrail/tasks/provision/provision-config.yml23
3 files changed, 49 insertions, 0 deletions
diff --git a/deploy/adapters/ansible/roles/open-contrail/tasks/provision/.provision-compute.yml.swp b/deploy/adapters/ansible/roles/open-contrail/tasks/provision/.provision-compute.yml.swp
new file mode 100644
index 00000000..41980448
--- /dev/null
+++ b/deploy/adapters/ansible/roles/open-contrail/tasks/provision/.provision-compute.yml.swp
Binary files differ
diff --git a/deploy/adapters/ansible/roles/open-contrail/tasks/provision/provision-compute.yml b/deploy/adapters/ansible/roles/open-contrail/tasks/provision/provision-compute.yml
index 4fbff0b7..c8db15b6 100755
--- a/deploy/adapters/ansible/roles/open-contrail/tasks/provision/provision-compute.yml
+++ b/deploy/adapters/ansible/roles/open-contrail/tasks/provision/provision-compute.yml
@@ -165,6 +165,32 @@
with_items:
- { section: "DEFAULT", option: "network_api_class", value: "nova_contrail_vif.contrailvif.ContrailNetworkAPI" }
+
+
+#################################################
+########### nova plugin workaround ############
+#################################################
+
+- name: "copy nova plugs on compute"
+ template:
+ src: "nova_contrail_vif.tar.gz"
+ dest: "/opt/nova_contrail_vif.tar.gz"
+
+- name: "unzip nova plugs"
+ command: su -s /bin/sh -c "tar xzf /opt/nova_contrail_vif.tar.gz -C /opt/"
+
+- name: "remove original nova plugs"
+ shell: rm -rf /usr/lib/python2.7/dist-packages/nova_contrail_vif/
+
+- name: "use new neutron plugs"
+ shell: mv /opt/nova_contrail_vif/ /usr/lib/python2.7/dist-packages/nova_contrail_vif/
+
+#################################################
+
+
+
+
+
- name: "restart nova compute"
service:
name: "nova-compute"
diff --git a/deploy/adapters/ansible/roles/open-contrail/tasks/provision/provision-config.yml b/deploy/adapters/ansible/roles/open-contrail/tasks/provision/provision-config.yml
index 943214fd..99a18dba 100755
--- a/deploy/adapters/ansible/roles/open-contrail/tasks/provision/provision-config.yml
+++ b/deploy/adapters/ansible/roles/open-contrail/tasks/provision/provision-config.yml
@@ -229,6 +229,29 @@
state: "restarted"
+
+###########################################################
+############# neutron plugins workaround ##################
+###########################################################
+
+- name: "copy neutron plugs on controller"
+ template:
+ src: "neutron_plugin_contrail.tar.gz"
+ dest: "/opt/neutron_plugin_contrail.tar.gz"
+
+- name: "unzip neutron plugs"
+ command: su -s /bin/sh -c "tar xzf /opt/neutron_plugin_contrail.tar.gz -C /opt/"
+
+- name: "remove original neutron plugs"
+ shell: rm -rf /usr/lib/python2.7/dist-packages/neutron_plugin_contrail/
+
+- name: "use new neutron plugs"
+ shell: mv /opt/neutron_plugin_contrail/ /usr/lib/python2.7/dist-packages/neutron_plugin_contrail/
+
+###########################################################
+
+
+
- name: "restart neutron-server"
service:
name: "neutron-server"