fultonj / tripleo-ceph-ansible

POC to integrate TripleO and ceph-ansible with Mistral
https://blueprints.launchpad.net/tripleo/+spec/tripleo-ceph-ansible
Apache License 2.0
0 stars 3 forks source link

add --skip-tags to mistral-ansbile-actions to ensure package-install is not run #20

Closed fultonj closed 7 years ago

fultonj commented 7 years ago

ceph-ansible can install packages if they're not there but we don't want it to as TripleO has the packages it needs built into its images. ceph-ansible can skip unwanted packages by running the playbook with:

ansible-playbook --skip-tags package-install ...

Here is a list of the tags available:

(undercloud) [stack@undercloud tripleo-ceph-ansible]$ ansible-playbook /usr/share/ceph-ansible/site-docker.yml.sample --list-tags 
 [WARNING]: provided hosts list is empty, only localhost is available

[DEPRECATION WARNING]: docker is kept for backwards compatibility but usage is discouraged. 
The module documentation details page may explain more about this rationale..
This feature 
will be removed in a future release. Deprecation warnings can be disabled by setting 
deprecation_warnings=False in ansible.cfg.

playbook: /usr/share/ceph-ansible/site-docker.yml.sample

  play #1 (mons,agents,osds,mdss,rgws,nfss,restapis,rbdmirrors,clients,iscsigws,mgrs): mons,agents,osds,mdss,rgws,nfss,restapis,rbdmirrors,clients,iscsigws,mgrs    TAGS: []
      TASK TAGS: []

  play #2 (mons): mons  TAGS: []
      TASK TAGS: [always, package-install, with_pkg]

  play #3 (osds): osds  TAGS: []
      TASK TAGS: [always, package-install, with_pkg]

  play #4 (mdss): mdss  TAGS: []
      TASK TAGS: [always, package-install, with_pkg]

  play #5 (rgws): rgws  TAGS: []
      TASK TAGS: [always, package-install, with_pkg]

  play #6 (nfss): nfss  TAGS: []
      TASK TAGS: [always, package-install, with_pkg]

  play #7 (rbd_mirrors): rbd_mirrors    TAGS: []
      TASK TAGS: [always, package-install, with_pkg]

  play #8 (restapis): restapis  TAGS: []
      TASK TAGS: [always, package-install, with_pkg]

  play #9 (mgrs): mgrs  TAGS: []
      TASK TAGS: [always, package-install, with_pkg]
(undercloud) [stack@undercloud tripleo-ceph-ansible]$ 

E.g. you could avoid this task: https://github.com/ceph/ceph-ansible/blob/2326c5ac63f92b8898b95b379bd1d3df25e35020/roles/ceph-common/tasks/checks/check_mandatory_vars.yml#L12-L23

http://sprunge.us/DBgg

fultonj commented 7 years ago

https://review.openstack.org/#/c/475952/

fultonj commented 7 years ago

I did a test run with https://review.openstack.org/#/c/475952 and skip tags patch is working. Latest ceph-ansible with this tag failed somewhere else though.

TASK [ceph-mon : wait for ceph.client.admin.keyring exists] ********************\
fatal: [192.168.24.19]: FAILED! => {"changed": false, "elapsed": 300, "failed": true, "msg": "Timeout when waiting for file /etc/ceph/ceph.client.admin.keyring"}\
...
192.168.24.13              : ok=1    changed=0    unreachable=0    failed=0   \
192.168.24.17              : ok=1    changed=0    unreachable=0    failed=0   \
192.168.24.18              : ok=1    changed=0    unreachable=0    failed=0   \
192.168.24.19              : ok=38   changed=12   unreachable=0    failed=1   \
192.168.24.22              : ok=1    changed=0    unreachable=0    failed=0   \
192.168.24.8               : ok=1    changed=0    unreachable=0    failed=0   \

The deploy didn't get far...

[root@overcloud-controller-0 ~]# ls /etc/ceph/
ceph.conf  ceph.d  rbdmap
[root@overcloud-controller-0 ~]# 

[root@overcloud-controller-0 ~]# docker ps
Cannot connect to the Docker daemon. Is the docker daemon running on this host?
[root@overcloud-controller-0 ~]# 

sticking with pkg for now

fultonj commented 7 years ago

Changed merged and in workflow