Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1645134

Summary: Deploy failed when enabling external ceph support
Product: Red Hat OpenStack Reporter: Lars Kellogg-Stedman <lars>
Component: rhosp-directorAssignee: RHOS Maint <rhos-maint>
Status: CLOSED DUPLICATE QA Contact: Gurenko Alex <agurenko>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 13.0 (Queens)CC: dbecker, gfidente, johfulto, jslagle, lars, mburns, morazi
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-11-14 14:41:53 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Lars Kellogg-Stedman 2018-11-01 13:15:27 UTC
When deploying with:

  resource_registry:
    OS::TripleO::Services::CephExternal: /usr/share/openstack-tripleo-heat-templates/docker/services/ceph-ansible/ceph-external.yaml

The deploy fails with:

  2018-11-01 12:11:15Z [overcloud.AllNodesDeploySteps.WorkflowTasks_Step2_Execution]: CREATE_IN_PROGRESS  state changed
  2018-11-01 12:11:55Z [overcloud.AllNodesDeploySteps.WorkflowTasks_Step2_Execution]: CREATE_FAILED  resources.WorkflowTasks_Step2_Execution: ERROR
  2018-11-01 12:11:56Z [overcloud.AllNodesDeploySteps]: CREATE_FAILED  Resource CREATE failed: resources.WorkflowTasks_Step2_Execution: ERROR
  2018-11-01 12:11:56Z [overcloud.AllNodesDeploySteps]: CREATE_FAILED  resources.AllNodesDeploySteps: Resource CREATE failed: resources.WorkflowTasks_Step2_Execution: ERROR
  2018-11-01 12:11:56Z [overcloud]: CREATE_FAILED  Resource CREATE failed: resources.AllNodesDeploySteps: Resource CREATE failed: resources.WorkflowTasks_Step2_Execution: ERROR

   Stack overcloud CREATE_FAILED

The deploy succeeds with an otherwise identical configuration and using:

  resource_registry:
    OS::TripleO::Services::CephExternal: /usr/share/openstack-tripleo-heat-templates/puppet/services/ceph-external.yaml                                                                        

I thought we were supposed to use the former, rather than the latter.  After the failed deploy, I am unable to find additional information on the error.  I've looked in the mistral logs and in /var/lib/heat-config/deployed on all the overcloud hosts.

Templates and environment files are all available at:

  https://github.com/CCI-MOC/rhosp-director-config/tree/new-kaizen

The initial deploy command is:

  https://github.com/CCI-MOC/rhosp-director-config/blob/new-kaizen/overcloud-deploy.sh

The external ceph configuration is primarily contained in:

  https://github.com/CCI-MOC/rhosp-director-config/blob/new-kaizen/templates/ceph-external.yaml

Comment 1 Lars Kellogg-Stedman 2018-11-02 18:09:55 UTC
This may be a dupe of https://bugzilla.redhat.com/show_bug.cgi?id=1546371, but I'm not sure.

Comment 2 John Fulton 2018-11-07 13:26:18 UTC
I understand that you're using pre-deployed servers. 

Did exporting OVERCLOUD_HOSTS and running enable-ssh-admin.sh before deploying resolve the issue? 

[1] For example:

export OVERCLOUD_HOSTS="192.168.1.8 192.168.1.42"
bash /usr/share/openstack-tripleo-heat-templates/deployed-server/scripts/enable-ssh-admin.sh

Comment 3 Lars Kellogg-Stedman 2018-11-07 13:31:49 UTC
> and running enable-ssh-admin.sh before deploying resolve the issue? 

I haven't been able to test this yet; because of the earlier problems we've deployed using openstack-tripleo-heat-templates/puppet/services/ceph-external.yaml.  I assume that I cannot safely switch to using openstack-tripleo-heat-templates/docker/services/ceph-ansible/ceph-external.yaml with a stack update, which means I need to wait for an opportunity to do a full re-deploy.  Let me know if I am mistaken in that assumption.

