Skip to content
Snippets Groups Projects
Commit cb73c6b7 authored by Jenkins's avatar Jenkins Committed by Gerrit Code Review
Browse files

Merge "Sanity check for glance"

parents dcb88fa5 aab1bd36
No related branches found
No related tags found
No related merge requests found
......@@ -28,6 +28,7 @@ kolla_external_address: "{{ kolla_internal_address }}"
kolla_enable_sanity_checks: no
kolla_enable_sanity_keystone: "{{ kolla_enable_sanity_checks }}"
kolla_enable_sanity_glance: "{{ kolla_enable_sanity_checks }}"
####################
# Database options
......
---
- name: Glance sanity checks
command: docker exec -t kolla_ansible /usr/bin/ansible localhost
-m kolla_sanity
-a "service=glance
project=service
user=admin
password={{ glance_keystone_password }}
role=admin
region_name={{ openstack_region_name }}
auth={{ '{{ openstack_glance_auth }}' }}"
-e "{'openstack_glance_auth':{{ openstack_glance_auth }}}"
register: glance_sanity
changed_when: "{{ glance_sanity.stdout.find('localhost | SUCCESS => ') != -1 and (glance_sanity.stdout.split('localhost | SUCCESS => ')[1]|from_json).changed }}"
until: glance_sanity.stdout.split()[2] == 'SUCCESS'
retries: 10
delay: 5
run_once: True
when: kolla_enable_sanity_glance | bool
......@@ -19,3 +19,7 @@
- include: start.yml
when: inventory_hostname in groups['glance-api'] or
inventory_hostname in groups['glance-registry']
- include: check.yml
when: inventory_hostname in groups['glance-api'] or
inventory_hostname in groups['glance-registry']
......@@ -14,7 +14,7 @@
register: keystone_sanity
changed_when: "{{ keystone_sanity.stdout.find('localhost | SUCCESS => ') != -1 and (keystone_sanity.stdout.split('localhost | SUCCESS => ')[1]|from_json).changed }}"
until: keystone_sanity.stdout.split()[2] == 'SUCCESS'
retries: 1
retries: 10
delay: 5
run_once: True
when: kolla_enable_sanity_keystone | bool
\ No newline at end of file
......@@ -28,7 +28,11 @@ import shade
class SanityChecks(object):
@staticmethod
def keystone(cloud):
cloud.keystone_client.tenants.list()
[tenant for tenant in cloud.keystone_client.tenants.list()]
@staticmethod
def glance(cloud):
[image for image in cloud.glance_client.images.list()]
def main():
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment