Merge lp://staging/~wallyworld/gwacl/azure-management-api-change into lp://staging/gwacl

Proposed by Ian Booth
Status: Merged
Approved by: Ian Booth
Approved revision: 230
Merged at revision: 227
Proposed branch: lp://staging/~wallyworld/gwacl/azure-management-api-change
Merge into: lp://staging/gwacl
Diff against target: 410 lines (+54/-50)
4 files modified
management_base.go (+22/-18)
management_base_test.go (+30/-30)
xmlobjects.go (+1/-1)
xmlobjects_test.go (+1/-1)
To merge this branch: bzr merge lp://staging/~wallyworld/gwacl/azure-management-api-change
Reviewer Review Type Date Requested Status
Julian Edwards (community) Approve
Review via email: mp+193368@code.staging.launchpad.net

Commit message

Azure now requires certain requests to the management api to have an updated version number in the header. Such changes are supposed to be backwards compatible but msft failed not to break existing applications. This branch includes the new api version. It also base64 encodes customdata sent with the request, as this also appears to have changed from underneath us.

With these changes, juju bootstrap now completes and the bootstrap instance spins up. Previously it would have errored part way through bootstrap. There still may be an issue with cloud-init completing properly but if this is the case, it appears to be a separate issue and I'd like to land this branch to allow others with Azure credentials to help debug.

Description of the change

Azure now requires certain requests to the management api to have an updated version number in the header. Such changes are supposed to be backwards compatible but msft failed not to break existing applications. This branch includes the new api version. It also base64 encodes customdata sent with the request, as this also appears to have changed from underneath us.

With these changes, juju bootstrap now completes and the bootstrap instance spins up. Previously it would have errored part way through bootstrap. There still may be an issue with cloud-init completing properly but if this is the case, it appears to be a separate issue and I'd like to land this branch to allow others with Azure credentials to help debug.

To post a comment you must log in.
Revision history for this message
Julian Edwards (julian-edwards) wrote :

<bigjools> wallyworld_: first comment - pease remove the factored version numbers
<wallyworld_> why?
<bigjools> I previously had someone stop doing that - each api request is separately versioned and if you factor it you will introduce subtle bugs
<wallyworld_> it kinda sucks having them all copied and pasted in the code
<bigjools> yes - but it needs to be done
<wallyworld_> ok then
<bigjools> I rooted out at least 3 bugs last time I unfactored it

Revision history for this message
Julian Edwards (julian-edwards) wrote :

453 - customdata := MakeRandomString(10)
454 + customdata := "customdata"
455 + base64EncodedCustomData := "Y3VzdG9tZGF0YQ=="

I'd feel better if you kept this random and calculated the expected base64 encoding.

Everything else looks cool.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches

to all changes: