[openstack-ansible] issue
Dear All, Whenever I do any activity like Operating system upgrade of compute nodes or openstack major version update then the name of compute host gets updated. I have my compute node with name compute1,2,3.... but after the activity they sometimes become compute1.openstack.local or compute2.mgmt.local. Due to this I get duplicate resource providers. But only the latest provider works properly. and I had manually unset all the vm from old provider and added then into new provider. Is there a way I can avoid this? means I don't want my compute nodes to get renamed with domain. And is there a way I can unset a vm from all provider and heal them automatically instead adding them into new resource proivder? I tried below docs but the healing part is not working so I go with manual process for all vm which is too time consuming. https://docs.openstack.org/nova/yoga/admin/troubleshooting/orphaned-allocati... Regards, Danish Khan
I'm not familiar how this works with ansible, but we use the "host" config option in nova.conf to explicitly set the shortname: root@compute002:~# grep -E "^host" /etc/nova/nova-compute.conf host = compute002 Zitat von Danish Khan <danish52.jmi@gmail.com>:
Dear All,
Whenever I do any activity like Operating system upgrade of compute nodes or openstack major version update then the name of compute host gets updated.
I have my compute node with name compute1,2,3.... but after the activity they sometimes become compute1.openstack.local or compute2.mgmt.local.
Due to this I get duplicate resource providers. But only the latest provider works properly. and I had manually unset all the vm from old provider and added then into new provider.
Is there a way I can avoid this? means I don't want my compute nodes to get renamed with domain.
And is there a way I can unset a vm from all provider and heal them automatically instead adding them into new resource proivder?
I tried below docs but the healing part is not working so I go with manual process for all vm which is too time consuming.
https://docs.openstack.org/nova/yoga/admin/troubleshooting/orphaned-allocati...
Regards, Danish Khan
So, I think the issue you do have is related to how the /etc/hosts file is being generated, as this can influence on the result returned by socket.gethostname(). However, logic which generates /etc/hosts records does respect the current hostname defined in facts, so it should not change the hostname if it was set correctly at the first place. But if you are to change hostnames - then yes, you would need to clean stale facts and re-run openstack-hosts-setup.yml playbook with a tag `openstack_hosts-file`. Another thing to keep in mind, is `openstack_domain` variable, which defaults to "openstack.local" and is used in /etc/hosts file generation as well: https://opendev.org/openstack/openstack-ansible-openstack_hosts/src/branch/m... So adjusting this variable might also help to get intended behaviour for your deployment. вт, 21 янв. 2025 г. в 12:40, Eugen Block <eblock@nde.ag>:
I'm not familiar how this works with ansible, but we use the "host" config option in nova.conf to explicitly set the shortname:
root@compute002:~# grep -E "^host" /etc/nova/nova-compute.conf host = compute002
Zitat von Danish Khan <danish52.jmi@gmail.com>:
Dear All,
Whenever I do any activity like Operating system upgrade of compute nodes or openstack major version update then the name of compute host gets updated.
I have my compute node with name compute1,2,3.... but after the activity they sometimes become compute1.openstack.local or compute2.mgmt.local.
Due to this I get duplicate resource providers. But only the latest provider works properly. and I had manually unset all the vm from old provider and added then into new provider.
Is there a way I can avoid this? means I don't want my compute nodes to get renamed with domain.
And is there a way I can unset a vm from all provider and heal them automatically instead adding them into new resource proivder?
I tried below docs but the healing part is not working so I go with manual process for all vm which is too time consuming.
https://docs.openstack.org/nova/yoga/admin/troubleshooting/orphaned-allocati...
Regards, Danish Khan
participants (3)
-
Danish Khan
-
Dmitriy Rabotyagov
-
Eugen Block