Merge ~chad.smith/cloud-init:ec2-dhcp-local-ipv4 into cloud-init:master
| Status: | Merged |
|---|---|
| Merged at revision: | eb292c18c3d83b9f7e5d1fd81b0e8aefaab0cc2d |
| Proposed branch: | ~chad.smith/cloud-init:ec2-dhcp-local-ipv4 |
| Merge into: | cloud-init:master |
| Diff against target: |
276 lines (+149/-11) 2 files modified
cloudinit/sources/DataSourceEc2.py (+19/-5) tests/unittests/test_datasource/test_ec2.py (+130/-6) |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Server Team CI bot | continuous-integration | Approve on 2017-10-31 | |
| Scott Moser | 2017-10-27 | Approve on 2017-10-31 | |
|
Review via email:
|
|||
Commit Message
EC2: Limit network config to fallback nic, fix local-ipv4 only instances.
VPC instances have the option to specific local only IPv4 addresses. Allow
Ec2Datasource to enable dhcp4 on instances even if local-ipv4s is
configured on an instance.
Also limit network_
LP: #1728152
Description of the Change
EC2: Use the fallback nic for network configuration. Limit config to 1 nic
VPC instances have the option to specific local only IPv4 addresses. Allow
Ec2Datasource to enable dhcp4 on instances even if local-ipv4s is
configured on an instance. Also limit network_
primary (fallback) nic.
LP: #1728152
| Ryan Harper (raharper) wrote : | # |
I'm a bit confused here w.r.t testing for the presense of public or private ips and resulting in configuring DHCPv4.
I'm looking in the Amazon EC2 docs to see (and maybe it's worth looking into an Amazon Linux instance here) but; if we're being provided with a specific IP (or list of ips) then instead of configuring DHCPv4 shouldn't we just configuring statically?
Also, it seems that we should at a minimum provide a fallback on "dhcp on 'eth0'" equivalent that we had prior to the IPv6 check.
- b6e0d54... by Chad Smith on 2017-10-30
FAILED: Continuous integration, rev:b6e0d54c171
https:/
Executed test runs:
SUCCESS: Checkout
FAILED: Unit & Style Tests
Click here to trigger a rebuild:
https:/
| Scott Moser (smoser) wrote : | # |
one minor comment.
- f5b4601... by Chad Smith on 2017-10-30
- b2064bf... by Chad Smith on 2017-10-30
| Ryan Harper (raharper) wrote : | # |
I would like to see a bit of re-wording on the commit.
The primary change is to use the fallback-nic and always configure DHCP4 on it;
that was the change in behavior that really needs to be resolved.
Secondarily, under VPC which only use private-ips, we need to check if there are
interfaces there.
PASSED: Continuous integration, rev:b2064bf6eeb
https:/
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:/
| Chad Smith (chad.smith) wrote : | # |
Just tested on cloud-init with the following:
git clone <email address hidden>
git clone https:/
export PATH=$PATH:
./scripts/
ssh -i ~/Downloads/
ubuntu@
cloud-init 17.1-30-
ubuntu@
{
"v1": {
"datasource": "DataSourceEc2L
"errors": []
}
}
| Chad Smith (chad.smith) wrote : | # |
ubuntu@
# This file is generated from information provided by
# the datasource. Changes to it will not persist across an instance.
# To disable cloud-init's network configuration capabilities, write a file
# /etc/cloud/
# network: {config: disabled}
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dhcp
- ac118ac... by Chad Smith on 2017-10-31
| Scott Moser (smoser) wrote : | # |
I adjusted the commit message a bit, but pending a c-i bot approving, then go ahead and merge.
thanks.
PASSED: Continuous integration, rev:ac118ac287b
https:/
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:/
| Chad Smith (chad.smith) wrote : | # |
Validated latest on EC2
ubuntu@
cloud-init 17.1-27-
ubuntu@
{
"v1": {
"datasource": "DataSourceEc2L
"errors": []
}
}
ubuntu@


PASSED: Continuous integration, rev:dacb86f7cc6 976c1154c5a2171 500e226cc04a8e /jenkins. ubuntu. com/server/ job/cloud- init-ci/ 442/
https:/
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: /jenkins. ubuntu. com/server/ job/cloud- init-ci/ 442/rebuild
https:/