summaryrefslogtreecommitdiffstats
path: root/playbooks/libvirt/openshift-cluster
diff options
context:
space:
mode:
authorLénaïc Huard <lenaic@lhuard.fr>2015-04-16 00:26:45 +0200
committerLénaïc Huard <lenaic@lhuard.fr>2015-04-16 00:30:04 +0200
commitaaee17b0fc8feddf31d4e5b46a1bfe2f8dabf16b (patch)
tree5afdd45cb977081ec407b34036d607d0cdda18f1 /playbooks/libvirt/openshift-cluster
parent34326ef782bcba8632738a40d3948bb23a3915dc (diff)
downloadopenshift-aaee17b0fc8feddf31d4e5b46a1bfe2f8dabf16b.tar.gz
openshift-aaee17b0fc8feddf31d4e5b46a1bfe2f8dabf16b.tar.bz2
openshift-aaee17b0fc8feddf31d4e5b46a1bfe2f8dabf16b.tar.xz
openshift-aaee17b0fc8feddf31d4e5b46a1bfe2f8dabf16b.zip
Fix libvirt metadata used to store ansible tags
According to https://libvirt.org/formatdomain.html#elementsMetadata , the `metadata` tag can contain only one top-level element per namespace. Because of that, libvirt stored only the `deployment-type-{{ deployment_type }}` tag. As a consequence, the dynamic inventory reported no `env-{{ cluster }}` group. This is problematic for the `terminate.yml` playbook which iterates over `groups['tag-env-{{ cluster-id }}]` The symptom is that `oo_hosts_to_terminate` was not defined. In the end, as Ansible couldn’t iterate on the value of `groups['oo_hosts_to_terminate']`, it iterated on its letters: ``` TASK: [Destroy VMs] *********************************************************** failed: [localhost] => (item=['g', 'destroy']) => {"failed": true, "item": ["g", "destroy"]} msg: virtual machine g not found failed: [localhost] => (item=['g', 'undefine']) => {"failed": true, "item": ["g", "undefine"]} msg: virtual machine g not found failed: [localhost] => (item=['r', 'destroy']) => {"failed": true, "item": ["r", "destroy"]} msg: virtual machine r not found failed: [localhost] => (item=['r', 'undefine']) => {"failed": true, "item": ["r", "undefine"]} msg: virtual machine r not found failed: [localhost] => (item=['o', 'destroy']) => {"failed": true, "item": ["o", "destroy"]} msg: virtual machine o not found failed: [localhost] => (item=['o', 'undefine']) => {"failed": true, "item": ["o", "undefine"]} msg: virtual machine o not found failed: [localhost] => (item=['u', 'destroy']) => {"failed": true, "item": ["u", "destroy"]} msg: virtual machine u not found failed: [localhost] => (item=['u', 'undefine']) => {"failed": true, "item": ["u", "undefine"]} msg: virtual machine u not found failed: [localhost] => (item=['p', 'destroy']) => {"failed": true, "item": ["p", "destroy"]} msg: virtual machine p not found failed: [localhost] => (item=['p', 'undefine']) => {"failed": true, "item": ["p", "undefine"]} msg: virtual machine p not found failed: [localhost] => (item=['s', 'destroy']) => {"failed": true, "item": ["s", "destroy"]} msg: virtual machine s not found failed: [localhost] => (item=['s', 'undefine']) => {"failed": true, "item": ["s", "undefine"]} msg: virtual machine s not found failed: [localhost] => (item=['[', 'destroy']) => {"failed": true, "item": ["[", "destroy"]} msg: virtual machine [ not found failed: [localhost] => (item=['[', 'undefine']) => {"failed": true, "item": ["[", "undefine"]} msg: virtual machine [ not found failed: [localhost] => (item=["'", 'destroy']) => {"failed": true, "item": ["'", "destroy"]} msg: virtual machine ' not found failed: [localhost] => (item=["'", 'undefine']) => {"failed": true, "item": ["'", "undefine"]} msg: virtual machine ' not found failed: [localhost] => (item=['o', 'destroy']) => {"failed": true, "item": ["o", "destroy"]} msg: virtual machine o not found failed: [localhost] => (item=['o', 'undefine']) => {"failed": true, "item": ["o", "undefine"]} msg: virtual machine o not found etc… ```
Diffstat (limited to 'playbooks/libvirt/openshift-cluster')
-rw-r--r--playbooks/libvirt/openshift-cluster/templates/domain.xml10
1 files changed, 6 insertions, 4 deletions
diff --git a/playbooks/libvirt/openshift-cluster/templates/domain.xml b/playbooks/libvirt/openshift-cluster/templates/domain.xml
index 8cb017367..7656249da 100644
--- a/playbooks/libvirt/openshift-cluster/templates/domain.xml
+++ b/playbooks/libvirt/openshift-cluster/templates/domain.xml
@@ -2,10 +2,12 @@
<name>{{ item }}</name>
<memory unit='GiB'>1</memory>
<metadata xmlns:ansible="https://github.com/ansible/ansible">
- <ansible:tag>deployment-type-{{ deployment_type }}</ansible:tag>
- <ansible:tag>env-{{ cluster }}</ansible:tag>
- <ansible:tag>env-host-type-{{ cluster }}-openshift-{{ type }}</ansible:tag>
- <ansible:tag>host-type-{{ type }}</ansible:tag>
+ <ansible:tags>
+ <ansible:tag>deployment-type-{{ deployment_type }}</ansible:tag>
+ <ansible:tag>env-{{ cluster }}</ansible:tag>
+ <ansible:tag>env-host-type-{{ cluster }}-openshift-{{ type }}</ansible:tag>
+ <ansible:tag>host-type-{{ type }}</ansible:tag>
+ </ansible:tags>
</metadata>
<currentMemory unit='GiB'>1</currentMemory>
<vcpu placement='static'>2</vcpu>