Updates and additions to handle aarch64 97/39597/9
authorDan Radez <dradez@redhat.com>
Fri, 18 Aug 2017 14:53:45 +0000 (10:53 -0400)
committerDan Radez <dradez@redhat.com>
Thu, 24 Aug 2017 23:07:31 +0000 (19:07 -0400)
- move patches from x86 only to common virt-customize
- updates to undercloud to configure pxe and external network
- initial updates to overcloud deploy functions

JIRA: APEX-381

Change-Id: I496e196535e63bfd31654d0f501fe3f00fa5ca3f
Signed-off-by: Dan Radez <dradez@redhat.com>
build/overcloud-full.sh
lib/ansible/playbooks/configure_undercloud.yml
lib/ansible/playbooks/deploy_overcloud.yml
lib/ansible/playbooks/undercloud_aarch64.yml

index 71e8dcf..8efe822 100755 (executable)
@@ -69,6 +69,10 @@ LIBGUESTFS_BACKEND=direct virt-customize \
     --upload ${BUILD_ROOT}/patches/neutron_openstackclient_dps.patch:/usr/lib/python2.7/site-packages/ \
     --upload ${BUILD_ROOT}/patches/puppet-neutron-add-sfc.patch:/usr/share/openstack-puppet/modules/neutron/ \
     --upload ${BUILD_ROOT}/patches/congress-parallel-execution.patch:/usr/lib/python2.7/site-packages/ \
+    --upload ${BUILD_ROOT}/patches/puppet-neutron-ml2-ip-version-fix.patch:/usr/share/openstack-puppet/modules/neutron/ \
+    --run-command "cd /usr/share/openstack-puppet/modules/neutron && patch -p1 < puppet-neutron-ml2-ip-version-fix.patch" \
+    --upload ${BUILD_ROOT}/patches/puppet-neutron-vpp-ml2-type_drivers-setting.patch:/usr/share/openstack-puppet/modules/neutron/ \
+    --run-command "cd /usr/share/openstack-puppet/modules/neutron && patch -p1 < puppet-neutron-vpp-ml2-type_drivers-setting.patch" \
     -a overcloud-full_build.qcow2
 
 # apply neutron port data plane status patches
@@ -143,10 +147,6 @@ LIBGUESTFS_BACKEND=direct virt-customize \
     --install python2-networking-sfc \
     --install python-etcd,puppet-etcd \
     --install patch \
-    --upload ${BUILD_ROOT}/patches/puppet-neutron-ml2-ip-version-fix.patch:/usr/share/openstack-puppet/modules/neutron/ \
-    --run-command "cd /usr/share/openstack-puppet/modules/neutron && patch -p1 < puppet-neutron-ml2-ip-version-fix.patch" \
-    --upload ${BUILD_ROOT}/patches/puppet-neutron-vpp-ml2-type_drivers-setting.patch:/usr/share/openstack-puppet/modules/neutron/ \
-    --run-command "cd /usr/share/openstack-puppet/modules/neutron && patch -p1 < puppet-neutron-vpp-ml2-type_drivers-setting.patch" \
     -a overcloud-full_build.qcow2
 
     # upload and install barometer packages
index 7b23662..aa6c960 100644 (file)
       with_items: "{{ ironic_config }}"
     - name: openstack-configs undercloud aarch64
       shell: openstack-config --set undercloud.conf DEFAULT ipxe_enabled false
-      when: "{{ aarch64 }}"
+      when: aarch64
     - lineinfile:
         path: /usr/lib/python2.7/site-packages/ironic/common/pxe_utils.py
         regexp: '_link_ip_address_pxe_configs'
         line: '_link_mac_pxe_configs(task)'
-      when: "{{ aarch64 }}"
+      when: aarch64
     - name: undercloud install
       shell: openstack undercloud install &> apex-undercloud-install.log
       become: yes
       when:
         - external_network.vlan != "native"
         - external_network.enabled
-    - name: assign IP to  native eth2
+    - name: assign IP to native eth2
       shell: ip a a {{ external_network.ip }}/{{ external_network.prefix }} dev eth2
       become: yes
       when:
         - external_network.vlan == "native"
         - external_network.enabled
+        - not aarch64
     - name: bring up eth2
       shell: ip link set up dev eth2
       when:
         - external_network.vlan == "native"
         - external_network.enabled
+        - not aarch64
+      become: yes
+    - name: assign IP to native eth0 if aarch64
+      shell: ip a a {{ external_network.ip }}/{{ external_network.prefix }} dev eth0
+      become: yes
+      when:
+        - external_network.vlan == "native"
+        - external_network.enabled
+        - aarch64
+    - name: bring up eth0 if aarch64
+      shell: ip link set up dev eth0
+      when:
+        - external_network.vlan == "native"
+        - external_network.enabled
+        - aarch64
       become: yes
     - name: fetch storage environment file
       fetch:
index 76bbbc6..3313bc8 100644 (file)
@@ -41,7 +41,7 @@
       shell: "{{ stackrc }} && openstack overcloud node import --provide instackenv.json"
       when: virtual
     - name: Set flavors
-      shell: '{{ stackrc }} && openstack flavor set --property "cpu_arch"="x86_64" {{ item }}'
+      shell: '{{ stackrc }} && openstack flavor set --property "cpu_arch"="{{ ansible_architecture }}" {{ item }}'
       with_items:
         - baremetal
         - control
index 5b607c3..e8b2818 100644 (file)
             mode: 0755
         - copy:
             content: |
-                     set default=master
+                     set default=local
                      set timeout=5
                      set hidden_timeout_quiet=false
-                     menuentry "master"  {
-                     configfile /tftpboot/\\\$net_default_ip.conf
+                     menuentry "local"  {
+                     configfile (hd0,gpt3)/boot/grub2/grub.cfg
                      }
             dest: /tftpboot/EFI/centos/grub.cfg
             mode: 0644
@@ -42,6 +42,7 @@
             state: present
             line: ''
         - shell: "echo 'r ^/EFI/centos/grub.cfg-(.*) /tftpboot/pxelinux.cfg/\\1' | sudo tee --append /tftpboot/map-file"
+        - shell: "echo 'r ^/EFI/centos/grub.cfg /tftpboot/EFI/centos/grub.cfg' | sudo tee --append /tftpboot/map-file"
         - systemd:
             name: xinetd
             state: restarted