Skip to content

Commit f7db1ec

Browse files
committed
CI: use private IPs for multinode tests
If the nodepool provider uses NAT'd floating IPs, the public IP won't actually be available locally for binding. This has caused a bunch of failures on raxflex lately. Change-Id: I5669a814377242e9939a09a42bb36642358b85b3
1 parent 146bfeb commit f7db1ec

File tree

3 files changed

+26
-26
lines changed

3 files changed

+26
-26
lines changed

tools/playbooks/multinode_setup/make_rings.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
- name: set the options in the proxy config file
5858
shell:
5959
cmd: |
60-
crudini --set /etc/swift/proxy-server.conf DEFAULT bind_ip {{ hostvars['proxy1'].nodepool.public_ipv4 }}
60+
crudini --set /etc/swift/proxy-server.conf DEFAULT bind_ip {{ hostvars['proxy1'].nodepool.private_ipv4 }}
6161
crudini --set /etc/swift/proxy-server.conf DEFAULT user {{ ansible_user_id }}
6262
crudini --set /etc/swift/proxy-server.conf app:proxy-server node_timeout 20
6363
executable: /bin/bash
@@ -71,7 +71,7 @@
7171
- name: set the options in the account config file
7272
shell:
7373
cmd: |
74-
crudini --set /etc/swift/account-server.conf DEFAULT bind_ip {{ hostvars['account1'].nodepool.public_ipv4 }}
74+
crudini --set /etc/swift/account-server.conf DEFAULT bind_ip {{ hostvars['account1'].nodepool.private_ipv4 }}
7575
crudini --set /etc/swift/account-server.conf DEFAULT user {{ ansible_user_id }}
7676
executable: /bin/bash
7777

@@ -84,7 +84,7 @@
8484
- name: set the options in the container config file
8585
shell:
8686
cmd: |
87-
crudini --set /etc/swift/container-server.conf DEFAULT bind_ip {{ hostvars['container1'].nodepool.public_ipv4 }}
87+
crudini --set /etc/swift/container-server.conf DEFAULT bind_ip {{ hostvars['container1'].nodepool.private_ipv4 }}
8888
crudini --set /etc/swift/container-server.conf DEFAULT user {{ ansible_user_id }}
8989
executable: /bin/bash
9090

@@ -97,7 +97,7 @@
9797
- name: set the options in the object config file
9898
shell:
9999
cmd: |
100-
crudini --set /etc/swift/object-server.conf DEFAULT bind_ip {{ hostvars['object1'].nodepool.public_ipv4 }}
100+
crudini --set /etc/swift/object-server.conf DEFAULT bind_ip {{ hostvars['object1'].nodepool.private_ipv4 }}
101101
crudini --set /etc/swift/object-server.conf DEFAULT user {{ ansible_user_id }}
102102
crudini --set /etc/swift/object-server.conf DEFAULT conn_timeout 3
103103
crudini --set /etc/swift/object-server.conf DEFAULT container_update_timeout 3
@@ -139,7 +139,7 @@
139139
executable: /bin/bash
140140

141141
- name: scp rings to all swift-cluster nodes
142-
command: scp -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o ConnectTimeout=5 -o ConnectionAttempts=360 /home/{{ ansible_user }}/rings/{{ item[0] }} {{ ansible_user }}@{{ hostvars[item[1]].nodepool.public_ipv4 }}:/etc/swift
142+
command: scp -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o ConnectTimeout=5 -o ConnectionAttempts=360 /home/{{ ansible_user }}/rings/{{ item[0] }} {{ ansible_user }}@{{ hostvars[item[1]].nodepool.private_ipv4 }}:/etc/swift
143143
with_nested:
144144
- ['account.ring.gz', 'container.ring.gz', 'object.ring.gz', 'object-1.ring.gz', 'object-2.ring.gz']
145145
- "{{ groups['swift-cluster'] }}"

