Earlier  
Posted Nick Remark
#openstack-nova - 2021-05-05
10:18:37 bauzas sean-k-mooney: I'm not sure we could accept this
10:18:37 bauzas sean-k-mooney: I'm not sure we could accept this
10:18:50 bauzas (allowing the driver to directly call placement)
10:18:50 bauzas (allowing the driver to directly call placement)
10:19:13 bauzas what we could do is maybe the latter
10:19:13 bauzas what we could do is maybe the latter
10:19:35 sean-k-mooney im just pulling up the code in the compute manager now
10:19:35 sean-k-mooney im just pulling up the code in the compute manager now
10:20:09 sean-k-mooney https://github.com/openstack/nova/blob/master/nova/compute/manager.py#L1441-L1443
10:20:09 sean-k-mooney https://github.com/openstack/nova/blob/master/nova/compute/manager.py#L1441-L1443
10:20:19 sean-k-mooney so this is where we end up callint ingo the dirver eventurally right
10:20:19 sean-k-mooney so this is where we end up callint ingo the dirver eventurally right
10:20:26 sean-k-mooney from _init_instanc
10:20:26 sean-k-mooney from _init_instanc
10:21:11 sean-k-mooney for example thsi is where we plug vifs https://github.com/openstack/nova/blob/7953c0197d1a4466cb5b78070d47626c92f9db6e/nova/compute/manager.py#L1137
10:21:11 sean-k-mooney for example thsi is where we plug vifs https://github.com/openstack/nova/blob/7953c0197d1a4466cb5b78070d47626c92f9db6e/nova/compute/manager.py#L1137
10:21:13 bauzas not really
10:21:13 bauzas not really
10:21:24 bauzas rather here https://github.com/openstack/nova/blob/master/nova/compute/manager.py#L1413
10:21:24 bauzas rather here https://github.com/openstack/nova/blob/master/nova/compute/manager.py#L1413
10:21:58 sean-k-mooney right but we do not create the instance until https://github.com/openstack/nova/blob/7953c0197d1a4466cb5b78070d47626c92f9db6e/nova/compute/manager.py#L1204
10:21:58 sean-k-mooney right but we do not create the instance until https://github.com/openstack/nova/blob/7953c0197d1a4466cb5b78070d47626c92f9db6e/nova/compute/manager.py#L1204
10:22:24 bauzas hmmm, I see
10:22:24 bauzas hmmm, I see
10:22:39 sean-k-mooney sorry a few lines above https://github.com/openstack/nova/blob/7953c0197d1a4466cb5b78070d47626c92f9db6e/nova/compute/manager.py#L1195
10:22:39 sean-k-mooney sorry a few lines above https://github.com/openstack/nova/blob/7953c0197d1a4466cb5b78070d47626c92f9db6e/nova/compute/manager.py#L1195
10:22:51 sean-k-mooney so what im thinking is we can extend this function to create the mdevs
10:22:51 sean-k-mooney so what im thinking is we can extend this function to create the mdevs
10:23:02 sean-k-mooney this happesn after the driver init_host is run
10:23:02 sean-k-mooney this happesn after the driver init_host is run
10:23:18 sean-k-mooney so the reshapes would already have run
10:23:18 sean-k-mooney so the reshapes would already have run
10:23:23 bauzas instead of having init_host() calling https://github.com/openstack/nova/blob/master/nova/virt/libvirt/driver.py#L789
10:23:23 bauzas instead of having init_host() calling https://github.com/openstack/nova/blob/master/nova/virt/libvirt/driver.py#L789
10:23:36 bauzas we would use init_instance()
10:23:36 bauzas we would use init_instance()
10:23:40 sean-k-mooney yep
10:23:43 bauzas this could work
10:23:43 bauzas this could work
10:24:00 bauzas * bauzas needs to look at what we have in init_instance()
10:24:17 bauzas but then, we could ask its allocations
10:24:17 bauzas but then, we could ask its allocations
10:24:27 bauzas as it's within the compute manager
10:24:27 bauzas as it's within the compute manager
10:24:32 sean-k-mooney it basicaly just plugs vifs and cleans up deleted instance ectra
10:24:32 sean-k-mooney it basicaly just plugs vifs and cleans up deleted instance ectra
10:24:36 sean-k-mooney yep
10:24:56 sean-k-mooney its in the compute manager so we can have it get the allocations
10:24:56 sean-k-mooney its in the compute manager so we can have it get the allocations
10:24:59 bauzas and then, pass the allocation to the virt driver which would use the related RP name for knowing which type
10:24:59 bauzas and then, pass the allocation to the virt driver which would use the related RP name for knowing which type
10:25:09 sean-k-mooney we might need to extend the dirver interface and add an optional funciton
10:25:09 sean-k-mooney we might need to extend the dirver interface and add an optional funciton
10:25:25 sean-k-mooney which we woudl call that take the instnace and allcoations
10:25:25 sean-k-mooney which we woudl call that take the instnace and allcoations
10:25:41 bauzas yup, I see it
10:25:41 bauzas yup, I see it
10:25:44 bauzas sean-k-mooney: thanks
10:25:51 sean-k-mooney the libvirt implemation of that could prepare_resouces_for_instance(uuid, allocation)
10:25:51 sean-k-mooney the libvirt implemation of that could prepare_resouces_for_instance(uuid, allocation)
10:26:21 bauzas yup, better than recreate_mdev() which is too specific
10:26:21 bauzas yup, better than recreate_mdev() which is too specific
10:26:52 sean-k-mooney yep not sure if we will use it for anything else but it at least allows us to if we need too in the future
10:26:52 sean-k-mooney yep not sure if we will use it for anything else but it at least allows us to if we need too in the future
10:26:57 bauzas OK, I see it, lemme work on it
10:26:57 bauzas OK, I see it, lemme work on it
10:26:59 bauzas thanks
10:26:59 bauzas thanks
10:29:03 bauzas * bauzas goes to lunch but then will implement this
10:43:59 nightmare_unreal how to change hypervisor state ( not status). It's down . I want it up .
10:43:59 nightmare_unreal how to change hypervisor state ( not status). It's down . I want it up .
10:47:50 sean-k-mooney it will be down for 2 reasons
10:47:50 sean-k-mooney it will be down for 2 reasons
10:48:21 sean-k-mooney either it missed its heartbeat in which case you need to start it or you forced it down
10:48:21 sean-k-mooney either it missed its heartbeat in which case you need to start it or you forced it down
10:48:30 sean-k-mooney in which case you can force it up
10:48:30 sean-k-mooney in which case you can force it up
10:49:36 nightmare_unreal openstack compute service set <compute-node> nova-compute --up --os-compute-api-version 2.11
10:49:36 nightmare_unreal openstack compute service set <compute-node> nova-compute --up --os-compute-api-version 2.11
10:49:39 nightmare_unreal trying with this
10:49:39 nightmare_unreal trying with this
10:50:08 nightmare_unreal I didn't changed the state in past. It was only status ( enable and disable)
10:50:08 nightmare_unreal I didn't changed the state in past. It was only status ( enable and disable)
10:50:12 nightmare_unreal for some reason it went down
10:50:12 nightmare_unreal for some reason it went down
10:50:31 sean-k-mooney then its the heartbeat
10:50:31 sean-k-mooney then its the heartbeat
10:50:48 sean-k-mooney in which case its not able to talk to the conductor over the rpc bus
10:50:48 sean-k-mooney in which case its not able to talk to the conductor over the rpc bus
10:50:53 sean-k-mooney so you need to check why
10:50:53 sean-k-mooney so you need to check why
10:51:10 sean-k-mooney or you can turn it off and on again by restarting the compuate agent
10:51:10 sean-k-mooney or you can turn it off and on again by restarting the compuate agent
10:51:53 nightmare_unreal I see, thanks for the suggestion . I will first try with restart I think
10:51:53 nightmare_unreal I see, thanks for the suggestion . I will first try with restart I think
10:51:55 sean-k-mooney the compute node being down is a signal to the operator that the node is cannot be managed and you need to investigate
10:51:55 sean-k-mooney the compute node being down is a signal to the operator that the node is cannot be managed and you need to investigate
10:52:17 nightmare_unreal there are no VMs on that compute node
10:52:17 nightmare_unreal there are no VMs on that compute node
12:33:32 openstackgerrit Cedric Jeanneret proposed openstack/nova stable/train: [Train-Only] Update setup.cfg with new names https://review.opendev.org/c/openstack/nova/+/789822

Earlier   Later