Skip to content
This repository has been archived by the owner on Aug 23, 2021. It is now read-only.

fix: make sure nics are enable #43

Closed
wants to merge 6 commits into from

Conversation

jfroche
Copy link

@jfroche jfroche commented Jun 15, 2020

New machines created from a template sometimes don't have its network
interfaces connected to the network. This happen for example when
terraform customize the template after cloning.

To fix this issue, we do the same as DataSourceOVF1 and make sure that
the interfaces defined by vmware-imc connect using vmware-rpctool.

similar issue: vmware/open-vm-tools#299

foxalfabravo and others added 5 commits September 16, 2020 16:57
cloud-init >= 20.3, subp is a seperate module.
So, data source should be modified accordingly. If someoone is using
guestinfo data source with cloud-init <=20.2 we should not break things.

See the below link for more details:
canonical/cloud-init@3c551f6

This patch takes care of the above things.
Tested on Photon 3.0 VM with Photon OS using package test scripts.

Signed-off-by: Shreenidhi Shedi <[email protected]>
Made minor code improvements in getting subp module

Signed-off-by: Shreenidhi Shedi <[email protected]>
New machines created from a template sometimes don't have its network
interfaces connected to the network. This happen for example when
terraform customize the template after cloning.

To fix this issue, we do the same as DataSourceOVF[1] and make sure that
the interfaces defined by vmware-imc connect using vmware-rpctool.

similar issue: vmware/open-vm-tools#299

[1]: https://github.com/canonical/cloud-init/blob/master/cloudinit/sources/DataSourceOVF.py#L261
@prologic
Copy link

Why is this not merged?

@akutz
Copy link
Contributor

akutz commented Mar 11, 2021

Why is this not merged?

Because it:

  • has merge conflicts
  • uses a working branch in the install script instead of the real one
  • was partially resolved on a different PR and has never been updated

@prologic
Copy link

Where was this partially solved elsewhere?

@akutz
Copy link
Contributor

akutz commented Mar 11, 2021

Where was this partially solved elsewhere?

#51, #53, and #54 all address the subp logic this PR also addresses. If this PR rebases on main, fixes the conflicts, and then squashes its commits, it can be considered for merge.

@akutz
Copy link
Contributor

akutz commented Mar 11, 2021

If you are interested in seeing this merged and would like to open a PR with this, addressing the above issues, please do so, and I will review in the morning (it's just past midnight here).

@prologic
Copy link

Thanks will do! I'm still trying to figure out and understand why when I Terraform up some vSphere virtual machines resources from a template with customisations the NC(s) are left in a "disconnected" state. This only seems to happen when disable_vmware_customize: false appears in /etc/cloud/cloud.cfg which is read by vmtoolsd from vmware/open-vm-tools -- I'm avoiding that code-path for the time being by commenting out the customization { ...} in my Terraform specs.

If it turns out this PR is still needed, I'll happily clean it up and re-submit a PR based off this work.

@akutz
Copy link
Contributor

akutz commented Aug 11, 2021

This issue is being closed because this datasource has been merged into cloud-init (canonical/cloud-init#953):

Component Source Tests
Datasource DataSourceVMware.py test_vmware.py
Identification ds-identify test_ds_identify.py
Documentation vmware.rst

In order to participate in the growth of this datasource moving forward, please:

Once again, many thanks to the wonderful community that has grown around this datasource, and I look forward to seeing everyone in the new cloud-init forums!

@akutz akutz closed this Aug 11, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants