Skip to content

Instantly share code, notes, and snippets.

@danehans
Last active April 18, 2016 18:42
Show Gist options
  • Select an option

  • Save danehans/a1d119071441f49104faac0e54cf4440 to your computer and use it in GitHub Desktop.

Select an option

Save danehans/a1d119071441f49104faac0e54cf4440 to your computer and use it in GitHub Desktop.
kolla_deploy
TASK: [prechecks | Checking if '/run' mount flag is set to 'shared'] **********
failed: [localhost] => {"changed": false, "cmd": ["awk", "$5 == \"/run\" {print $7}", "/proc/self/mountinfo"], "delta": "0:00:00.004519", "end": "2016-04-18 18:14:39.523014", "failed": true, "failed_when_result": true, "rc": 0, "start": "2016-04-18 18:14:39.518495", "stdout_lines": ["-"], "warnings": []}
stdout: -
FATAL: all hosts have already failed -- aborting
PLAY RECAP ********************************************************************
to retry, use: --limit @/root/prechecks.retry
localhost : ok=59 changed=0 unreachable=0 failed=1
Command failed ansible-playbook -i /usr/local/share/kolla/ansible/inventory/all-in-one -e @/etc/kolla/globals.yml -e @/etc/kolla/passwords.yml -e CONFIG_DIR=/etc/kolla /usr/local/share/kolla/ansible/prechecks.yml
root@k03-13:~/kolla# cat /usr/local/share/kolla/ansible/prechecks.yml
---
- hosts: all
roles:
- prechecks
root@k03-13:~/kolla# cat /usr/local/share/kolla/ansible/inventory/all-in-one
# These initial groups are the only groups required to be modified. The
# additional groups are for more control of the environment.
[control]
localhost ansible_connection=local
[network]
localhost ansible_connection=local
[compute]
localhost ansible_connection=local
[storage]
localhost ansible_connection=local
# You can explicitly specify which hosts run each project by updating the
# groups in the sections below. Common services are grouped together.
[kibana:children]
control
[elasticsearch:children]
control
[haproxy:children]
network
[mariadb:children]
control
[rabbitmq:children]
control
[mongodb:children]
control
[keystone:children]
control
[glance:children]
control
[nova:children]
control
[neutron:children]
network
[cinder:children]
control
[memcached:children]
control
[horizon:children]
control
[swift:children]
control
[heat:children]
control
[murano:children]
control
[ceph-mon:children]
control
[ceph-rgw:children]
control
[ceph-osd:children]
storage
[ironic:children]
control
[magnum:children]
control
[mistral:children]
control
[manila:children]
control
# Additional control implemented here. These groups allow you to control which
# services run on which hosts at a per-service level.
#
# Word of caution: Some services are required to run on the same host to
# function appropriately. For example, neutron-metadata-agent must run on the
# same host as the l3-agent and (depending on configuration) the dhcp-agent.
# Glance
[glance-api:children]
glance
[glance-registry:children]
glance
# Nova
[nova-api:children]
nova
[nova-conductor:children]
nova
[nova-consoleauth:children]
nova
[nova-novncproxy:children]
nova
[nova-scheduler:children]
nova
[nova-spicehtml5proxy:children]
nova
[nova-compute-ironic:children]
nova
# Neutron
[neutron-server:children]
neutron
[neutron-dhcp-agent:children]
neutron
[neutron-l3-agent:children]
neutron
[neutron-metadata-agent:children]
neutron
# Cinder
[cinder-api:children]
cinder
[cinder-backup:children]
storage
[cinder-scheduler:children]
cinder
[cinder-volume:children]
storage
# Manila
[manila-api:children]
manila
[manila-scheduler:children]
manila
[manila-share:children]
storage
# Swift
[swift-proxy-server:children]
swift
[swift-account-server:children]
storage
[swift-container-server:children]
storage
[swift-object-server:children]
storage
# Heat
[heat-api:children]
heat
[heat-api-cfn:children]
heat
[heat-engine:children]
heat
# Murano
[murano-api:children]
murano
[murano-engine:children]
murano
# Ironic
[ironic-api:children]
ironic
[ironic-conductor:children]
ironic
[ironic-inspector:children]
ironic
[ironic-pxe:children]
ironic
# Magnum
[magnum-api:children]
magnum
[magnum-conductor:children]
magnum
# Mistral
[mistral-api:children]
mistral
[mistral-executor:children]
mistral
[mistral-engine:children]
mistral
cat ansible/roles/prechecks/tasks/service_checks.yml
---
- name: Checking that libvirt is not running
stat: path=/var/run/libvirt/libvirt-sock
register: result
failed_when: result.stat.exists
when: inventory_hostname in groups['compute']
- name: Checking Docker version
command: docker version
register: result
changed_when: false
failed_when: result | failed
or (result.stdout | from_yaml).Server.Version | regex_replace('(\\d+\\.\\d+\\.\\d+).*', '\\1') | version_compare(docker_version_min, '<')
#- name: Checking if 'MountFlags' in /lib/systemd/system/docker.service is set to 'shared' in RedHat family
# command: cat /lib/systemd/system/docker.service
# register: result
# changed_when: false
# failed_when: result.stdout.find('MountFlags=shared') == -1
# when:
# - (inventory_hostname in groups['neutron-dhcp-agent']
# or inventory_hostname in groups['neutron-l3-agent']
# or inventory_hostname in groups['neutron-metadata-agent'])
# - ansible_os_family == 'RedHat'
#- name: Checking if 'MountFlags' in /etc/systemd/system/docker.service is set to 'shared' in Ubuntu
# command: cat /etc/systemd/system/docker.service
# register: result
# changed_when: false
# failed_when: result.stdout.find('MountFlags=shared') == -1
# when:
# - (inventory_hostname in groups['neutron-dhcp-agent']
# or inventory_hostname in groups['neutron-l3-agent']
# or inventory_hostname in groups['neutron-metadata-agent'])
# - ansible_distribution == 'Ubuntu' and ansible_distribution_release > 'trusty'
#- name: Checking if '/run' mount flag is set to 'shared'
# command: awk '$5 == "/run" {print $7}' /proc/self/mountinfo
# register: result
# changed_when: false
# failed_when: result.stdout.find('shared') == -1
# when:
# - (inventory_hostname in groups['neutron-dhcp-agent']
# or inventory_hostname in groups['neutron-l3-agent']
# or inventory_hostname in groups['neutron-metadata-agent'])
# - ansible_distribution == 'Ubuntu' and ansible_distribution_release == 'trusty'
- name: Checking empty passwords in passwords.yml. Run kolla-genpwd if this task fails
local_action: command grep '^[^#].*:\s*$' "{{ CONFIG_DIR }}/passwords.yml"
register: result
changed_when: false
failed_when: result.stdout | regex_replace('(.*nova_ssh_key.*)', '') | search(":")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment