waldirio / rvtools_python

Application to be executed on Linux and collect all information from vCenter
10 stars 10 forks source link

In a multi datacenter/multi cluster environment, the cluster and datacenter attributes are all the same in console and csv output #38

Open jsasunci opened 3 years ago

jsasunci commented 3 years ago

Using python3.4 in a multi datacenter/multi cluster environment, the cluster and datacenter attributes are all the same in console and csv output. For each VM in the output, the cluster is repeated regardless of the cluster the VM is actually on, same symptom from the datacenter attribute in the output. It appears that both attributes are the firs dc or cluster seen, respectively. I'm not sure how to work around.

waldirio commented 2 years ago

Hello @JAsuncion1969

Thanks for the heads up. Are you able to provide some screenshot that will help me to reproduce?

From there, I'll fix this behavior and push a new version.

Thank you again!

jsasunci commented 2 years ago

Thanks @waldirio I appreciate you looking into this. I can't share the exact output I'm seeing but I'm attaching some example output. The columns for "cluster" and "datacenter" (B and C in the example, respectively) are the ones that come out wrong. I've removed the output that isn't an issue but left in the Host and VM clusters with some info. For my example system I have three Datacenter environments, each with two clusters:

Datacenters Clusters Atlanta Atlanta01, Atlanta02 Rio Rio01, Rio02 Miami Miami01, Miami02

vinfo_example.csv

The output Datacenter all appear as a single DC as well as the output Cluster. I cannot see any reason that a particular cluster or DC is listed but after multiple attempts, they always appear to be the same values. On multiple VCenter servers, this happens on all of them.

I have tried this on both Python 3.4 and 3.6 with the same results. Looking in the vinfo.py file, I can see that the coding for datacenter and clustercomputeresource are coded a bit differently than the other output columns. Looking in the VCenter API documentation both datacenter and clustercomputeresource are managed objects but I'm unsure how those need to be handled differently.

Thanks, Jeb

waldirio commented 2 years ago

Hello @JAsuncion1969

Thanks, I can see the data and the issue you are facing.

I'll be checking this ASAP and I'll keep you in touch.

Thank you Waldirio

waldirio commented 2 years ago

Hello @JAsuncion1969

I believe you saw the other update, from now, you should be able to use the binary which means, it's not necessary anymore to create a virtual environment, once you have python 3.6.8+, just download, change the permission chmod +x rvtools and execute it.

I'll be working on this current issue, and I believe in the next version, the report will be correct for you.

Thanks for being using the rvtools_python and sorry for the long time to fix this up. Waldirio

waldirio commented 6 months ago

Hello @jsasunci

The version installed via pip is already updated, similar to the binary version. I'm back on this project.

Please, let me know if you are still facing the issue.

Sorry for my long time to reply, and thank you for your help. Waldirio