Bug 1773637
Summary: | cloud-init may rewrite network interface config during subsequent reboots if config-drive is not detected. | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Matt Flusche <mflusche> |
Component: | cloud-init | Assignee: | Eduardo Otubo <eterrell> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | xiachen |
Severity: | high | Docs Contact: | |
Priority: | high | ||
Version: | 7.0 | CC: | carolgrey98, dhill, huzhao, jgreguske, leiwang, linl, merry678garcia, mkalinin, ribarry, xiachen, yacao, yuxisun |
Target Milestone: | rc | ||
Target Release: | --- | ||
Hardware: | x86_64 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | If docs needed, set a value | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2020-11-05 12:20:01 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Matt Flusche
2019-11-18 15:27:40 UTC
The problem here is that if the datasource is not available, we fallback to Fallback/None which changes the instance-id to iid-datasource-none [1]: ~~~ def is_new_instance(self): previous = self.previous_iid() ret = (previous == NO_PREVIOUS_INSTANCE_ID or previous != self.datasource.get_instance_id()) return ret ~~~ and previous_iid is defined by this: ~~~ def previous_iid(self): if self._previous_iid is not None: return self._previous_iid dp = self.paths.get_cpath('data') iid_fn = os.path.join(dp, 'instance-id') try: self._previous_iid = util.load_file(iid_fn).strip() except Exception: self._previous_iid = NO_PREVIOUS_INSTANCE_ID LOG.debug("previous iid found to be %s", self._previous_iid) return self._previous_iid ~~~ This is super easy to reproduce, attach a CD containing the metadata, boot a new instance. Once it booted, shut it down, detach the CD and reboot it again. This is what's happening on an atomic host [2] and this as for effect of wiping the network configuration as well as reverting many settings to the default settings. [1] https://cloudinit.readthedocs.io/en/latest/topics/datasources/fallback.html [2] https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux_atomic_host/7/html/installation_and_configuration_guide/types_of_installation#vmware_installation You're using cloud-init-18.5-3.el7.x86_64, and this same bug should be fixed on cloud-init-18.5-5.el7.x86_64, please give it a try. This comment was flagged a spam, view the edit history to see the original text if required. Did you have a fix on this issue? https://www.spotify-stats.com Cloud-init fails to detect the presence of a config-drive during boot and resets the network configuration to its default first-boot state, even if the system is not in a first-boot state. This happens when the cloud-init partition is removed, causing the network settings in /etc/sysconfig/network-scripts/ifcfg-XX to be overwritten. The issue is reproducible and contradicts the expected behavior of cloud-init skipping network reconfiguration after the first boot https://www.wellstar-mychart.com |