Merge ~sankaraditya/cloud-init:topic-stanguturi-vmware-etc-hosts into cloud-init:master

Proposed by Sankar Tanguturi
Status: Merged
Approved by: Scott Moser
Approved revision: a90b09b95d25cab8edb7c3c803d2d7de76222d33
Merged at revision: 7629702ca0956fb26d27ee19ed99306f73421c66
Proposed branch: ~sankaraditya/cloud-init:topic-stanguturi-vmware-etc-hosts
Merge into: cloud-init:master
Diff against target: 16 lines (+1/-1)
1 file modified
cloudinit/sources/DataSourceOVF.py (+1/-1)
Reviewer Review Type Date Requested Status
Scott Moser Approve
Server Team CI bot continuous-integration Approve
Chad Smith Pending
Review via email: mp+330608@code.launchpad.net

Commit message

Enable NICS before notifying the SUCCESS event to VMware hypervisor.

Description of the change

Enable NICS before notifying the SUCCESS event.

The NICS should be enabled before sending the 'SUCCESS' event to
the underlying hypervisor. Made necessary changes.

To post a comment you must log in.
Revision history for this message
Server Team CI bot (server-team-bot) wrote :

PASSED: Continuous integration, rev:7ac713d158c9d91350c38ad40ce6df4d74d853ec
https://jenkins.ubuntu.com/server/job/cloud-init-ci/286/
Executed test runs:
    SUCCESS: Checkout
    SUCCESS: Unit & Style Tests
    SUCCESS: Ubuntu LTS: Build
    SUCCESS: Ubuntu LTS: Integration
    SUCCESS: MAAS Compatability Testing
    IN_PROGRESS: Declarative: Post Actions

Click here to trigger a rebuild:
https://jenkins.ubuntu.com/server/job/cloud-init-ci/286/rebuild

review: Approve (continuous-integration)
Revision history for this message
Scott Moser (smoser) wrote :

Hi Sankar,

manage_etc_hosts is a real pain.
Setting this means that `hostname` will return 127.0.0.1. I assume your
motivation for doing this is to avoid the annoying 'sudo' warning.

Any change here breaks something, so I think it is best to tell the
user to opt in to this change. The primary reason that we do not
write a 127.0.1.1 address for 'hostname' is that ... for better
or worse, some applications (primarily java in my experience) will do
basically use the result of `hostname -f` and tell other
network applications that that is their address.

Ie, run a webserver, it says "Hey everyone, you can reach me at `hostname
-fqdn`" which then resolves to the localhost address, and then ...
doesn't work for anyone other than that host. See bug 871966 and bug
890501
for more info.

So.. I'd really rather not make this change as it *does* cause a
noticable change in behavior and would make Ubuntu on vmware different
than Ubuntu on other clouds.

The other change seems fine.

review: Needs Fixing
Revision history for this message
Sankar Tanguturi (sankaraditya) wrote :

> Any change here breaks something, so I think it is best to tell the
> user to opt in to this change. The primary reason that we do not
> write a 127.0.1.1 address for 'hostname' is that ... for better

Thanks Scott. I will add a config switch to opt in for this change. Will update the diff.

a90b09b... by Sankar Tanguturi

  Do not set 'manage_etc_hosts' option.

  Check the comments in
  https://code.launchpad.net/~sankaraditya/cloud-init/+git/cloud-init/+merge/330608
  for more details. Decided not to set 'manage_etc_hosts' option.

Revision history for this message
Sankar Tanguturi (sankaraditya) wrote :

Thanks Scott. I have removed 'manage_etc_hosts' setting. Only the NICS enabling is done in this change. Updated the commit message.

Revision history for this message
Server Team CI bot (server-team-bot) wrote :

PASSED: Continuous integration, rev:a90b09b95d25cab8edb7c3c803d2d7de76222d33
https://jenkins.ubuntu.com/server/job/cloud-init-ci/296/
Executed test runs:
    SUCCESS: Checkout
    SUCCESS: Unit & Style Tests
    SUCCESS: Ubuntu LTS: Build
    SUCCESS: Ubuntu LTS: Integration
    SUCCESS: MAAS Compatability Testing
    IN_PROGRESS: Declarative: Post Actions

Click here to trigger a rebuild:
https://jenkins.ubuntu.com/server/job/cloud-init-ci/296/rebuild

review: Approve (continuous-integration)
Revision history for this message
Scott Moser (smoser) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/cloudinit/sources/DataSourceOVF.py b/cloudinit/sources/DataSourceOVF.py
index aa5f798..24b45d5 100644
--- a/cloudinit/sources/DataSourceOVF.py
+++ b/cloudinit/sources/DataSourceOVF.py
@@ -182,10 +182,10 @@ class DataSourceOVF(sources.DataSource):
182182
183 # TODO: Need to set the status to DONE only when the183 # TODO: Need to set the status to DONE only when the
184 # customization is done successfully.184 # customization is done successfully.
185 enable_nics(self._vmware_nics_to_enable)
185 set_customization_status(186 set_customization_status(
186 GuestCustStateEnum.GUESTCUST_STATE_DONE,187 GuestCustStateEnum.GUESTCUST_STATE_DONE,
187 GuestCustErrorEnum.GUESTCUST_ERROR_SUCCESS)188 GuestCustErrorEnum.GUESTCUST_ERROR_SUCCESS)
188 enable_nics(self._vmware_nics_to_enable)
189189
190 else:190 else:
191 np = {'iso': transport_iso9660,191 np = {'iso': transport_iso9660,

Subscribers

People subscribed via source and target branches