openrc: Need for more robust parsing of `juju status` output
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Bundles |
Fix Released
|
Medium
|
Frode Nordahl |
Bug Description
Juju 2.5 adds listing of `storage` and `volumes` to `juju status` output, this means that in some situations our primitive AWK processing of the YAML is not sufficient.
Example scenario:
ubuntu@test:~$ juju status keystone --format yaml
model:
name: default
type: iaas
controller: fnordahl-
cloud: serverstack
region: serverstack
version: 2.5-rc2
model-status:
current: available
since: 09 Jan 2019 10:59:26Z
sla: unsupported
machines:
"8":
juju-status:
current: started
since: 09 Jan 2019 15:18:44Z
version: 2.5-rc2
dns-name: 10.5.0.20
ip-addresses:
- 10.5.0.20
- 252.0.20.1
instance-id: b77add10-
machine-status:
current: running
message: ACTIVE
since: 09 Jan 2019 15:13:24Z
series: bionic
network-
ens3:
- 10.5.0.20
gateway: 10.5.0.1
is-up: true
fan-252:
- 252.0.20.1
is-up: true
constraints: virt-type=kvm
hardware: arch=amd64 cores=2 mem=1536M root-disk=15360M availability-
applications:
keystone:
charm: cs:~openstack-
series: bionic
os: ubuntu
charm-origin: jujucharms
charm-name: keystone
charm-rev: 401
can-upgrade-to: cs:~openstack-
exposed: false
application
current: active
message: Unit is ready
since: 09 Jan 2019 15:25:39Z
relations:
cluster:
- keystone
identity-
- ceilometer
identity-
- gnocchi
shared-db:
- percona-cluster
units:
keystone/0:
current: active
message: Unit is ready
since: 09 Jan 2019 15:25:39Z
current: idle
since: 14 Jan 2019 15:05:06Z
version: 2.5-rc2
leader: true
machine: "8"
open-ports:
- 5000/tcp
version: 13.0.2
endpoint-
admin: ""
certificates: ""
cluster: ""
domain-
ha: ""
identity-
identity-
identity-
identity-
internal: ""
keystone-
nrpe-
public: ""
shared-db: ""
websso-
storage:
storage:
osd-devices/0:
kind: block
life: alive
status:
current: attached
since: 09 Jan 2019 15:13:21Z
persistent: true
attachments:
units:
life: alive
osd-devices/1:
kind: block
life: alive
status:
current: attached
since: 09 Jan 2019 15:13:21Z
persistent: true
attachments:
units:
life: alive
osd-devices/2:
kind: block
life: alive
status:
current: attached
since: 09 Jan 2019 15:13:19Z
persistent: true
attachments:
units:
life: alive
volumes:
"0":
provider-id: 0d946edd-
storage: osd-devices/0
attachments:
machines:
"4":
device: vdd
life: alive
units:
life: alive
pool: cinder
size: 10240
persistent: true
life: alive
status:
current: attached
since: 09 Jan 2019 15:13:21Z
"1":
provider-id: 6d5ad12f-
storage: osd-devices/1
attachments:
machines:
"5":
device: vdd
life: alive
units:
life: alive
pool: cinder
size: 10240
persistent: true
life: alive
status:
current: attached
since: 09 Jan 2019 15:13:21Z
"2":
provider-id: 59b1c25a-
storage: osd-devices/2
attachments:
machines:
"6":
device: vdd
life: alive
units:
life: alive
pool: cinder
size: 10240
persistent: true
life: alive
status:
current: attached
since: 09 Jan 2019 15:13:19Z
controller:
timestamp: 15:08:20Z
ubuntu@test:~$ source src/openstack-
-bash: [: too many arguments
Using Keystone v2.0 API
/tmp/juju-
/tmp/juju-
Changed in openstack-bundles: | |
status: | Fix Committed → Fix Released |
https:/ /github. com/openstack- charmers/ openstack- charm-testing/ pull/39