Description of problem: Persistent volumes are created before storage classes. This causes playbooks to be run twice. Version-Release number of the following components: rpm -q openshift-ansible openshift-ansible-3.9.14-1.git.3.c62bc34.el7.noarch rpm -q ansible ansible-2.4.3.0-1.el7ae.noarch ansible --version ansible 2.4.3.0 config file = /root/git/openshift-ansible-contrib-stretch/reference-architecture/vmware-ansible/ansible.cfg configured module search path = [u'/root/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules'] ansible python module location = /usr/lib/python2.7/site-packages/ansible executable location = /usr/bin/ansible python version = 2.7.5 (default, May 3 2017, 07:55:04) [GCC 4.8.5 20150623 (Red Hat 4.8.5-14)] How reproducible: Steps to Reproduce: 1. Try to provision logging or metrics via storage class during first install run Actual results: Please include the entire output from the last TASK line through the end of output if an error is generated. Is not configured properly until storage class is created. Expected results: Idompotency on playbook runs. Additional info: Please attach logs from ansible-playbook with the -vvv flag
Resolved via: https://github.com/openshift/openshift-ansible/pull/7254/
Verified this bug with openshift-ansible-3.10.0-0.58.0.git.0.d8f6377.el7.noarch, and PASS. Persistent volumes are created after storage classes. PLAY [Create Hosted Resources - openshift_default_storage_class] *************** TASK [Gathering Facts] ********************************************************* Tuesday 05 June 2018 01:55:15 -0400 (0:00:00.062) 0:13:17.978 ********** ok: [qe-jialiu3101-master-etcd-1.0605-t1h.qe.rhcloud.com] TASK [openshift_default_storage_class : Ensure storageclass object] ************ Tuesday 05 June 2018 01:55:16 -0400 (0:00:01.049) 0:13:19.028 ********** changed: [qe-jialiu3101-master-etcd-1.0605-t1h.qe.rhcloud.com] => {"changed": true, "failed": false, "results": {"cmd": "/usr/bin/oc get storageclass standard -o json", "results": [{"apiVersion": "storage.k8s.io/v1", "kind": "StorageClass", "metadata": {"annotations": {"storageclass.beta.kubernetes.io/is-default-class": "true"}, "creationTimestamp": "2018-06-05T05:57:54Z", "name": "standard", "resourceVersion": "1792", "selfLink": "/apis/storage.k8s.io/v1/storageclasses/standard", "uid": "63af7f9c-6885-11e8-8d56-42010af0003c"}, "parameters": {"type": "pd-standard"}, "provisioner": "kubernetes.io/gce-pd", "reclaimPolicy": "Delete", "volumeBindingMode": "Immediate"}], "returncode": 0}, "state": "present"} PLAY [Create Hosted Resources - persistent volumes] **************************** TASK [Gathering Facts] ********************************************************* Tuesday 05 June 2018 01:55:17 -0400 (0:00:01.477) 0:13:20.505 ********** ok: [qe-jialiu3101-master-etcd-1.0605-t1h.qe.rhcloud.com] TASK [openshift_persistent_volumes : Create temp directory for volume definitions] *** Tuesday 05 June 2018 01:55:18 -0400 (0:00:00.930) 0:13:21.436 ********** ok: [qe-jialiu3101-master-etcd-1.0605-t1h.qe.rhcloud.com] => {"changed": false, "cmd": ["mktemp", "-d", "/tmp/openshift-ansible-XXXXXXX"], "delta": "0:00:00.011931", "end": "2018-06-05 01:57:56.319571", "failed": false, "rc": 0, "start": "2018-06-05 01:57:56.307640", "stderr": "", "stderr_lines": [], "stdout": "/tmp/openshift-ansible-T71C8pn", "stdout_lines": ["/tmp/openshift-ansible-T71C8pn"]}