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

getinventory error #253

Closed
danilansible opened this issue Apr 20, 2021 · 7 comments
Closed

getinventory error #253

danilansible opened this issue Apr 20, 2021 · 7 comments
Assignees
Labels

Comments

@danilansible
Copy link

Hi,

Deployed new version 0.99g codename “Ravenholm”
Getting below error while running refresh inventory and offline inventory too shows nothing.

[2021/04/20 13:28:14] /root/getInventory.pl line249 - [INFO] Start processing vCenter myvc.mydomain.com
[2021/04/20 13:28:26] /root/getInventory.pl line160 - DIE Can't call method "value" on an undefined value at /root/getInventory.pl line 160.

160 my $cluster = $h_cluster{($h_hostcluster{$vm_view->{'runtime.host'}->value} ? $h_ hostcluster{$vm_view->{'runtime.host'}->value} : "domain-c000")};

Can someone help please

@rschitz
Copy link
Member

rschitz commented Apr 20, 2021

do you have orphaned vms on this host?

@danilansible
Copy link
Author

@rschitz Yes Raphael

@rschitz
Copy link
Member

rschitz commented Apr 21, 2021

that should be filtered by the {'runtime.connectionState' => "connected"} filter but i'll add an eval arround the vm processing to fix this, thanks for your feedback. i'll let you know when you can test the new getInventory.pl script

@rschitz rschitz self-assigned this Apr 21, 2021
@rschitz rschitz added the bug label Apr 21, 2021
@rschitz rschitz added this to the 0.99h - Highway 17 milestone Apr 21, 2021
rschitz added a commit that referenced this issue Apr 21, 2021
@rschitz
Copy link
Member

rschitz commented Apr 21, 2021

@danilansible
Copy link
Author

@rschitz Thank you so much

I'm not sure if the orphan vms get deleted on a regular scheduled intervals.
So even though the error showed later inventory was fine and the error too went away.

`[2021/04/20 16:03:01] /root/getInventory.pl line249 - [INFO] Start processing vCenter myvc2.domain.com
[2021/04/20 16:03:06] /root/getInventory.pl line205 - [INFO] Successfully retrieve 547 VM for vCenter server myvc2.domain.com in 5s
[2021/04/20 16:03:06] /root/getInventory.pl line252 - [INFO] End processing vCenter myvc2.domain.com
[2021/04/20 16:03:06] /root/getInventory.pl line249 - [INFO] Start processing vCenter myvc.domain.com
[2021/04/20 16:03:19] /root/getInventory.pl line160 - DIE Can't call method "value" on an undefined value at /root/getInventory.pl line 160.

[2021/04/20 17:03:01] /root/getInventory.pl line249 - [INFO] Start processing vCenter myvc2.domain.com
[2021/04/20 17:03:06] /root/getInventory.pl line205 - [INFO] Successfully retrieve 547 VM for vCenter server myvc2.domain.com in 5s
[2021/04/20 17:03:06] /root/getInventory.pl line252 - [INFO] End processing vCenter myvc2.domain.com
[2021/04/20 17:03:06] /root/getInventory.pl line249 - [INFO] Start processing vCenter myvc.domain.com
[2021/04/20 17:03:19] /root/getInventory.pl line160 - DIE Can't call method "value" on an undefined value at /root/getInventory.pl line 160.

[2021/04/20 18:03:02] /root/getInventory.pl line249 - [INFO] Start processing vCenter myvc2.domain.com
[2021/04/20 18:03:06] /root/getInventory.pl line205 - [INFO] Successfully retrieve 548 VM for vCenter server myvc2.domain.com in 4s
[2021/04/20 18:03:06] /root/getInventory.pl line252 - [INFO] End processing vCenter myvc2.domain.com
[2021/04/20 18:03:06] /root/getInventory.pl line249 - [INFO] Start processing vCenter myvc.domain.com
[2021/04/20 18:03:19] /root/getInventory.pl line205 - [INFO] Successfully retrieve 2976 VM for vCenter server myvc.domain.com in 13s
[2021/04/20 18:03:19] /root/getInventory.pl line252 - [INFO] End processing vCenter myvc.domain.com`

@danilansible
Copy link
Author

can you try this one please? https://github.com/sexibytes/sexigraf/blob/927692941e8e4a239b01f0bb5155910b38658759/root/getInventory.pl

This one worked fine without any issues too.
Thank you so much for this excellent tool.

@rschitz
Copy link
Member

rschitz commented Apr 21, 2021

Great, thanks a lot for your feedback and your support!
Please let me know if you got anything else on your mind.

@rschitz rschitz closed this as completed Apr 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants