Earlier  
Posted Nick Remark
#openstack-nova - 2023-02-27
18:09:54 stephenfin sean-k-mooney: good spot :)
18:10:34 lowercase okay, since we are in a different spot. please confirm you want me to repeat the steps with nova_api databases.
18:10:59 stephenfin yup
18:11:07 stephenfin though before you do
18:11:14 lowercase okay, stoping.
18:11:28 stephenfin can you dump the contents of the 'alembic_version' table from nova_api
18:11:33 lowercase kk
18:11:44 stephenfin and perhaps the migrate_version table too, if there's one
18:11:49 stephenfin paste.openstack.org
18:12:44 sean-k-mooney nova is slightly differnt in that by default it has 3 dbs nova_api nova_cell0 and nova_cell1 and osa used ot use nova for nova_cell1 i think but changed at some point
18:14:15 sean-k-mooney so here nova is the cell1 db https://github.com/openstack/openstack-ansible-os_nova/blob/abac462dc218b08656b56c57e5a401aa639a0f0b/tasks/main.yml#L69-L80
18:15:14 lowercase sorry, my mysql isn't very strong. show columns from alembic_version; shows me what the key and type everything is. how do i dump the data from a field?
18:15:52 sean-k-mooney select * from alembic_versions;
18:16:11 sean-k-mooney i think its actully just one row
18:16:19 lowercase select * from alembic_version; results in d67eeaabee36
18:16:29 lowercase which is what we expect
18:16:43 stephenfin is there a migrate_version table?
18:17:08 lowercase yes
18:17:23 lowercase | nova_api | /openstack/venvs/nova-21.2.0/lib/python3.6/site-packages/nova/db/sqlalchemy/api_migrations/migrate_repo | 87 |
18:19:14 stephenfin cool, that's the most recent version of the legacy migrations, so everything has been applied
18:19:20 lowercase Good to proceed with the dropping of the db?
18:19:35 stephenfin one last thing
18:20:07 sean-k-mooney well i would make a backup first
18:20:11 lowercase actually, since i was in the wrong db. there is a build_requests here.
18:20:22 lowercase select * from build_requests;
18:20:22 lowercase Empty set (0.000 sec)
18:20:43 lowercase sean-k-mooney: i backed up before all changes, we are good.
18:20:50 sean-k-mooney you could do a "show create table build_request;"
18:20:51 stephenfin can you dump the schema from that table?
18:21:16 lowercase show create table build_request;
18:21:16 lowercase ERROR 1146 (42S02): Table 'nova_api.build_request' doesn't exist
18:21:18 sean-k-mooney that what the command above does by the way
18:21:29 sean-k-mooney missing an s at the end sorry
18:21:42 sean-k-mooney show create table build_requests;
18:21:43 lowercase let me paste this
18:21:48 lowercase my fault, i should have caught that
18:22:00 sean-k-mooney i typo things constantly
18:22:39 lowercase https://paste.centos.org/view/cf6648bc
18:24:49 lowercase Still holding off on blowing away the db.
18:24:56 stephenfin You can blow it away now
18:25:00 lowercase kk
18:25:08 sean-k-mooney so that db is missing the filed in from the train schema
18:25:13 sean-k-mooney so it has already been migrated
18:26:03 sean-k-mooney or contracted/truncated in this case
18:26:11 lowercase drop nova_api database; show database ; -> confirmed nova-api is no longer present.
18:27:40 lowercase create database nova_api ; and /openstack/venvs/nova-25.2.1.dev3/bin/nova-manage api_db sync now results in echo $? == 0
18:27:56 sean-k-mooney ok so it succeeded
18:28:40 sean-k-mooney you shoudl be able to run "nova-manage api_db sync" again
18:28:50 sean-k-mooney and i basically shoudl do nothing
18:29:03 stephenfin Cool. So something has gone wrong the first time you applied that. My guesses would be that it was already applied but the alembic_version table wasn't updated for some reason. The other guess is that someone manually dropped these at some point in the past
18:29:04 lowercase Correct, i ran again and no error
18:32:01 sean-k-mooney its also possible that you ran this pointing at the wrong db
18:32:20 sean-k-mooney the api db migratoins wont work on the cell dbs
18:32:35 sean-k-mooney so if you had the wrong db in the config file then you woudl see the issue you had
18:32:42 stephenfin that only makes sense if the config is wrong though, yeah
18:32:51 lowercase no chance. openstack-ansible performed the operation. And i ran a dozen playbooks which all require sql connections successfully before this one
18:33:19 sean-k-mooney ack
18:33:23 stephenfin then I guess you need to restore the backup and try again
18:33:42 lowercase okay, restoring the database
18:33:57 stephenfin you can dummy apply the migration is needed, updating the 'alembic_version' record, but you should figure out why this happened first. Did you keep logs from OSA?
18:34:53 lowercase That seems like a highly desirable feature. but i dont think it does for me. And I didn't go out of my way to save them
18:35:28 stephenfin ack, then you might be stuck with never knowing and just fixing the issue
18:36:06 sean-k-mooney this looks right to me too by the way https://github.com/openstack/openstack-ansible-os_nova/blob/stable/yoga/templates/nova.conf.j2#L216-L217
18:36:48 sean-k-mooney i do not see an obvious bug in osa
18:36:58 sean-k-mooney if you hit this again and find a repoducer let us know
18:37:04 sean-k-mooney but it seams to be working ok again
18:38:21 lowercase okay, i restored the database. d67eeaabee36 is the alembic_version again.
18:38:49 lowercase /openstack/venvs/nova-25.2.1.dev3/bin/nova-manage api_db sync results in [SQL: ALTER TABLE build_requests DROP COLUMN vm_state] exception again.
18:39:18 stephenfin and the schema's the same before you run that? i.e. those columns are missing?
18:40:23 stephenfin lowercase: If you need to dummy apply the migration, you can create a file like this https://paste.opendev.org/show/818911/ and call alembic with 'alembic -c path/to/file stamp head'
18:40:24 stephenfin If alembic isn't available, 'virtualenv .venv; source .venv; pip install alembic; {commands}; deactivate; rm -rf .venv'
18:42:06 lowercase Yes, build_requests is present with nothing in it.
18:42:43 lowercase and the schema is identical to the paste i shared previosuly.
18:57:45 lowercase stephenfin: alembic resulted in the following error: https://paste.opendev.org/show/beYkgfrwuHYduGCDnGcE/
#openstack-nova - 2023-02-28
08:12:29 opendevreview Jorge San Emeterio proposed openstack/nova master: WIP: Creating an example of the refactor privileged functions will go through. https://review.opendev.org/c/openstack/nova/+/875497
08:12:54 gibi o/
08:13:12 bauzas hola
08:13:27 gibi bauzas: you mentioned things to clean up before RC1, do you have a list?
08:13:48 bauzas gibi: indeed,
08:13:58 bauzas https://etherpad.opendev.org/p/nova-antelope-rc-potential
08:14:14 gibi bauzas: ack, on it
08:15:22 bauzas gibi: actually, we only have the prelude and the logging revert patch to review
08:15:31 bauzas (for the moment)
08:16:01 bauzas also, I forgot to tell about RBAC defaults, shit.
08:16:07 bauzas (in the cycle highlights)
08:16:39 bauzas https://etherpad.opendev.org/p/nova-antelope-blueprint-status it wasn't in the etherpad, neither in the Antelope blueprints
08:18:26 bauzas gibi: about your question about SLURP, well, maybe we should wait for dansmith to be here
08:19:22 bauzas gibi: but AFAIK, we try in Nova to support a N-2 compute
08:19:33 bauzas when N is a SLURP release
08:19:49 bauzas gibi: dansmith tried at least to have a job for testing it
08:25:40 gibi bauzas: I'm fine to make such a statement but then lets make it a clear statement somewhere that we support N-2 computes not just easing on the constraint in the code.
08:26:52 gibi i.e. our change in what is supported is hard to discover as it mentioned nowhere deployer facing
08:32:05 bauzas gibi: yep, I see your point
08:32:22 bauzas fwiw, we haven't yet agreed on this, which should be done at the vPTG
08:39:25 bauzas gibi: got a second for thinking about 2023.1 SLURP implications ?
08:40:57 gibi be back in 5min to think
08:47:47 opendevreview Sylvain Bauza proposed openstack/nova master: Update min service version for Antelope https://review.opendev.org/c/openstack/nova/+/874932
08:47:59 bauzas right in time
08:48:04 bauzas I totally flipped my mind
08:48:08 gibi so what I quoted from that dock is #6

Earlier   Later