Correct emergency file reference in launch script

The launch script is referring to the wrong path for the emergency
inventory. Also correct the references in the sysadmin guide and
update the example for using it.

Change-Id: I80bdbd440ec451bcd6fb1a3eb552ffda32407c44
This commit is contained in:
Jeremy Stanley 2019-07-26 14:55:32 +00:00
parent 4b092eaed7
commit 4c04ad5436
2 changed files with 12 additions and 9 deletions

View File

@ -468,12 +468,12 @@ expected. Globs, group names and server UUIDs should all be acceptable input.
If you need to disable a host immediately without waiting for a patch to land If you need to disable a host immediately without waiting for a patch to land
to `system-config`, there is a file on the bridge host, to `system-config`, there is a file on the bridge host,
`/etc/ansible/hosts/emergency` that can be edited directly. `/etc/ansible/hosts/emergency.yaml` that can be edited directly.
`/etc/ansible/hosts/emergency` is a file that should normally be empty, but `/etc/ansible/hosts/emergency.yaml` is a file that should normally be empty,
the contents are not managed by puppet. It's purpose is to allow for disabling but the contents are not managed by puppet. It's purpose is to allow for
puppet at times when landing a change to the puppet repo would be either disabling puppet at times when landing a change to the puppet repo would be
unreasonable or impossible. either unreasonable or impossible.
There are two sections in the emergency file, `disabled` and There are two sections in the emergency file, `disabled` and
`disabled:children`. To disable a single host, put it in `disabled`. If you `disabled:children`. To disable a single host, put it in `disabled`. If you
@ -492,12 +492,15 @@ Examples
To disable an OpenStack instance called `amazing.openstack.org` temporarily To disable an OpenStack instance called `amazing.openstack.org` temporarily
without landing a puppet change, ensure the following is in without landing a puppet change, ensure the following is in
`/etc/ansible/hosts/emergency` `/etc/ansible/hosts/emergency.yaml`
:: ::
[disabled] # Please add an inline comment so we know who added the host and why
amazing.openstack.org plugin: yamlgroup
groups:
disabled:
- foo.opendev.org # 2020-05-23 bob is testing change 654321
To disable a group of hosts in the emergency file, such as all of the pypi To disable a group of hosts in the emergency file, such as all of the pypi
hosts. hosts.

View File

@ -175,7 +175,7 @@ def bootstrap_server(server, key, name, volume_device, keep,
jobdir.inventory_root, jobdir.inventory_root,
'/opt/system-config/inventory/openstack.yaml', '/opt/system-config/inventory/openstack.yaml',
'/opt/system-config/inventory/groups.yaml', '/opt/system-config/inventory/groups.yaml',
'/opt/system-config/inventory/emergency.yaml', '/etc/ansible/hosts/emergency.yaml',
) )
inventory_cmds = [v for e in inventory_list for v in ('-i', e)] inventory_cmds = [v for e in inventory_list for v in ('-i', e)]
ansible_cmd = ['ansible-playbook', '--flush-cache' ] + \ ansible_cmd = ['ansible-playbook', '--flush-cache' ] + \