summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apex/builders/overcloud_builder.py3
-rw-r--r--apex/tests/test_apex_overcloud_builder.py2
-rw-r--r--lib/ansible/playbooks/post_deploy_overcloud.yml6
3 files changed, 10 insertions, 1 deletions
diff --git a/apex/builders/overcloud_builder.py b/apex/builders/overcloud_builder.py
index d2a31001..d6f03eb2 100644
--- a/apex/builders/overcloud_builder.py
+++ b/apex/builders/overcloud_builder.py
@@ -42,7 +42,8 @@ def inject_opendaylight(odl_version, image, tmp_dir, uc_ip,
{con.VIRT_UPLOAD: "{}:/etc/puppet/modules/".format(archive)},
{con.VIRT_RUN_CMD: 'rm -rf /etc/puppet/modules/opendaylight'},
{con.VIRT_RUN_CMD: "cd /etc/puppet/modules/ && tar xvf "
- "puppet-opendaylight.tar"}
+ "puppet-opendaylight.tar"},
+ {con.VIRT_INSTALL: "java-1.8.0-openjdk"}
]
if docker_tag:
docker_cmds = [
diff --git a/apex/tests/test_apex_overcloud_builder.py b/apex/tests/test_apex_overcloud_builder.py
index 46b5f871..8bed3d70 100644
--- a/apex/tests/test_apex_overcloud_builder.py
+++ b/apex/tests/test_apex_overcloud_builder.py
@@ -43,6 +43,7 @@ class TestOvercloudBuilder(unittest.TestCase):
{con.VIRT_RUN_CMD: 'rm -rf /etc/puppet/modules/opendaylight'},
{con.VIRT_RUN_CMD: "cd /etc/puppet/modules/ && tar xvf "
"puppet-opendaylight.tar"},
+ {con.VIRT_INSTALL: "java-1.8.0-openjdk"},
{con.VIRT_INSTALL: 'opendaylight'}
]
oc_builder.inject_opendaylight(con.DEFAULT_ODL_VERSION, 'dummy.qcow2',
@@ -65,6 +66,7 @@ class TestOvercloudBuilder(unittest.TestCase):
{con.VIRT_RUN_CMD: 'rm -rf /etc/puppet/modules/opendaylight'},
{con.VIRT_RUN_CMD: "cd /etc/puppet/modules/ && tar xvf "
"puppet-opendaylight.tar"},
+ {con.VIRT_INSTALL: "java-1.8.0-openjdk"},
]
oc_builder.inject_opendaylight('oxygen', 'dummy.qcow2',
'/dummytmp/', uc_ip='192.0.2.2',
diff --git a/lib/ansible/playbooks/post_deploy_overcloud.yml b/lib/ansible/playbooks/post_deploy_overcloud.yml
index af743b29..212d2cfa 100644
--- a/lib/ansible/playbooks/post_deploy_overcloud.yml
+++ b/lib/ansible/playbooks/post_deploy_overcloud.yml
@@ -69,3 +69,9 @@
when:
- "'compute' in ansible_hostname"
- os_version == 'pike'
+ - name: Update ODL container restart policy to always
+ shell: "docker update --restart=always opendaylight_api"
+ become: yes
+ when:
+ - sdn == 'opendaylight'
+ - "'controller' in ansible_hostname"