Just wanted to add a note on here, if you have already begun an upgrade (and run nova-manage db online_data_migrations) on a version prior to this fix landing and hit the error, there is a manual step you need to take in order for the upgrade (i.e. nova-manage db online_data_migrations) to work after you have applied the fix.
If you have a duplicate security_groups record with NULL user_id and project_id, you need to delete one of them. In this case, you would delete the record with id = 3.
Just wanted to add a note on here, if you have already begun an upgrade (and run nova-manage db online_ data_migrations ) on a version prior to this fix landing and hit the error, there is a manual step you need to take in order for the upgrade (i.e. nova-manage db online_ data_migrations ) to work after you have applied the fix.
If you have a duplicate security_groups record with NULL user_id and project_id, you need to delete one of them. In this case, you would delete the record with id = 3.
> select id,name, description, user_id, project_ id,deleted from security_groups; ------- -+----- ------- -+----- ------- ------- ------- ------- -+----- ------- ------- ------- ------- -+----- ----+ ------- -+----- ------- -+----- ------- ------- ------- ------- -+----- ------- ------- ------- ------- -+----- ----+ e9527646f7da168 3e | 5e9830de3b6b40b 6b1269b6bd96595 02 | 0 | ------- -+----- ------- -+----- ------- ------- ------- ------- -+----- ------- ------- ------- ------- -+----- ----+
+----+-
| id | name | description | user_id | project_id | deleted |
+----+-
| 1 | default | default | da452be8c38f42f
| 2 | default | default | NULL | NULL | 0 |
| 3 | default | default | NULL | NULL | 0 |
+----+-
After you have deleted the duplicate security_groups record, try again and the nova-manage db online_ data_migrations command should succeed.