From bfd73a50cc9df99d1432083a23d3429cb98e4f71 Mon Sep 17 00:00:00 2001 From: Andy McCrae Date: Mon, 26 Sep 2016 14:51:01 +0100 Subject: [PATCH] Test address setting code paths We can set the storage and replication addresses differently for each of the 3 swift-hosts. swift-storage1 will use the "swift_storage_address" and "swift_replication_address" values to set it's service and ring IPs. swift-storage2 will use the default IPs calculated by finding the IP on the appropriate interfaces (eth2 for storage and eth3 for replication). swift-storage3 will use the swift_vars.storage_ip and swift_vars.repl_ip vars to set it's service and ring IPs This PR makes the gate more efficient by removing swift-storage4. Depends-On: Iac72c99fc728fad82da65ae6c68a304e3d130bc1 Change-Id: I8f7eb551072a6cd6ad50c2a99c4dfc6652374efe --- tests/host_vars/swift-storage1.yml | 10 ++++---- tests/host_vars/swift-storage3.yml | 12 ++++++---- tests/host_vars/swift-storage4.yml | 37 ------------------------------ tests/inventory | 6 ----- 4 files changed, 14 insertions(+), 51 deletions(-) delete mode 100644 tests/host_vars/swift-storage4.yml diff --git a/tests/host_vars/swift-storage1.yml b/tests/host_vars/swift-storage1.yml index 6a0551df..e0a0883c 100644 --- a/tests/host_vars/swift-storage1.yml +++ b/tests/host_vars/swift-storage1.yml @@ -13,9 +13,11 @@ # See the License for the specific language governing permissions and # limitations under the License. +# This host is testing the path where "swift_storage_address" and "swift_replication_address" are set + ansible_host: 10.1.1.103 -storage_address: 10.1.2.103 -replication_address: 10.1.3.103 +swift_storage_address: 10.1.2.103 +swift_replication_address: 10.1.3.103 container_networks: management_address: address: "{{ ansible_host }}" @@ -24,13 +26,13 @@ container_networks: netmask: "255.255.255.0" type: "veth" storage_address: - address: "{{ storage_address }}" + address: "{{ swift_storage_address }}" bridge: "br-storage" interface: "eth2" netmask: "255.255.255.0" type: "veth" replication_address: - address: "{{ replication_address }}" + address: "{{ swift_replication_address }}" bridge: "br-repl" interface: "eth3" netmask: "255.255.255.0" diff --git a/tests/host_vars/swift-storage3.yml b/tests/host_vars/swift-storage3.yml index fea327e4..3d2e87b2 100644 --- a/tests/host_vars/swift-storage3.yml +++ b/tests/host_vars/swift-storage3.yml @@ -13,9 +13,13 @@ # See the License for the specific language governing permissions and # limitations under the License. +# This host is testing the code path where the swift_vars repl_ip and storage_ip are set + +swift_vars: + repl_ip: 10.1.3.105 + storage_ip: 10.1.2.105 + ansible_host: 10.1.1.105 -storage_address: 10.1.2.105 -replication_address: 10.1.3.105 container_networks: management_address: address: "{{ ansible_host }}" @@ -24,13 +28,13 @@ container_networks: netmask: "255.255.255.0" type: "veth" storage_address: - address: "{{ storage_address }}" + address: "{{ swift_vars.storage_ip }}" bridge: "br-storage" interface: "eth2" netmask: "255.255.255.0" type: "veth" replication_address: - address: "{{ replication_address }}" + address: "{{ swift_vars.repl_ip }}" bridge: "br-repl" interface: "eth3" netmask: "255.255.255.0" diff --git a/tests/host_vars/swift-storage4.yml b/tests/host_vars/swift-storage4.yml deleted file mode 100644 index 1384586a..00000000 --- a/tests/host_vars/swift-storage4.yml +++ /dev/null @@ -1,37 +0,0 @@ ---- -# Copyright 2016, Rackspace US, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -ansible_host: 10.1.1.106 -storage_address: 10.1.2.106 -replication_address: 10.1.3.106 -container_networks: - management_address: - address: "{{ ansible_host }}" - bridge: "br-mgmt" - interface: "eth1" - netmask: "255.255.255.0" - type: "veth" - storage_address: - address: "{{ storage_address }}" - bridge: "br-storage" - interface: "eth2" - netmask: "255.255.255.0" - type: "veth" - replication_address: - address: "{{ replication_address }}" - bridge: "br-repl" - interface: "eth3" - netmask: "255.255.255.0" - type: "veth" diff --git a/tests/inventory b/tests/inventory index 7c89f5c2..27695f9d 100644 --- a/tests/inventory +++ b/tests/inventory @@ -5,7 +5,6 @@ swift-proxy swift-storage1 swift-storage2 swift-storage3 -swift-storage4 [all_containers] infra1 @@ -13,7 +12,6 @@ swift-proxy swift-storage1 swift-storage2 swift-storage3 -swift-storage4 [galera_all] infra1 @@ -36,7 +34,6 @@ infra1 swift-storage1 swift-storage2 swift-storage3 -swift-storage4 [swift_proxy] swift-proxy @@ -45,19 +42,16 @@ swift-proxy swift-storage1 swift-storage2 swift-storage3 -swift-storage4 [swift_cont] swift-storage1 swift-storage2 swift-storage3 -swift-storage4 [swift_obj] swift-storage1 swift-storage2 swift-storage3 -swift-storage4 [swift_all:children] swift_acc