Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for receiving vm names of disconnected nodes #53421

Open
wants to merge 1 commit into
base: devel
from

Conversation

Projects
None yet
4 participants
@winkelchri
Copy link

winkelchri commented Mar 6, 2019

SUMMARY

In environments were are disconnected nodes within the cluster, vms can still be present but not have a name field within the API.

#46633

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

proxmox_kvm

ADDITIONAL INFORMATION

As there is no name field of vms of disconnected proxmox nodes, the ansible script will fail due to a KeyError. This fix just provides an default (empty string) value if there is no such name field within the API.

Output of a VM of a disconnected node:
{u'status': u'unknown', u'type': u'qemu', u'vmid': 104, u'id': u'qemu/104', u'node': u'prx-node01'}

Output of a VM of a connected node:
{u'status': u'running', u'node': u'prx03-test', u'uptime': 6765768, u'name': u'VM 105', u'maxcpu': 4, u'diskread': 398603672, u'mem': 498401280, u'vmid': 105, u'netin': 238735348261, u'id': u'qemu/105', u'diskwrite': 1248907264,
u'template': 0, u'netout': 10991935, u'disk': 0, u'type': u'qemu', u'cpu': 0.0106896209386423, u'maxdisk': 10737418240, u'maxmem': 8589934592}
Fix for receiving vm names of disconnected nodes
In environments were are disconnected nodes within the cluster,
vms can still be present but not have a name field within the API.
@ansibot

This comment has been minimized.

Copy link
Contributor

ansibot commented Mar 6, 2019

@resmo

This comment has been minimized.

Copy link
Member

resmo commented Mar 6, 2019

LGTM

@ansibot ansibot removed the needs_triage label Mar 6, 2019

@ansibot ansibot added the stale_ci label Mar 14, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.