-
Notifications
You must be signed in to change notification settings - Fork 9.6k
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
vsphere virtual machine resource resolves multiple networks #5607
Comments
Great find btw, and thanks for the time that you took on this issue ... so this smells like API level fun. I am thinking that we need to test removing the * out of the code, but then you have to fully reference the network name ... Kinda a catch 22. Let us ping the guys on govomi: Oooh @pietern @dougm @cblomart is there a better way to design this? Let me know if your team wants me to open a issue on govomi. And @tkak any ideas? @kzittritsch are you able to help with this??? You are running vSphere 5.5 with what setup (Cluster, etc)? Can you test this with master please for ease of fixing this. What version of govomi are you running? |
I am happy to help test this issue. Give me a couple days to generate some results |
@dkalleg, @kristinn, @tkak we have an interesting feature in our code :) Two main things are being reported: First code does not support full path notation for a network device. For example '
Secondly our code's search method allows for wildcard search results to be found. You have QA1 an QA2 networks, and you should get this codes results. @dkalleg, @kristinn, @tkak you guys have any design opinions on how to proceed? Maybe:
I the name |
@xantheran and @kzittritsch dragged a couple of other active developers in to see if we can come up with a better solution that I am thinkin of ;) |
I am able to test for vsphere 5.5 and 6 in clustered environments as well. |
It would be best to keep the label key and intelligently resolve it to the correct network/vlan. |
I would be happy to help test your branch @chrislovecnm email me the details and we can go from there |
@chrislovecnm Is this solved in the branch you referred to? |
@kristinn no ... that is just ipWait stuff. This is an open issue . I need to keep the correct comments on the correct issue ... <facepalm> |
@markpeek and @frapposelli - this is the open issue that I mentioned. The manner in which we are doing the network lookups uses a wild card. I would like some idea on how to do this w/o a breaking change. Here are some thoughts
I do like the second options, but we would need to document the heck out of it. @dkalleg @tkak @kristinn @stack72 @jen20 any ideas / feedback would be appreciated! |
Thanks everyone for taking a look at this. Why not just remove the "forced" wildcard prefix and, if a user would like to wildcard searching, they can prefix/append it on their |
@markpeek and @frapposelli are you guys going to take a stab at this one? |
I am running into the same issue @kzittritsch seems to be having. Is there a plan to remove this wildcard from the provider? |
Is there any solution for the issue? |
It is an open issue that requires a coding change. |
Hi @chrislovecnm , Do you have any update? Cheers |
I am by no means a Golang expert, or a govmomi expert for that matter, but I propose something like this:
This will retry after stripping the leading I would submit this myself as a pull request but I feel these cases ought to have good testing around them and I'm not sure where in the code base that happens. |
There seems to be an assumption that the prepended Govmomi Anyway, in Since datacenters define a namespace for objects, I think we should aim to refer to the object name Short of an update of govmomi, I propose a sequence of similar retries (e.g., |
I was able to work around this using a partial path gathered from govc ls Network-Non-Production/BU_FOLDER/ClusterName/MY_NETWORK_LABEL |
i am not sure how to work around this issue. If I use path from govc ls, I get |
@rismoney did you leave off the / at the beginning of the path? |
Thanks for the tip @joshmullis In toying more with govc, I ultimately realized why i was getting issue. my network paths are not totally unique- My workaround is going to be a rename of the port groups (as I am not holding my breath on a year old issue) |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
I am trying to use the vsphere virtual machine resource but am running into an issue where vsphere is returning multiple networks due to (I think) a
*
being prefixed to the network label in the provider:https://github.com/hashicorp/terraform/blob/master/builtin/providers/vsphere/resource_vsphere_virtual_machine.go#L657
The terraform error message:
My
network_interface
configuration inside my virtual machine resource config:Using govc I can see how this wildcard resolution is causing a conflict because I have two networks that end in
"QA"
:It does not appear that I can provide a full path to the network in the
label
field (ie supplyinglabel = "/VT/network/QA"
results in an errorcannot traverse type Network
). I threw together a small test to confirm that dropping the*
allows theFinder.Network()
method to resolve each network individually.In the current resource, short of renaming my networks in vsphere, is there a way to create a virtual machine with my "QA" network? I am using terraform 0.6.11 and vsphere 5.5 btw.
The text was updated successfully, but these errors were encountered: