yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #94026
[Bug 2067081] [NEW] Inconsistent Behaviour in Server List
Public bug reported:
It looks like there are discrepancies between how `openstack server
list` exits/returns depending on the output format used. Notably:
- When format is anything but `table`, "Power States" are replaced with numbers instead of being the text from usual output
- When format is anything but `table`, certain error conditions will not be met and output will become strange
These issues have been seen with openstack CLI version `6.0.0`.
## Power State Replacement
When no format is specified or table is explicitly set:
```
# openstack server list -c ID -c 'Task State' -c 'Power State' -f table
+--------------------------------------+------------+-------------+
| ID | Task State | Power State |
+--------------------------------------+------------+-------------+
| 7d698ad5-f5ba-40c1-8517-f6b54ff88d02 | None | Shutdown |
| 9c0db4c9-2455-4902-a924-87db5fe6f74a | None | Running |
```
However, other outputs would return, for example:
```
# openstack server list -c ID -c 'Task State' -c 'Power State' -f value
7d698ad5-f5ba-40c1-8517-f6b54ff88d02 None 4
9c0db4c9-2455-4902-a924-87db5fe6f74a None 1
# openstack server list -c ID -c 'Task State' -c 'Power State' -f csv
"ID","Task State","Power State"
"7d698ad5-f5ba-40c1-8517-f6b54ff88d02","","4"
"9c0db4c9-2455-4902-a924-87db5fe6f74a","","1"
```
## Error Conditions Not Met
In version 5.7.0 of the CLI, to include and filter to "Power State" and
"Task State" in the list output, this would require the `--long`
argument:
```
# openstack server list -c ID -c 'Task State' -c 'Power State' -f value
7d698ad5-f5ba-40c1-8517-f6b54ff88d02
9c0db4c9-2455-4902-a924-87db5fe6f74a
# openstack server list -c ID -c 'Task State' -c 'Power State' -f value --long
7d698ad5-f5ba-40c1-8517-f6b54ff88d02 None 4
9c0db4c9-2455-4902-a924-87db5fe6f74a None 1
```
However, running the above command on 6.0.0 returns strange output:
```
# openstack server list -c ID -c 'Task State' -c 'Power State' -f value --long
7d698ad5-f5ba-40c1-8517-f6b54ff88d02 None 4 None 4
9c0db4c9-2455-4902-a924-87db5fe6f74a None 1 None 1
```
To debug this, I removed the formatting and this is when I saw an error:
```
# openstack server list -c ID -c 'Task State' -c 'Power State' -f table --long
Field names must be unique
```
** Affects: nova
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/2067081
Title:
Inconsistent Behaviour in Server List
Status in OpenStack Compute (nova):
New
Bug description:
It looks like there are discrepancies between how `openstack server
list` exits/returns depending on the output format used. Notably:
- When format is anything but `table`, "Power States" are replaced with numbers instead of being the text from usual output
- When format is anything but `table`, certain error conditions will not be met and output will become strange
These issues have been seen with openstack CLI version `6.0.0`.
## Power State Replacement
When no format is specified or table is explicitly set:
```
# openstack server list -c ID -c 'Task State' -c 'Power State' -f table
+--------------------------------------+------------+-------------+
| ID | Task State | Power State |
+--------------------------------------+------------+-------------+
| 7d698ad5-f5ba-40c1-8517-f6b54ff88d02 | None | Shutdown |
| 9c0db4c9-2455-4902-a924-87db5fe6f74a | None | Running |
```
However, other outputs would return, for example:
```
# openstack server list -c ID -c 'Task State' -c 'Power State' -f value
7d698ad5-f5ba-40c1-8517-f6b54ff88d02 None 4
9c0db4c9-2455-4902-a924-87db5fe6f74a None 1
# openstack server list -c ID -c 'Task State' -c 'Power State' -f csv
"ID","Task State","Power State"
"7d698ad5-f5ba-40c1-8517-f6b54ff88d02","","4"
"9c0db4c9-2455-4902-a924-87db5fe6f74a","","1"
```
## Error Conditions Not Met
In version 5.7.0 of the CLI, to include and filter to "Power State"
and "Task State" in the list output, this would require the `--long`
argument:
```
# openstack server list -c ID -c 'Task State' -c 'Power State' -f value
7d698ad5-f5ba-40c1-8517-f6b54ff88d02
9c0db4c9-2455-4902-a924-87db5fe6f74a
# openstack server list -c ID -c 'Task State' -c 'Power State' -f value --long
7d698ad5-f5ba-40c1-8517-f6b54ff88d02 None 4
9c0db4c9-2455-4902-a924-87db5fe6f74a None 1
```
However, running the above command on 6.0.0 returns strange output:
```
# openstack server list -c ID -c 'Task State' -c 'Power State' -f value --long
7d698ad5-f5ba-40c1-8517-f6b54ff88d02 None 4 None 4
9c0db4c9-2455-4902-a924-87db5fe6f74a None 1 None 1
```
To debug this, I removed the formatting and this is when I saw an
error:
```
# openstack server list -c ID -c 'Task State' -c 'Power State' -f table --long
Field names must be unique
```
To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/2067081/+subscriptions