Comment 4 Giulio Fidente 2018-11-07 13:53:45 UTC
(In reply to Lars Kellogg-Stedman from comment #3)
> > and running enable-ssh-admin.sh before deploying resolve the issue? 
> 
> I haven't been able to test this yet; because of the earlier problems we've
> deployed using
> openstack-tripleo-heat-templates/puppet/services/ceph-external.yaml.  I
> assume that I cannot safely switch to using
> openstack-tripleo-heat-templates/docker/services/ceph-ansible/ceph-external.
> yaml with a stack update, which means I need to wait for an opportunity to
> do a full re-deploy.  Let me know if I am mistaken in that assumption.

switching from puppet to ceph-ansible with a stack update should actually work for external Ceph deployments

Comment 5 Lars Kellogg-Stedman 2018-11-07 16:29:04 UTC
When enabling ceph-ansible:

    -  OS::TripleO::Services::CephExternal: /usr/share/openstack-tripleo-heat-templates/puppet/services/ceph-external.yaml
    +  OS::TripleO::Services::CephExternal: /usr/share/openstack-tripleo-heat-templates/docker/services/ceph-ansible/ceph-external.yaml

The stack update fails with:

    2018-11-07 15:59:38Z [overcloud-AllNodesDeploySteps-orpuuizd5xal.WorkflowTasks_Step2_Execution]: CREATE_FAILED  resources.WorkflowTasks_Step2_Execution: ERROR
    2018-11-07 15:59:38Z [overcloud-AllNodesDeploySteps-orpuuizd5xal]: UPDATE_FAILED  Resource CREATE failed: resources.WorkflowTasks_Step2_Execution: ERROR
    2018-11-07 15:59:39Z [AllNodesDeploySteps]: UPDATE_FAILED  resources.AllNodesDeploySteps: Resource CREATE failed: resources.WorkflowTasks_Step2_Execution: ERROR
    2018-11-07 15:59:39Z [overcloud]: UPDATE_FAILED  Resource UPDATE failed: resources.AllNodesDeploySteps: Resource CREATE failed: resources.WorkflowTasks_Step2_Execution: ERROR

     Stack overcloud UPDATE_FAILED

    overcloud.AllNodesDeploySteps.WorkflowTasks_Step2_Execution:
      resource_type: OS::TripleO::WorkflowSteps
      physical_resource_id: a56a3276-651b-4ba9-80ab-b201549f7101
      status: CREATE_FAILED
      status_reason: |
        resources.WorkflowTasks_Step2_Execution: ERROR
    Heat Stack update failed.
    Heat Stack update failed.

In mistral engine.log I see:

    2018-11-07 10:59:37.243 14181 INFO workflow_trace [req-12be969e-4c9f-48c8-9521-b5f084e72445 c424161fc5c74afdab621c35c5a361f2 dbf7e0522d59438a936b0ccc0527b44a - default default] Workflow 'trip
    leo.overcloud.workflow_tasks.step2' [RUNNING -> ERROR, msg=Failure caused by error in tasks: ceph_base_ansible_workflow

      ceph_base_ansible_workflow [task_ex_id=6391a9bb-2d50-417a-8743-580205f777f3] -> Failure caused by error in tasks: restore_fetch_directory

      restore_fetch_directory [task_ex_id=2c2c1c95-c418-4a0f-8214-45ae392c4b24] -> {msg: 0 objects found in container: overcloud_ceph_ansible_fetch_dir but one object was expected.}
        [action_ex_id=bb238f30-dfa9-4ef1-9919-e55cf74b6771, idx=0]: {u'msg': u'0 objects found in container: overcloud_ceph_ansible_fetch_dir but one object was expected.'}

        [wf_ex_id=f972e6fc-c93d-499d-ac97-bb0975200748, idx=0]: Failure caused by error in tasks: restore_fetch_directory

      restore_fetch_directory [task_ex_id=2c2c1c95-c418-4a0f-8214-45ae392c4b24] -> {msg: 0 objects found in container: overcloud_ceph_ansible_fetch_dir but one object was expected.}
        [action_ex_id=bb238f30-dfa9-4ef1-9919-e55cf74b6771, idx=0]: {u'msg': u'0 objects found in container: overcloud_ceph_ansible_fetch_dir but one object was expected.'}

    ] (execution_id=a56a3276-651b-4ba9-80ab-b201549f7101)


Does this point at a particular problem?

Comment 6 John Fulton 2018-11-12 15:06:04 UTC
Lars,

Please follow this procedure to address the issue you ran into in comment #5:

 https://access.redhat.com/solutions/3676921

Once you have a ceph-ansible fetch directory in swift the deployment should proceed.

  John

