instance_group_member entries not deleted when the instance deleted
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
High
|
Charlotte Han | ||
Liberty |
Fix Released
|
Undecided
|
Vijay | ||
Mitaka |
Fix Released
|
Undecided
|
Matt Riedemann |
Bug Description
Just the not deleted members needs to be selected, an instance group can gather many-many deleted instances during on his lifetime.
The selecting query contains a condition for omitting the deleted records:
SELECT instance_
(Captured at $nova server-group-list)
But actually nova fetches the deleted records because the `deleted` field is 0,
even if the instance already deleted.
For figuring out the instance is actually deleted the nova API issues other otherwise not needed queries.
The instance_
show create table instance_
CREATE TABLE `instance_
`created_at` datetime DEFAULT NULL,
`updated_at` datetime DEFAULT NULL,
`deleted_at` datetime DEFAULT NULL,
`deleted` int(11) DEFAULT NULL,
`id` int(11) NOT NULL AUTO_INCREMENT,
`instance_id` varchar(255) DEFAULT NULL,
`group_id` int(11) NOT NULL,
PRIMARY KEY (`id`),
KEY `group_id` (`group_id`),
KEY `instance_
CONSTRAINT `instance_
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8
1, Please delete the instance_
2, Please add (`deleted`
Changed in nova: | |
assignee: | nobody → Alex Xu (xuhj) |
tags: | added: db |
Changed in nova: | |
importance: | Undecided → High |
Changed in nova: | |
assignee: | Alex Xu (xuhj) → nobody |
Changed in nova: | |
assignee: | nobody → Syed Ahsan Shamim Zaidi (ahsanmohsin04) |
Changed in nova: | |
assignee: | Syed Ahsan Shamim Zaidi (ahsanmohsin04) → nobody |
Changed in nova: | |
status: | In Progress → Confirmed |
Changed in nova: | |
assignee: | nobody → Rong Han ZTE (hanrong) |
tags: | added: server-groups |
Fix proposed to branch: master /review. openstack. org/173664
Review: https:/