Merge ~dojordan/cloud-init:azure-preprovisioning into cloud-init:master
| Status: | Needs review |
|---|---|
| Proposed branch: | ~dojordan/cloud-init:azure-preprovisioning |
| Merge into: | cloud-init:master |
| Diff against target: |
459 lines (+258/-22) 4 files modified
.gitignore (+1/-0) cloudinit/sources/DataSourceAzure.py (+128/-9) cloudinit/url_helper.py (+12/-7) tests/unittests/test_datasource/test_azure.py (+117/-6) |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Server Team CI bot | continuous-integration | Approve 1 hour ago | |
| Scott Moser | Needs Fixing on 2018-01-03 | ||
| Chad Smith | Approve on 2017-12-14 | ||
| Paul Meyer (community) | 2017-11-28 | Approve on 2017-12-01 | |
|
Review via email:
|
|||
Commit Message
Azure VM Preprovisioning support.
This change will enable azure vms to report provisioning has completed twice, first to tell the fabric it has completed then a second time to enable customer settings. The datasource for the second provisioning is the Instance Metadata Service (IMDS), and the VM will poll indefinitely for the new ovf-env.xml from IMDS.
LP: #1734991
Description of the Change
Azure VM Preprovisioning support.
This change will enable azure vms to report provisioning has completed twice, first to tell the fabric it has completed then a second time to enable customer settings. The datasource for the second provisioning is the Instance Metadata Service (IMDS), and the VM will poll indefinitely for the new ovf-env.xml from IMDS.
LP: 1734991
| Paul Meyer (paul-meyer) wrote : | # |
| Scott Moser (smoser) wrote : | # |
Fix your commit message (press 'Set commit message' above).
Summary
<blank>
More info
FAILED: Continuous integration, rev:
https:/
Executed test runs:
FAILED: Checkout
Click here to trigger a rebuild:
https:/
| Douglas Jordan (dojordan) wrote : | # |
> FAILED: Continuous integration, rev:
> https:/
> Executed test runs:
> FAILED: Checkout
>
> Click here to trigger a rebuild:
> https:/
Looks like the git checkout failed. Thoughts?
stderr: remote: Authorisation required.
fatal: Authentication failed for 'https:/
FAILED: Continuous integration, rev:72e423b4a08
https:/
Executed test runs:
SUCCESS: Checkout
SUCCESS: Unit & Style Tests
SUCCESS: Ubuntu LTS: Build
SUCCESS: Ubuntu LTS: Integration
FAILED: MAAS Compatability Testing
Click here to trigger a rebuild:
https:/
FAILED: Continuous integration, rev:384b7731e99
https:/
Executed test runs:
SUCCESS: Checkout
SUCCESS: Unit & Style Tests
SUCCESS: Ubuntu LTS: Build
SUCCESS: Ubuntu LTS: Integration
FAILED: MAAS Compatability Testing
Click here to trigger a rebuild:
https:/
FAILED: Continuous integration, rev:d00ec2ec822
https:/
Executed test runs:
SUCCESS: Checkout
FAILED: Unit & Style Tests
Click here to trigger a rebuild:
https:/
PASSED: Continuous integration, rev:6021da2b61a
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:/
| Douglas Jordan (dojordan) wrote : | # |
Thanks for the feedback. I've resolved your comments.
PASSED: Continuous integration, rev:ff0b7b0b5fd
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 : | # |
Douglas, thanks for working this. I'm going to mark it work in progress as you address or respond to comments. When you'd like another review pass please just mark it back to "Needs review"
FAILED: Continuous integration, rev:10c6b219ba7
https:/
Executed test runs:
SUCCESS: Checkout
FAILED: Unit & Style Tests
Click here to trigger a rebuild:
https:/
PASSED: Continuous integration, rev:e06a7627419
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 : | # |
Thanks for the rework and comments. One more pass on this. I'll test against stock azure xenial today and report here.
PASSED: Continuous integration, rev:c500a0184b8
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 : | # |
Ok one last nit from me and it looks good. I need a bit of testing still on this but content looks good.
| Chad Smith (chad.smith) wrote : | # |
one last try on the nit
PASSED: Continuous integration, rev:3c9509671f0
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:/
| Scott Moser (smoser) wrote : | # |
There are some comments in line.
I'm not sure I fully understand all of this.
I could be wrong here, but I think you're using
bounce_
We have 2 ways now of brining up ephemeral networking for this purpose:
a.) Chad has recently added code in the EC2 metadata service using cloudinit/
b.) the digital ocean datasource has code to negotiate a ipv4 link local address.
If 'b' is sufficient, I'd prefer that, but either one I'd prefer to the bounce_network_ which i think may actually not work for you if you rebased to trunk.
As mentioned in IRC, I'm still concerned about systemd giving up and deciding that boot has failed after some amount of time polling on a metadata service. As Douglas pointed out, cloud-init has timeouts set to 0 and is a 'oneshot', so *its* timeout is not an issue, but I think that things that it runs 'Before' or (pre-networking or other) might end up timing out.
| Scott Moser (smoser) wrote : | # |
some things there need fixing, definitely need rebase to trunk (I suspect you'll have conflicts), but if not, some thought is needed.
- fd33d0a... by Douglas Jordan on 2018-01-04
- 8b89d2d... by Douglas Jordan on 2018-01-04
- c207d44... by Douglas Jordan on 2018-01-05
FAILED: Continuous integration, rev:c207d443ca3
https:/
Executed test runs:
SUCCESS: Checkout
FAILED: Unit & Style Tests
Click here to trigger a rebuild:
https:/
- ba329ca... by Douglas Jordan on 2018-01-05
FAILED: Continuous integration, rev:ba329ca5cde
https:/
Executed test runs:
SUCCESS: Checkout
FAILED: Unit & Style Tests
Click here to trigger a rebuild:
https:/
- 93d88e2... by Douglas Jordan on 2018-01-05
PASSED: Continuous integration, rev:93d88e25a1d
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:/
| Douglas Jordan (dojordan) wrote : | # |
Thanks for the comments Scott-
The reason for the bounce_
> There are some comments in line.
> I'm not sure I fully understand all of this.
>
> I could be wrong here, but I think you're using
> bounce_
>
> We have 2 ways now of brining up ephemeral networking for this purpose:
> a.) Chad has recently added code in the EC2 metadata service using
> cloudinit/
> b.) the digital ocean datasource has code to negotiate a ipv4 link local
> address.
>
> If 'b' is sufficient, I'd prefer that, but either one I'd prefer to the
> bounce_network_ which i think may actually not work for you if you rebased to
> trunk.
>
> As mentioned in IRC, I'm still concerned about systemd giving up and deciding
> that boot has failed after some amount of time polling on a metadata service.
> As Douglas pointed out, cloud-init has timeouts set to 0 and is a 'oneshot',
> so *its* timeout is not an issue, but I think that things that it runs
> 'Before' or (pre-networking or other) might end up timing out.
| sushant (sushantsharma) wrote : | # |
<not sure why the inline comment does not show up>
Hi Douglas, Can you please add a comment before line 83 (where you catch exception and re-DHCP) saying that this is temporary. We plan to add a networking module specific to azure in cloud-init and will address re-DHCP need in that module. The plan is to submit that module for review in a week or so. Thanks!
- fc01540... by Douglas Jordan on 2018-01-08
PASSED: Continuous integration, rev:fc0154011d4
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:/
| Scott Moser (smoser) wrote : | # |
As it is right now, 'bounce_
on Ubuntu 18.04 (bionic) or any system without 'ifup'.
So while you want this fixed in 16.04, the general Ubuntu development
path insists that we make things work on the development release first
and the SRU them back to 16.04.
In summary: I can't let this in as broken on bionic. We'll need to find
a way to make that work on 18.04.
Your commit message says:
| This change will enable azure vms to report provisioning has completed
| twice, first to tell the fabric it has completed then a second time to
| enable customer settings.
Is that true, will it *always* report reprovisioning has completed twice?
there are some small inlinel things also.
those are the big things though. thanks for your work.
| Douglas Jordan (dojordan) wrote : | # |
Regarding the DHCP stuff: We are exploring an alternate solution to bounce the nic from hyper-v, but in the mean time we would like to get this checked in. So an alternate solution for bionic would be to simply change the hostname. This way, systemd-networkd will keep re triggering DHCP. Once we get the final ovf_env.xml from IMDS, we will actually apply the real, customer provided hostname.
Regarding "Is that true, will it *always* report reprovisioning has completed twice?"-
tldr; yes. Technically, it will report "provisioning" has completed twice, while we are calling the second incarnation "reprovisioning"
- 7f23e5c... by Douglas Jordan 1 hour ago
PASSED: Continuous integration, rev:7f23e5c4808
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:/
Unmerged commits
- 7f23e5c... by Douglas Jordan 1 hour ago
- fc01540... by Douglas Jordan on 2018-01-08
- 93d88e2... by Douglas Jordan on 2018-01-05
- ba329ca... by Douglas Jordan on 2018-01-05
- c207d44... by Douglas Jordan on 2018-01-05
- 8b89d2d... by Douglas Jordan on 2018-01-04
- fd33d0a... by Douglas Jordan on 2018-01-04
- 3c95096... by Douglas Jordan on 2017-12-11
- 37f9ff8... by Douglas Jordan on 2017-12-11
- c500a01... by Douglas Jordan on 2017-12-11


Looks good to me (after you fix the tests and flake8's)