The ansible "failed_when" filter that uses a registered output
of a previous task piped to the '|failed' filter does not work
as expected. Given the following playbook:
- name: return code
shell: |
echo "fail 2"
exit 2
failed_when: false
log_when: false
register: outputs
- debug:
msg: "rc: {{ outputs.rc }}"
- debug: msg="Broken (does not fail as expected)"
when: outputs is defined
failed_when: outputs|failed
- debug: msg="Working (fails as expected)"
when: outputs is defined
failed_when: outputs.rc != 0
We obtain the following output:
TASK [return code] ****
changed: [localhost]
TASK [debug] **********
ok: [localhost] => {
"msg": "rc: 2"
}
TASK [debug] **********
ok: [localhost] => {
"failed_when_result": false,
"msg": "Broken (does not fail as expected)"
}
TASK [debug] **********
fatal: [localhost]: FAILED! => {
"failed_when_result": true,
"msg": "Working (fails as expected)"
}
This means that the 'outputs|failed' just does not work at all.
Let's move to a more explicit check on the rc code of the registered
variable.
We also need to fix all the "outputs is defined" checks, because
when a task is skipped the registered outputs variable *is* actually
defined as the following dictionary:
{'skip_reason': u'Conditional result was False', 'skipped': True, 'changed': False}
So we use "outputs.rc is defined" in order to make sure that the
previous task did indeed run.
Closes-Bug: #1733402
Change-Id: I6ef53dc3f9aede42f10c7f110d24722355481261
The upgrade of Ceph to Luminous requires a new daemon, ceph-mgr, to be
deployed with every ceph-mon. This submission adds support for the
deployment of ceph-mgr via ceph-ansible.
Change-Id: I4226233d02b70980c6b53518ae2d511b653ce2de
Depends-On: I3645c6c3f68fcefc93fa8699796ba8892aa946c8
Implements: blueprint ceph-luminous
This ensures that the base class is applied, setting the required hash
values in swift.conf properly when deploying a proxy node without the
storage service at the same time.
Closes-Bug: 1732663
Depends-On: I11c044bbc8b9f56f95ace9320cc77303d9a7543e
Change-Id: Id916413c9d74071968d9988b604664fad30282b2
In Ic905f7ed7e7fc9018bc494f77811392045fddfe8, the
addition of logic to confirm os-net-config needs to be run relies
upon the shell command being able to fail. This patch corrects
the Ansible directive "ignore_errors" to be properly stated.
Change-Id: Ie0efdce47dc11f05c436fbacaca6ec22cbe33ca1
Closes-Bug: #1730328
This adds the option to get the barbican API container to log to stdout.
The option is disabled by default. If enabled, It also adds a sidecar
container that reads the apache access logs.
bp logging-stdout-rsyslog
Co-Authored-By: Juan Antonio Osorio Robles <jaosorior@redhat.com>
Change-Id: Ia06fee2826062330a4377ca5fda7e3ba68534af6
We currently do not enable debug for the l3, l2gw or dhcp agent if the
debug flag is set to true. This fixes the templates to support enabling
debug for these agents either via the global Debug setting or a specific
debug setting.
Change-Id: I0a44bfc27b306bfb08dab0656e3362503f07d6b3
Related-Bug: #1731063
Disabled fwaas plugin to prevent deployment crashing with horizon in
continuous restarting state due to missing image.
Change-Id: I44140f04ba793a039f6032739b64794ae7ad084d
Closes-bug: 1732937
These were hardcoded, even though the rest of the network-related bits
were dynamically generated with jinja.
This will end up creating the same entries as before, skipping the VIP
for the Tenant network and the Management network (which is not included
in the default roles). Also, the external network will now have an extra
hiera entry called external_virtual_ip, besides the public_virtual_ip.
They will have the same value, however, external_virtual_ip is
automatically generated as opposed to the public_virtual_ip. Hopefully
we can remove the instance of public_virtual_ip at some point and rely
on the automatically generated entries only.
Change-Id: I7f5285e2936b2158a4a8a5edc97a6a09f891fb1a
Related-Bug: #1732457
Docker services are missing the pre-upgrade validation task
in the upgrade_tasks section which verifies if the service
is running before going on with the upgrade.
Change-Id: I0df382206bd27343455a6ad18fa2df1eea74a1f5
Partial-Bug: #1704389
This adds the option to get the HAProxy container to log to stdout.
The option is disabled by default. If enabled, It also adds a sidecar
container that reads from syslog and outputs what it gets to stdout.
bp logging-stdout-rsyslog
Change-Id: Ica819713aa50352ba04a748c463534d982e00538
This introduces a "sidecar" container, which is meant to be used
besides other containers (or as part of the pod). It merely uses
rsyslog to listen on a specific UNIX socket and outputs what it
gets to stdout.
This adds the service to each relevant role and introduces a
composable service which merely configures the container. Subsequently
it'll be used as part of other templates.
Note that it is only enabled if "stdout logging" is enabled.
bp logging-stdout-rsyslog
Depends-On: I4864ddca223becd0a17f902729cf2e566df5e521
Change-Id: I2c54acaaa820961c936f1fbe304f42162f720496
The Iscsid service uses puppet to update the IQN of each node, so that
all overcloud nodes have a unique IQN. When Iscsid is containerized,
the new IQN is captured in the "puppet-generated" directory, and made
available to other containers using bind mounts.
However, any non-containerized service that uses the IQN will be seeing
the host's value, instead of the new value made available to the
containers. This IQN mismatch between containerized and non-containerized
services will cause failures, typically with authentication.
The problem is resolved by adding a bind mount to Iscsid's puppet_config
that allows the iscsid container to update the host's IQN.
Change-Id: I1cbcb858754cc4792a085438eb28f2476245228c