Skip to content

DLPX-69865 IP configuration is lost if a MAC address changes#21

Merged
prakashsurya merged 1 commit into
delphix:masterfrom
prakashsurya:remove-mac-matching
Sep 1, 2020
Merged

DLPX-69865 IP configuration is lost if a MAC address changes#21
prakashsurya merged 1 commit into
delphix:masterfrom
prakashsurya:remove-mac-matching

Conversation

@prakashsurya
Copy link
Copy Markdown
Contributor

To make the network configuration more resilient to changes of the MAC
address, this change modifies the netplan configuration generated by
cloud-init to no longer match on the MAC address. This way, if the MAC
address of a NIC changes (which can happen in VM environments), the
network configuration on the system should still work as before.

@prakashsurya
Copy link
Copy Markdown
Contributor Author

prakashsurya commented Aug 31, 2020

With this change applied:

$ cat /etc/netplan/50-cloud-init.yaml
# This file is generated from information provided by the datasource.  Changes
# to it will not persist across an instance reboot.  To disable cloud-init's
# network configuration capabilities, write a file
# /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following:
# network: {config: disabled}
network:
    ethernets:
        ens160:
            dhcp4: true
            match:
                name: ens160
            set-name: ens160
    version: 2

To make the network configuration more resilient to changes of the MAC
address, this change modifies the netplan configuration generated by
cloud-init to no longer match on the MAC address. This way, if the MAC
address of a NIC changes (which can happen in VM environments), the
network configuration on the system should still work as before.
@prakashsurya
Copy link
Copy Markdown
Contributor Author

git-ab-pre-push is here

@prakashsurya
Copy link
Copy Markdown
Contributor Author

Also worth noting, this is only half of the solution to address DLPX-69865; I still need to develop a similar change for the configuration we generate via the DE software. I'll open a review for that once I have it ready.

Copy link
Copy Markdown
Contributor

@pzakha pzakha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This LGTM.

Also, there might be another part to it, that is what to do with engines that were previously configured by cloud-init with MAC address matching. That could be addressed by your other change that tries to re-apply network configuration on each boot (although that could potentially add latency to the boot), or somehow trigger a one-time reconfiguration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants