Descriptionvarious: Provision machines with networks
This changes a few things in the provisioner API:
* AddNetworks() and AddNetworkInterfaces() are
removed (both from state/api and state/apiserver);
* SetInstanceInfo added (see below)
Changes in state:
* Machine.SetInstanceInfo replaces the SetProvisioned
method and does the same job, but also accepts two
lists - networks and NICs to create, which are created
before calling SetProvisioned internally. This is just
a quick-and-dirty fix to enable VLAN support. Later,
this method will be changed to execute all steps in a
single transaction.
As before, existing networks/interfaces are not an
error when given to SetInstanceInfo, but invalid ones
cause errors and stop the provisioning.
Changes in worker/provisioner:
* Now, once we get the networks from StartInstance, we
prepare the args and call SetInstanceInfo.
* If SetInstanceInfo fails, we set StatusError on the
machine, stop the instance and keep going instead of
killing the provisioner task (added test for that).
Changes in provider/maas:
* After lots of live testing, the procedure for getting
networks for the instance, lists of connected MACs for
each network and the discovered NICs of the instance,
is completed and works. Some changes to the internals
were needed to make sure it works with a live MAAS.
* Fixed a small typo in the log message "picked arbitrary
tools...".
Changes in provider/dummy:
* Now the dummy provider prepares []environs.NetworkInfo
when IncludeNetworks are given to StartInstance, and
returns it. As a special case, network names with "bad-"
prefix cause the dummy provider to generate invalid
NetworkInfo so we can test failures on SetInstanceInfo.
Although this CL is got big, it's the penultimate step
to have MAAS networks/VLANs support - the only thing left
is to setup the discovered network interfaces as needed
with cloudinit scripts, which will be done in a follow-up.
But before that, as requested bug #1304905 will be fixed
(s/NetworkName/NetworkId/ and add network tags througout).
https://code.launchpad.net/~dimitern/juju-core/393-provisioner-allow-adding-networks/+merge/214720
Requires: https://code.launchpad.net/~dimitern/juju-core/392-api-provisioner-allow-adding-existing-networks-nics/+merge/214712
(do not edit description out of merge proposal)
Patch Set 1 #Patch Set 2 : various: Provision machines with networks #
Total comments: 24
Patch Set 3 : various: Provision machines with networks #
Total comments: 10
Patch Set 4 : various: Provision machines with networks #
Total comments: 3
Patch Set 5 : various: Provision machines with networks #
MessagesTotal messages: 8
|