Merge "Fixes Ceph PG calculation"
authorFeng Pan <fpan@redhat.com>
Tue, 19 Jun 2018 14:47:26 +0000 (14:47 +0000)
committerGerrit Code Review <gerrit@opnfv.org>
Tue, 19 Jun 2018 14:47:26 +0000 (14:47 +0000)
apex/deploy.py
lib/ansible/playbooks/deploy_overcloud.yml

index 1e384a6..cbecee8 100644 (file)
@@ -501,7 +501,10 @@ def main():
                               user='stack', tmp_dir=APEX_TEMP_DIR)
             logging.info("Overcloud deployment complete")
         except Exception:
-            logging.error("Deployment Failed.  Please check log")
+            logging.error("Deployment Failed.  Please check deploy log as "
+                          "well as mistral logs in "
+                          "{}".format(os.path.join(APEX_TEMP_DIR,
+                                                   'mistral_logs.tar.gz')))
             raise
         finally:
             os.remove(os.path.join(APEX_TEMP_DIR, 'overcloud-full.qcow2'))
index 53dc699..a9c3b98 100644 (file)
     - block:
         - name: Execute Overcloud Deployment
           shell: "{{ stackrc }} && bash deploy_command"
-
+          become: yes
+          become_user: stack
       rescue:
         - name: Show overcloud failures
           shell: "{{ stackrc }} && openstack stack failures list overcloud --long"
-      become: yes
-      become_user: stack
+          become: yes
+          become_user: stack
+      always:
+        - name: Archive Mistral logs
+          archive:
+            path:
+             - /var/lib/mistral
+             - /var/log/mistral
+            dest: /root/mistral_logs.tar.gz
+          become: yes
+        - name: Fetch mistral logs
+          fetch:
+            src: /root/mistral_logs.tar.gz
+            dest: "{{ apex_temp_dir }}/"
+            flat: yes
+          become: yes
     - name: Show Keystone output
       shell: "{{ overcloudrc }} && {{ item }}"
       when: debug