Skip to content
This repository was archived by the owner on May 30, 2023. It is now read-only.

coreos-base/oem-rackspace: Get public and private IP based on routes #184

Open
wants to merge 1 commit into
base: flatcar-master
Choose a base branch
from

Conversation

pothos
Copy link
Contributor

@pothos pothos commented Feb 20, 2020

Regardless of the ifname scheme, get the public and private IPs
based on the routes that get set up or by the prefix they have.
https://support.rackspace.com/how-to/basic-network-troubleshooting/
shows that the private IPs (ServiceNet) are 10.x.x.x.

@pothos pothos requested review from t-lo and dongsupark February 20, 2020 15:15
@pothos
Copy link
Contributor Author

pothos commented Feb 20, 2020

This PR is not really related to flatcar/bootengine#6 because this script here runs after the initramfs has finished, so it uses the persistent names anyway unless the interface types are excluded (e.g., because they are virtio interfaces). Nevertheless I think we should not hardcode eth0 and eth1, thus the fix.

Disclaimer: I did not test it on Rackspace directly, nor do I know if the code actually worked before.

The OEM package does not set net.ifnames=0 in the kernel command line
(as, for example, oem-ec2-compat does) to ensure that ifnames are ethX.

Regardless of the ifname scheme, get the public and private IPs
based on the routes that get set up or by the prefix they have.
https://support.rackspace.com/how-to/basic-network-troubleshooting/
shows that the private IPs (ServiceNet) are 10.x.x.x.
@pothos pothos force-pushed the kai/rackspace-get-ips branch from a12d0a0 to a5cff68 Compare February 20, 2020 15:36
Copy link
Contributor

@dongsupark dongsupark left a comment

Choose a reason for hiding this comment

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

The code looks good.
Though I have no idea if the script runs well on Rackspace.

@dongsupark
Copy link
Contributor

It needs a rebase

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.

2 participants