yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #48966
[Bug 1566025] [NEW] Unable to delete security groups; security_group table 'deleted' field needs migration
Public bug reported:
My long-standing Nova installation has the following columns in the
security_groups table:
+-------------+--------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+-------------+--------------+------+-----+---------+----------------+
| created_at | datetime | YES | | NULL | |
| updated_at | datetime | YES | | NULL | |
| deleted_at | datetime | YES | | NULL | |
| deleted | tinyint(1) | YES | MUL | NULL | |
| id | int(11) | NO | PRI | NULL | auto_increment |
| name | varchar(255) | YES | | NULL | |
| description | varchar(255) | YES | | NULL | |
| user_id | varchar(255) | YES | | NULL | |
| project_id | varchar(255) | YES | | NULL | |
+-------------+--------------+------+-----+---------+----------------+
A more recent install looks like this:
+-------------+--------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+-------------+--------------+------+-----+---------+----------------+
| created_at | datetime | YES | | NULL | |
| updated_at | datetime | YES | | NULL | |
| deleted_at | datetime | YES | | NULL | |
| id | int(11) | NO | PRI | NULL | auto_increment |
| name | varchar(255) | YES | | NULL | |
| description | varchar(255) | YES | | NULL | |
| user_id | varchar(255) | YES | | NULL | |
| project_id | varchar(255) | YES | MUL | NULL | |
| deleted | int(11) | YES | | NULL | |
+-------------+--------------+------+-----+---------+----------------+
Note that the 'deleted' field has changed types. It now stores a group
ID upon deletion. But, the old table can't store that group ID because
of the tinyint data type. This means that security groups cannot be
deleted.
I haven't yet located the source of this regression, but presumably it
happened when the table definition was changed to use
models.SoftDeleteMixin, and the accompanying migration change was
overlooked.
** 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/1566025
Title:
Unable to delete security groups; security_group table 'deleted' field
needs migration
Status in OpenStack Compute (nova):
New
Bug description:
My long-standing Nova installation has the following columns in the
security_groups table:
+-------------+--------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+-------------+--------------+------+-----+---------+----------------+
| created_at | datetime | YES | | NULL | |
| updated_at | datetime | YES | | NULL | |
| deleted_at | datetime | YES | | NULL | |
| deleted | tinyint(1) | YES | MUL | NULL | |
| id | int(11) | NO | PRI | NULL | auto_increment |
| name | varchar(255) | YES | | NULL | |
| description | varchar(255) | YES | | NULL | |
| user_id | varchar(255) | YES | | NULL | |
| project_id | varchar(255) | YES | | NULL | |
+-------------+--------------+------+-----+---------+----------------+
A more recent install looks like this:
+-------------+--------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+-------------+--------------+------+-----+---------+----------------+
| created_at | datetime | YES | | NULL | |
| updated_at | datetime | YES | | NULL | |
| deleted_at | datetime | YES | | NULL | |
| id | int(11) | NO | PRI | NULL | auto_increment |
| name | varchar(255) | YES | | NULL | |
| description | varchar(255) | YES | | NULL | |
| user_id | varchar(255) | YES | | NULL | |
| project_id | varchar(255) | YES | MUL | NULL | |
| deleted | int(11) | YES | | NULL | |
+-------------+--------------+------+-----+---------+----------------+
Note that the 'deleted' field has changed types. It now stores a
group ID upon deletion. But, the old table can't store that group ID
because of the tinyint data type. This means that security groups
cannot be deleted.
I haven't yet located the source of this regression, but presumably it
happened when the table definition was changed to use
models.SoftDeleteMixin, and the accompanying migration change was
overlooked.
To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1566025/+subscriptions
Follow ups