Add test for host_only networks and ensure network ordering

The `host_only` network option did not have a functional test, this
change adds one so that the mv-extra interface will now run with this
which will ensure its functional when enabled. The "nspawn_combined_networks"
also had an issue where the first network in the container config could
be something other than the nspawn container network. This would shift
the gateway from the mv-nspawn and to whatever was defined first. A
change to the "nspawn_combined_networks" will now ensure
"nspawn_networks" is referenced first.

Depends-On: Ic280db301ce44b98ac35c8911999dec5fa263a29
Change-Id: Id20afab8b705f6528ba5575ee4704c1661e6e65c
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
This commit is contained in:
Kevin Carter 2018-10-08 15:31:57 -05:00
parent 1e0983f839
commit b2df99498c
No known key found for this signature in database
GPG Key ID: 9443251A787B9FB3
2 changed files with 8 additions and 6 deletions

View File

@ -26,10 +26,12 @@ container_networks:
address: "172.29.236.100"
netmask: "255.255.255.0"
bridge: "br-mgmt"
host_only: true
container_extra_networks:
extra_address:
address: "172.29.254.100"
netmask: "255.255.255.0"
private_device: true
bridge: "br-extra"
extra_address:
address: "172.29.254.100"
netmask: "255.255.255.0"
private_device: true
bridge: "br-extra"
host_only: true

View File

@ -14,4 +14,4 @@
# limitations under the License.
# A combined hash of all networks to be used within a deployment.
nspawn_combined_networks: "{{ container_networks | combine(container_extra_networks | default({})) | combine(nspawn_networks) }}"
nspawn_combined_networks: "{{ nspawn_networks | combine(container_extra_networks | default({})) | combine(container_networks) }}"