Use undercloud.qcow2 for UC in aarch64 71/65171/6
authorCharalampos Kominos <Charalampos.Kominos@enea.com>
Fri, 16 Nov 2018 12:00:05 +0000 (13:00 +0100)
committerCharalampos Kominos <Charalampos.Kominos@enea.com>
Thu, 22 Nov 2018 11:31:35 +0000 (12:31 +0100)
Commit 1817e62 introduced a side effect for aarch64.
The undercloud and overcloud images are not the same for aarch64
due to differences in the partition table and they are not provided by RH
or tripleo. Helper scripts to build them are in this repository.

For aarch64 undercloud.qcow2,overcloud.tar and ironic-python-agent.tar
Are required.

Change-Id: Ia79de801e3cb33bbcc78cdc714cb1745c1b57d6b
Signed-off-by: Charalampos Kominos <Charalampos.Kominos@enea.com>
apex/deploy.py

index 670fb6b..bb011f9 100644 (file)
@@ -395,7 +395,10 @@ def main():
         args.image_dir = os.path.join(args.image_dir, os_version)
         upstream_url = constants.UPSTREAM_RDO.replace(
             constants.DEFAULT_OS_VERSION, os_version)
+
         upstream_targets = ['overcloud-full.tar', 'ironic-python-agent.tar']
+        if platform.machine() == 'aarch64':
+            upstream_targets.append('undercloud.qcow2')
         utils.fetch_upstream_and_unpack(args.image_dir, upstream_url,
                                         upstream_targets,
                                         fetch=not args.no_fetch)
@@ -406,7 +409,10 @@ def main():
         for tmp_file in UC_DISK_FILES:
             shutil.copyfile(os.path.join(args.image_dir, tmp_file),
                             os.path.join(APEX_TEMP_DIR, tmp_file))
-        sdn_image = os.path.join(args.image_dir, 'overcloud-full.qcow2')
+        if platform.machine() == 'aarch64':
+            sdn_image = os.path.join(args.image_dir, 'undercloud.qcow2')
+        else:
+            sdn_image = os.path.join(args.image_dir, 'overcloud-full.qcow2')
         # copy undercloud so we don't taint upstream fetch
         uc_image = os.path.join(args.image_dir, 'undercloud_mod.qcow2')
         uc_fetch_img = sdn_image
@@ -486,8 +492,12 @@ def main():
                            opnfv_env, net_env_target, APEX_TEMP_DIR)
         if not args.virtual:
             oc_deploy.LOOP_DEVICE_SIZE = "50G"
+        if platform.machine() == 'aarch64':
+            oc_image = os.path.join(args.image_dir, 'overcloud-full.qcow2')
+        else:
+            oc_image = sdn_image
         patched_containers = oc_deploy.prep_image(
-            deploy_settings, net_settings, sdn_image, APEX_TEMP_DIR,
+            deploy_settings, net_settings, oc_image, APEX_TEMP_DIR,
             root_pw=root_pw, docker_tag=tag, patches=patches['overcloud'])
 
         oc_deploy.create_deploy_cmd(deploy_settings, net_settings, inventory,