"nova server-group-list" doesn't show members of the group
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
High
|
Chris Friesen | ||
Icehouse |
Fix Released
|
High
|
Chuck Short |
Bug Description
With current devstack I ensured I had "GroupAntiAffin
nova server-group-create --policy anti-affinity antiaffinitygroup
nova server-group-list
+------
| Id | Name | Policies | Members | Metadata |
+------
| 5d639349-
+------
nova boot --flavor=1 --image=
nova list
+------
| ID | Name | Status | Task State | Power State | Networks |
+------
| a7a3ec40-
+------
Then I tried listing the groups, and it didn't print the newly-booted instance as a member:
nova server-group-list
+------
| Id | Name | Policies | Members | Metadata |
+------
| 5d639349-
+------
Rerunning the nova command with --debug we see that the problem is in nova, not novaclient:
RESP BODY: {"server_groups": [{"members": [], "metadata": {}, "id": "5d639349-
Looking at the database, we see that the instance is actually tracked as a member of the list (along with two other instances that haven't been marked as deleted yet, which is also a bug I think).
mysql> select * from instance_
+------
| created_at | updated_at | deleted_at | deleted | id | instance_id | group_id |
+------
| 2014-03-26 20:19:14 | NULL | NULL | 0 | 1 | d289502b-
| 2014-03-26 20:25:04 | NULL | NULL | 0 | 2 | e07f1f15-
| 2014-03-26 20:35:11 | NULL | NULL | 0 | 3 | a7a3ec40-
+------
3 rows in set (0.00 sec)
summary: |
- "nova instance-group-list" doesn't show members of the group + "nova server-group-list" doesn't show members of the group |
tags: | added: icehouse-rc-potential |
Changed in nova: | |
importance: | Undecided → High |
tags: |
added: icehouse-backport-potential removed: icehouse-rc-potential |
tags: | removed: icehouse-backport-potential in-stable-icehouse |
Changed in nova: | |
milestone: | none → juno-1 |
status: | Fix Committed → Fix Released |
Changed in nova: | |
milestone: | juno-1 → 2014.2 |
I did some tracing down in db.sqlalchemy. api.instance_ get_all_ by_filters( ). Before this line the query output looks good:
query_prefix = regex_filter( query_prefix, models.Instance, filters)
but after that line there are no instances left in the filter results.