Earlier  
Posted Nick Remark
#openstack-nova - 2021-04-14
19:44:11 noonedeadpunk this happens only with the template by the way
19:44:11 noonedeadpunk this happens only with the template by the way
19:47:54 noonedeadpunk this condition feels wrong for the template https://opendev.org/openstack/nova/src/branch/master/nova/cmd/manage.py#L623-L624
19:47:54 noonedeadpunk this condition feels wrong for the template https://opendev.org/openstack/nova/src/branch/master/nova/cmd/manage.py#L623-L624
19:50:13 noonedeadpunk because `cell.database_connection` and `cell.transport_url` are always resolved while checked, and `database_connection` with `transport_url` are shown as template...
19:50:13 noonedeadpunk because `cell.database_connection` and `cell.transport_url` are always resolved while checked, and `database_connection` with `transport_url` are shown as template...
19:56:56 noonedeadpunk wrote down https://bugs.launchpad.net/nova/+bug/1923899 - will try to check what can be done there tomorrow, unless there already be a suggestions
19:56:56 noonedeadpunk wrote down https://bugs.launchpad.net/nova/+bug/1923899 - will try to check what can be done there tomorrow, unless there already be a suggestions
19:56:57 openstack Launchpad bug 1923899 in OpenStack Compute (nova) "Nova create duplicate cells when templates are used" [Undecided,New]
20:05:08 openstackgerrit Merged openstack/nova master: Explaining when a base image is considered unused to avoid confusion why some images aren't deleted. https://review.opendev.org/c/openstack/nova/+/786059
20:05:08 openstackgerrit Merged openstack/nova master: Explaining when a base image is considered unused to avoid confusion why some images aren't deleted. https://review.opendev.org/c/openstack/nova/+/786059
20:13:48 noonedeadpunk It feels like template conversion is processed somewhere in models, as eventually here it's already converted from template to url https://opendev.org/openstack/nova/src/branch/master/nova/objects/cell_mapping.py#L258
20:13:48 noonedeadpunk It feels like template conversion is processed somewhere in models, as eventually here it's already converted from template to url https://opendev.org/openstack/nova/src/branch/master/nova/objects/cell_mapping.py#L258
20:13:58 noonedeadpunk unless it's done somewhere in oslo....
20:13:58 noonedeadpunk unless it's done somewhere in oslo....
20:14:46 noonedeadpunk as kind of see nothing in models... https://opendev.org/openstack/nova/src/branch/master/nova/db/sqlalchemy/api_models.py#L111
20:14:46 noonedeadpunk as kind of see nothing in models... https://opendev.org/openstack/nova/src/branch/master/nova/db/sqlalchemy/api_models.py#L111
20:18:45 noonedeadpunk ok, that's where conversion is done https://opendev.org/openstack/nova/src/branch/master/nova/objects/cell_mapping.py#L159-L169
20:18:45 noonedeadpunk ok, that's where conversion is done https://opendev.org/openstack/nova/src/branch/master/nova/objects/cell_mapping.py#L159-L169
20:19:37 sean-k-mooney noonedeadpunk: the cell names are uniqe yes
20:19:37 sean-k-mooney noonedeadpunk: the cell names are uniqe yes
20:20:10 sean-k-mooney but i dont think we enforce that with a db constraint
20:20:10 sean-k-mooney but i dont think we enforce that with a db constraint
20:20:36 sean-k-mooney im not sure what will happen with http://paste.openstack.org/show/804488/
20:20:36 sean-k-mooney im not sure what will happen with http://paste.openstack.org/show/804488/
20:20:39 noonedeadpunk yeah, there's totally a bug in tempaltes usage
20:20:39 noonedeadpunk yeah, there's totally a bug in tempaltes usage
20:20:43 sean-k-mooney other then it will proably break
20:20:43 sean-k-mooney other then it will proably break
20:22:01 sean-k-mooney noonedeadpunk: it look like maybe you don thave support for multiple cells?
20:22:01 sean-k-mooney noonedeadpunk: it look like maybe you don thave support for multiple cells?
20:22:10 sean-k-mooney looking at https://review.opendev.org/c/openstack/openstack-ansible-os_nova/+/786258/1/tasks/nova_db_setup.yml
20:22:10 sean-k-mooney looking at https://review.opendev.org/c/openstack/openstack-ansible-os_nova/+/786258/1/tasks/nova_db_setup.yml
20:22:11 noonedeadpunk not sure just what's the best way to pass to avoid formatting here https://opendev.org/openstack/nova/src/branch/master/nova/objects/cell_mapping.py#L159-L169 considering it's going through oslo.versionedobjects
20:22:11 noonedeadpunk not sure just what's the best way to pass to avoid formatting here https://opendev.org/openstack/nova/src/branch/master/nova/objects/cell_mapping.py#L159-L169 considering it's going through oslo.versionedobjects
20:22:20 sean-k-mooney it was previously hardcoded as --name {{ nova_cell1_name }}
20:22:20 sean-k-mooney it was previously hardcoded as --name {{ nova_cell1_name }}
20:23:07 noonedeadpunk well, my point is more about that if I run excatly same create_cell command twice - I get exact same 2 cells with different uuids
20:23:07 noonedeadpunk well, my point is more about that if I run excatly same create_cell command twice - I get exact same 2 cells with different uuids
20:23:38 sean-k-mooney ya which is porably a nova bug
20:23:38 sean-k-mooney ya which is porably a nova bug
20:23:54 noonedeadpunk because verification if that cell already exists is just broken for tempalate user scenario - as it compares what is passed as an argument with already resolved template
20:23:54 noonedeadpunk because verification if that cell already exists is just broken for tempalate user scenario - as it compares what is passed as an argument with already resolved template
20:23:57 sean-k-mooney i cant think of a valid reason to allow that
20:23:57 sean-k-mooney i cant think of a valid reason to allow that
20:24:23 sean-k-mooney right we should have a unique constraint on the cell name
20:24:23 sean-k-mooney right we should have a unique constraint on the cell name
20:24:35 noonedeadpunk and you can't do that anyway when you use just old good fixed stuff
20:24:35 noonedeadpunk and you can't do that anyway when you use just old good fixed stuff
20:25:12 noonedeadpunk or avoid resolution of the template when we checking if same cell already exist
20:25:12 noonedeadpunk or avoid resolution of the template when we checking if same cell already exist
20:26:03 sean-k-mooney https://opendev.org/openstack/nova/src/branch/master/nova/db/sqlalchemy/api_models.py#L111-L129
20:26:03 sean-k-mooney https://opendev.org/openstack/nova/src/branch/master/nova/db/sqlalchemy/api_models.py#L111-L129
20:26:15 noonedeadpunk So I'd say when we call here https://opendev.org/openstack/nova/src/commit/9e5feb051c15166988e87b10132927135bd56884/nova/cmd/manage.py#L618 we should pass smth like resolve=false
20:26:15 noonedeadpunk So I'd say when we call here https://opendev.org/openstack/nova/src/commit/9e5feb051c15166988e87b10132927135bd56884/nova/cmd/manage.py#L618 we should pass smth like resolve=false
20:26:17 sean-k-mooney so the unique constatin is only the uuid currently
20:26:17 sean-k-mooney so the unique constatin is only the uuid currently
20:26:27 sean-k-mooney we shoudl also have one on the name
20:26:27 sean-k-mooney we shoudl also have one on the name
20:26:41 noonedeadpunk yeah, I saw that...
20:26:41 noonedeadpunk yeah, I saw that...
20:26:46 sean-k-mooney dansmith: do you know why that is the case today ^
20:26:46 sean-k-mooney dansmith: do you know why that is the case today ^
20:27:08 sean-k-mooney dansmith: i.e. why we allow to cell records with the same name?
20:27:08 sean-k-mooney dansmith: i.e. why we allow to cell records with the same name?
20:27:27 sean-k-mooney noonedeadpunk: as far as i know we only use the id in other tables
20:27:27 sean-k-mooney noonedeadpunk: as far as i know we only use the id in other tables
20:27:41 sean-k-mooney noonedeadpunk: so other then cell0 which is speciall we dont really use the cell name
20:27:41 sean-k-mooney noonedeadpunk: so other then cell0 which is speciall we dont really use the cell name
20:28:07 sean-k-mooney noonedeadpunk: its just for operators really
20:28:07 sean-k-mooney noonedeadpunk: its just for operators really
20:28:21 dansmith yeah, name is just for the humans
20:28:21 dansmith yeah, name is just for the humans
20:28:32 noonedeadpunk well, I'm probably even ok that cell name is not unique. I just see no reason in adding cells with same name, transport_url and database_connection
20:28:32 noonedeadpunk well, I'm probably even ok that cell name is not unique. I just see no reason in adding cells with same name, transport_url and database_connection
20:28:34 dansmith but no I dunno any reason to or not to be unique on name for any reason
20:28:34 dansmith but no I dunno any reason to or not to be unique on name for any reason
20:29:07 dansmith noonedeadpunk: well, we had initially talked about sharding on the db but not the mq, or vice versa,
20:29:07 dansmith noonedeadpunk: well, we had initially talked about sharding on the db but not the mq, or vice versa,
20:29:12 dansmith so I think that's why we didn't make those unique
20:29:12 dansmith so I think that's why we didn't make those unique
20:29:41 noonedeadpunk And there's an attempt to avoid that with condition and raising `The specified transport_url and/or database_connection combination already exists for another cell with uuid ef89aebc-142d-4755-a377-6ed23b6c1ed4.`
20:29:41 noonedeadpunk And there's an attempt to avoid that with condition and raising `The specified transport_url and/or database_connection combination already exists for another cell with uuid ef89aebc-142d-4755-a377-6ed23b6c1ed4.`
20:29:42 sean-k-mooney dansmith: i was debating if this was for some kind of loadbalancing
20:29:42 dansmith however, I think we'd have work to do before that would actually work
20:29:42 sean-k-mooney dansmith: i was debating if this was for some kind of loadbalancing
20:29:42 dansmith however, I think we'd have work to do before that would actually work
20:29:43 dansmith at least testing
20:29:43 dansmith at least testing
20:30:45 sean-k-mooney kind of like the way you can list multple glance? rabbnit? instances in the config instead of using haproxy
20:30:45 sean-k-mooney kind of like the way you can list multple glance? rabbnit? instances in the config instead of using haproxy
20:31:04 dansmith no, that was never the reasoning for lack of uniqueness that I recall,
20:31:04 dansmith no, that was never the reasoning for lack of uniqueness that I recall,
20:31:06 dansmith more the opposite,
20:31:06 dansmith more the opposite,
20:31:25 dansmith where you wanted to be able to have two DBs and not two MQs or the like
20:31:25 dansmith where you wanted to be able to have two DBs and not two MQs or the like
20:31:25 sean-k-mooney ok
20:31:59 sean-k-mooney noonedeadpunk: in any case i guess you need to figure out why you are creatin gmultiple cells
20:31:59 sean-k-mooney noonedeadpunk: in any case i guess you need to figure out why you are creatin gmultiple cells

Earlier   Later