tools/playbooks/multinode_setup/templates/make_multinode_rings.j2

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -7,32 +7,32 @@ cd /home/{{ ansible_user }}/rings
77
rm -f *.builder *.ring.gz backups/*.builder backups/*.ring.gz
88

99
swift-ring-builder object.builder create 10 3 1
10-
swift-ring-builder object.builder add r1z1-{{ hostvars['object1'].nodepool.public_ipv4 }}:{{ swift_base_port + 10 }}/sdb1 1
11-
swift-ring-builder object.builder add r1z1-{{ hostvars['object1'].nodepool.public_ipv4 }}:{{ swift_base_port + 10 }}/sdb2 1
12-
swift-ring-builder object.builder add r1z1-{{ hostvars['object1'].nodepool.public_ipv4 }}:{{ swift_base_port + 10 }}/sdb3 1
10+
swift-ring-builder object.builder add r1z1-{{ hostvars['object1'].nodepool.private_ipv4 }}:{{ swift_base_port + 10 }}/sdb1 1
11+
swift-ring-builder object.builder add r1z1-{{ hostvars['object1'].nodepool.private_ipv4 }}:{{ swift_base_port + 10 }}/sdb2 1
12+
swift-ring-builder object.builder add r1z1-{{ hostvars['object1'].nodepool.private_ipv4 }}:{{ swift_base_port + 10 }}/sdb3 1
1313
swift-ring-builder object.builder rebalance
1414
swift-ring-builder object-1.builder create 10 2 1
15-
swift-ring-builder object-1.builder add r1z1-{{ hostvars['object1'].nodepool.public_ipv4 }}:{{ swift_base_port + 10 }}/sdb1 1
16-
swift-ring-builder object-1.builder add r1z1-{{ hostvars['object1'].nodepool.public_ipv4 }}:{{ swift_base_port + 10 }}/sdb2 1
17-
swift-ring-builder object-1.builder add r1z1-{{ hostvars['object1'].nodepool.public_ipv4 }}:{{ swift_base_port + 10 }}/sdb3 1
15+
swift-ring-builder object-1.builder add r1z1-{{ hostvars['object1'].nodepool.private_ipv4 }}:{{ swift_base_port + 10 }}/sdb1 1
16+
swift-ring-builder object-1.builder add r1z1-{{ hostvars['object1'].nodepool.private_ipv4 }}:{{ swift_base_port + 10 }}/sdb2 1
17+
swift-ring-builder object-1.builder add r1z1-{{ hostvars['object1'].nodepool.private_ipv4 }}:{{ swift_base_port + 10 }}/sdb3 1
1818
swift-ring-builder object-1.builder rebalance
1919
swift-ring-builder object-2.builder create 10 6 1
20-
swift-ring-builder object-2.builder add r1z1-{{ hostvars['object1'].nodepool.public_ipv4 }}:{{ swift_base_port + 10 }}/sdb1 1
21-
swift-ring-builder object-2.builder add r1z1-{{ hostvars['object1'].nodepool.public_ipv4 }}:{{ swift_base_port + 10 }}/sdb2 1
22-
swift-ring-builder object-2.builder add r1z1-{{ hostvars['object1'].nodepool.public_ipv4 }}:{{ swift_base_port + 10 }}/sdb3 1
23-
swift-ring-builder object-2.builder add r1z1-{{ hostvars['object1'].nodepool.public_ipv4 }}:{{ swift_base_port + 10 }}/sdb4 1
24-
swift-ring-builder object-2.builder add r1z1-{{ hostvars['object1'].nodepool.public_ipv4 }}:{{ swift_base_port + 10 }}/sdb5 1
25-
swift-ring-builder object-2.builder add r1z1-{{ hostvars['object1'].nodepool.public_ipv4 }}:{{ swift_base_port + 10 }}/sdb6 1
26-
swift-ring-builder object-2.builder add r1z1-{{ hostvars['object1'].nodepool.public_ipv4 }}:{{ swift_base_port + 10 }}/sdb7 1
27-
swift-ring-builder object-2.builder add r1z1-{{ hostvars['object1'].nodepool.public_ipv4 }}:{{ swift_base_port + 10 }}/sdb8 1
20+
swift-ring-builder object-2.builder add r1z1-{{ hostvars['object1'].nodepool.private_ipv4 }}:{{ swift_base_port + 10 }}/sdb1 1
21+
swift-ring-builder object-2.builder add r1z1-{{ hostvars['object1'].nodepool.private_ipv4 }}:{{ swift_base_port + 10 }}/sdb2 1
22+
swift-ring-builder object-2.builder add r1z1-{{ hostvars['object1'].nodepool.private_ipv4 }}:{{ swift_base_port + 10 }}/sdb3 1
23+
swift-ring-builder object-2.builder add r1z1-{{ hostvars['object1'].nodepool.private_ipv4 }}:{{ swift_base_port + 10 }}/sdb4 1
24+
swift-ring-builder object-2.builder add r1z1-{{ hostvars['object1'].nodepool.private_ipv4 }}:{{ swift_base_port + 10 }}/sdb5 1
25+
swift-ring-builder object-2.builder add r1z1-{{ hostvars['object1'].nodepool.private_ipv4 }}:{{ swift_base_port + 10 }}/sdb6 1
26+
swift-ring-builder object-2.builder add r1z1-{{ hostvars['object1'].nodepool.private_ipv4 }}:{{ swift_base_port + 10 }}/sdb7 1
27+
swift-ring-builder object-2.builder add r1z1-{{ hostvars['object1'].nodepool.private_ipv4 }}:{{ swift_base_port + 10 }}/sdb8 1
2828
swift-ring-builder object-2.builder rebalance
2929
swift-ring-builder container.builder create 10 3 1
30-
swift-ring-builder container.builder add r1z1-{{ hostvars['container1'].nodepool.public_ipv4 }}:{{ swift_base_port + 11 }}/sdb1 1
31-
swift-ring-builder container.builder add r1z1-{{ hostvars['container1'].nodepool.public_ipv4 }}:{{ swift_base_port + 11 }}/sdb2 1
32-
swift-ring-builder container.builder add r1z1-{{ hostvars['container1'].nodepool.public_ipv4 }}:{{ swift_base_port + 11 }}/sdb3 1
30+
swift-ring-builder container.builder add r1z1-{{ hostvars['container1'].nodepool.private_ipv4 }}:{{ swift_base_port + 11 }}/sdb1 1
31+
swift-ring-builder container.builder add r1z1-{{ hostvars['container1'].nodepool.private_ipv4 }}:{{ swift_base_port + 11 }}/sdb2 1
32+
swift-ring-builder container.builder add r1z1-{{ hostvars['container1'].nodepool.private_ipv4 }}:{{ swift_base_port + 11 }}/sdb3 1
3333
swift-ring-builder container.builder rebalance
3434
swift-ring-builder account.builder create 10 3 1
35-
swift-ring-builder account.builder add r1z1-{{ hostvars['account1'].nodepool.public_ipv4 }}:{{ swift_base_port + 12 }}/sdb1 1
36-
swift-ring-builder account.builder add r1z1-{{ hostvars['account1'].nodepool.public_ipv4 }}:{{ swift_base_port + 12 }}/sdb2 1
37-
swift-ring-builder account.builder add r1z1-{{ hostvars['account1'].nodepool.public_ipv4 }}:{{ swift_base_port + 12 }}/sdb3 1
35+
swift-ring-builder account.builder add r1z1-{{ hostvars['account1'].nodepool.private_ipv4 }}:{{ swift_base_port + 12 }}/sdb1 1
36+
swift-ring-builder account.builder add r1z1-{{ hostvars['account1'].nodepool.private_ipv4 }}:{{ swift_base_port + 12 }}/sdb2 1
37+
swift-ring-builder account.builder add r1z1-{{ hostvars['account1'].nodepool.private_ipv4 }}:{{ swift_base_port + 12 }}/sdb3 1
3838
swift-ring-builder account.builder rebalance

tools/playbooks/multinode_setup/templates/test.conf.j2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[func_test]
22
# Sample config for Swift with tempauth
3-
auth_host = {{ hostvars['proxy1'].nodepool.public_ipv4 }}
3+
auth_host = {{ hostvars['proxy1'].nodepool.private_ipv4 }}
44
auth_port = 8080
55
auth_ssl = no
66
auth_prefix = /auth/

0 commit comments

Comments
 (0)