Fixes upstream deployments 95/47595/4
authorTim Rozet <trozet@redhat.com>
Tue, 21 Nov 2017 16:25:50 +0000 (11:25 -0500)
committerTim Rozet <trozet@redhat.com>
Tue, 28 Nov 2017 16:03:20 +0000 (11:03 -0500)
There was an issue with patching the overcloud where the patch binary is
missing, making it impossible to apply patches.  This change install
patch now on the image.

Also, although deployments were successful, storage was not working.
This is because by default upstream does not apply Ceph OSDs to compute
nodes for hyperconverged Ceph, but we use this as our standard
deployment in Apex.  This patch inserts CephOSD into the default Compute
role.  Note: we normally override role's services in regular Apex
deployments so we do not hit this issue there.

Change-Id: I5bddda4784dc00148395863ae0990343a4159602
Signed-off-by: Tim Rozet <trozet@redhat.com>
apex/builders/common_builder.py
apex/tests/test_apex_common_builder.py
lib/ansible/playbooks/deploy_overcloud.yml

index 101860c..fd3bcc3 100644 (file)
@@ -47,7 +47,7 @@ def add_upstream_patches(patches, image, tmp_dir,
     in patch)
     :return: None
     """
-    virt_ops = list()
+    virt_ops = [{con.VIRT_INSTALL: 'patch'}]
     logging.debug("Evaluating upstream patches:\n{}".format(patches))
     for patch in patches:
         assert isinstance(patch, dict)
@@ -73,7 +73,7 @@ def add_upstream_patches(patches, image, tmp_dir,
                                                         image))
         else:
             logging.info("Ignoring patch:\n{}".format(patch))
-    if virt_ops:
+    if len(virt_ops) > 1:
         virt_utils.virt_customize(virt_ops, image)
 
 
index d042d2b..c32f72c 100644 (file)
@@ -58,6 +58,7 @@ class TestCommonBuilder(unittest.TestCase):
         patch_file = "{}.patch".format(change_id)
         patch_file_path = "/dummytmp/{}".format(patch_file)
         test_virt_ops = [
+            {con.VIRT_INSTALL: 'patch'},
             {con.VIRT_UPLOAD: "{}:{}".format(patch_file_path,
                                              project_path)},
             {con.VIRT_RUN_CMD: "cd {} && patch -p1 < {}".format(
index 8acfa76..4d55c8f 100644 (file)
         state: restarted
         enabled: yes
       become: yes
+    - name: Insert Ceph OSDs into Compute role
+      lineinfile:
+        path: /usr/share/openstack-tripleo-heat-templates/roles_data.yaml
+        insertbefore: 'OS::TripleO::Services::NovaCompute'
+        line: '    - OS::TripleO::Services::CephOSD'
+        owner: root
+        group: root
+      become: yes
     - name: Upload glance images
       shell: "{{ stackrc }} && openstack overcloud image upload"
       become: yes