Merge lp:~jtv/maas/bug-1373261 into lp:~maas-committers/maas/trunk
Status: | Merged |
---|---|
Approved by: | Jeroen T. Vermeulen |
Approved revision: | no longer in the source branch. |
Merged at revision: | 3352 |
Proposed branch: | lp:~jtv/maas/bug-1373261 |
Merge into: | lp:~maas-committers/maas/trunk |
Diff against target: |
503 lines (+476/-0) 3 files modified
src/provisioningserver/__main__.py (+2/-0) src/provisioningserver/configure_maas_url.py (+123/-0) src/provisioningserver/tests/test_configure_maas_url.py (+351/-0) |
To merge this branch: | bzr merge lp:~jtv/maas/bug-1373261 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Gavin Panella (community) | Approve | ||
Review via email: mp+241123@code.launchpad.net |
Commit message
Python replacement for maas-cluster-
This is lots and lots more work than the old shell code, but it has two advantages: it's covered by the test suite, and it supports IPv6 addresses in URLs. These have a special syntax, and caused our shell code to corrupt pserv.yaml.
Description of the change
The problem with the shell code was that it mistook any colon (":") in the generator URL for the beginning of a port specifier. Thus, once you had an IPv6-based URL configured, reconfiguring for a different host would produce garbage in pserv.yaml.
While I was at it, I opted to handle both config files that this shell code rewrites. The one that needed fixing was the hard one anyway, so replacing a bit more shell code was a cheap bonus.
An accompanying packaging change will replace the postinst shell code with an invocation of the new maas-provision sub-command.
Jeroen
Nice :)