Comment 7 John Fulton 2018-11-12 15:38:15 UTC
(In reply to Giulio Fidente from comment #4)
> (In reply to Lars Kellogg-Stedman from comment #3)
> > > and running enable-ssh-admin.sh before deploying resolve the issue? 
> > 
> > I haven't been able to test this yet; because of the earlier problems we've
> > deployed using
> > openstack-tripleo-heat-templates/puppet/services/ceph-external.yaml.  I
> > assume that I cannot safely switch to using
> > openstack-tripleo-heat-templates/docker/services/ceph-ansible/ceph-external.
> > yaml with a stack update, which means I need to wait for an opportunity to
> > do a full re-deploy.  Let me know if I am mistaken in that assumption.
> 
> switching from puppet to ceph-ansible with a stack update should actually
> work for external Ceph deployments

The above is true, though we should add "and provided you manually create a fetch directory". I've created a BZ to track if this situation can be improved.

https://bugzilla.redhat.com/show_bug.cgi?id=1648968

Comment 8 Lars Kellogg-Stedman 2018-11-12 18:47:08 UTC
At John's suggestion, I've tried applying the following changes to /usr/share/openstack-tripleo-common/workbooks/ceph-ansible.yaml and running `mistral workbook-update`.  I'm currently running a stack update to see if that allows the deploy to succeed.

diff --git a/usr/share/openstack-tripleo-common/workbooks/ceph-ansible.yaml b/ceph-ansible.yaml
index 9c64858..5898920 100644
--- a/usr/share/openstack-tripleo-common/workbooks/ceph-ansible.yaml
+++ b/ceph-ansible.yaml
@@ -27,10 +27,6 @@ workflows:
     tags:
       - tripleo-common-managed
     tasks:
-      set_swift_container:
-        publish:
-          swift_container: <% concat(env().get('heat_stack_name', ''), '_', $.swift_container) %>
-        on-complete: collect_puppet_hieradata
       collect_puppet_hieradata:
         on-success: check_hieradata
         publish:
@@ -72,19 +68,6 @@ workflows:
         action: tripleo.files.make_temp_dir
         publish:
           fetch_directory: <% task().result.path %>
-        on-success: verify_container_exists
-      verify_container_exists:
-        action: swift.head_container container=<% $.swift_container %>
-        on-success: restore_fetch_directory
-        on-error: create_container
-      restore_fetch_directory:
-        action: tripleo.files.restore_temp_dir_from_swift
-        input:
-          container: <% $.swift_container %>
-          path: <% $.fetch_directory %>
-        on-success: collect_nodes_uuid
-      create_container:
-        action: swift.put_container container=<% $.swift_container %>
         on-success: collect_nodes_uuid
       collect_nodes_uuid:
         action: tripleo.ansible-playbook
@@ -182,13 +165,6 @@ workflows:
             ireallymeanit: 'yes'
         publish:
           output: <% task().result %>
-        on-complete: save_fetch_directory
-      save_fetch_directory:
-        action: tripleo.files.save_temp_dir_to_swift
-        input:
-          container: <% $.swift_container %>
-          path: <% $.fetch_directory %>
-        on-success: purge_fetch_directory
       purge_fetch_directory:
         action: tripleo.files.remove_temp_dir path=<% $.fetch_directory %>
         on-success: remove_ceph_osd_package_from_baremetal
@@ -210,4 +186,4 @@ workflows:
               gather_facts: no
               tasks:
                 - name: Remove ceph-ods from baremetal
-                  yum: name=ceph-osd state=absent
\ No newline at end of file
+                  yum: name=ceph-osd state=absent

Comment 9 John Fulton 2018-11-14 14:37:50 UTC
(In reply to Lars Kellogg-Stedman from comment #8)
> At John's suggestion, I've tried applying the following changes to
> /usr/share/openstack-tripleo-common/workbooks/ceph-ansible.yaml and running
> `mistral workbook-update`.  I'm currently running a stack update to see if
> that allows the deploy to succeed.

As per our conversation in IRC I understand that your deployment did succeed after doing the above. I found a simpler workaround and updated the bug we made to track not having to do the workaround with more details. 

 https://bugzilla.redhat.com/show_bug.cgi?id=1648968

Comment 10 John Fulton 2018-11-14 14:41:53 UTC
It seems there were two issues in this bug. 

1. The first could have been avoided had this docbug been completed 1546371 so I'm marking this as a duplicate of that bug. 

2. The second is being tracked in 1648968. 

As we have trackers for both issues I'm closing this one.

*** This bug has been marked as a duplicate of bug 1546371 ***