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
This commit is contained in:
Tim Burke 2024-09-09 09:39:13 -07:00
parent 146bfeb643
commit f7db1ec3cf
3 changed files with 26 additions and 26 deletions

View File

@ -57,7 +57,7 @@
- name: set the options in the proxy config file
shell:
cmd: |
crudini --set /etc/swift/proxy-server.conf DEFAULT bind_ip {{ hostvars['proxy1'].nodepool.public_ipv4 }}
crudini --set /etc/swift/proxy-server.conf DEFAULT bind_ip {{ hostvars['proxy1'].nodepool.private_ipv4 }}
crudini --set /etc/swift/proxy-server.conf DEFAULT user {{ ansible_user_id }}
crudini --set /etc/swift/proxy-server.conf app:proxy-server node_timeout 20
executable: /bin/bash
@ -71,7 +71,7 @@
- name: set the options in the account config file
shell:
cmd: |
crudini --set /etc/swift/account-server.conf DEFAULT bind_ip {{ hostvars['account1'].nodepool.public_ipv4 }}
crudini --set /etc/swift/account-server.conf DEFAULT bind_ip {{ hostvars['account1'].nodepool.private_ipv4 }}
crudini --set /etc/swift/account-server.conf DEFAULT user {{ ansible_user_id }}
executable: /bin/bash
@ -84,7 +84,7 @@
- name: set the options in the container config file
shell:
cmd: |
crudini --set /etc/swift/container-server.conf DEFAULT bind_ip {{ hostvars['container1'].nodepool.public_ipv4 }}
crudini --set /etc/swift/container-server.conf DEFAULT bind_ip {{ hostvars['container1'].nodepool.private_ipv4 }}
crudini --set /etc/swift/container-server.conf DEFAULT user {{ ansible_user_id }}
executable: /bin/bash
@ -97,7 +97,7 @@
- name: set the options in the object config file
shell:
cmd: |
crudini --set /etc/swift/object-server.conf DEFAULT bind_ip {{ hostvars['object1'].nodepool.public_ipv4 }}
crudini --set /etc/swift/object-server.conf DEFAULT bind_ip {{ hostvars['object1'].nodepool.private_ipv4 }}
crudini --set /etc/swift/object-server.conf DEFAULT user {{ ansible_user_id }}
crudini --set /etc/swift/object-server.conf DEFAULT conn_timeout 3
crudini --set /etc/swift/object-server.conf DEFAULT container_update_timeout 3
@ -139,7 +139,7 @@
executable: /bin/bash
- name: scp rings to all swift-cluster nodes
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
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
with_nested:
- ['account.ring.gz', 'container.ring.gz', 'object.ring.gz', 'object-1.ring.gz', 'object-2.ring.gz']
- "{{ groups['swift-cluster'] }}"

View File

@ -7,32 +7,32 @@ cd /home/{{ ansible_user }}/rings
rm -f *.builder *.ring.gz backups/*.builder backups/*.ring.gz
swift-ring-builder object.builder create 10 3 1
swift-ring-builder object.builder add r1z1-{{ hostvars['object1'].nodepool.public_ipv4 }}:{{ swift_base_port + 10 }}/sdb1 1
swift-ring-builder object.builder add r1z1-{{ hostvars['object1'].nodepool.public_ipv4 }}:{{ swift_base_port + 10 }}/sdb2 1
swift-ring-builder object.builder add r1z1-{{ hostvars['object1'].nodepool.public_ipv4 }}:{{ swift_base_port + 10 }}/sdb3 1
swift-ring-builder object.builder add r1z1-{{ hostvars['object1'].nodepool.private_ipv4 }}:{{ swift_base_port + 10 }}/sdb1 1
swift-ring-builder object.builder add r1z1-{{ hostvars['object1'].nodepool.private_ipv4 }}:{{ swift_base_port + 10 }}/sdb2 1
swift-ring-builder object.builder add r1z1-{{ hostvars['object1'].nodepool.private_ipv4 }}:{{ swift_base_port + 10 }}/sdb3 1
swift-ring-builder object.builder rebalance
swift-ring-builder object-1.builder create 10 2 1
swift-ring-builder object-1.builder add r1z1-{{ hostvars['object1'].nodepool.public_ipv4 }}:{{ swift_base_port + 10 }}/sdb1 1
swift-ring-builder object-1.builder add r1z1-{{ hostvars['object1'].nodepool.public_ipv4 }}:{{ swift_base_port + 10 }}/sdb2 1
swift-ring-builder object-1.builder add r1z1-{{ hostvars['object1'].nodepool.public_ipv4 }}:{{ swift_base_port + 10 }}/sdb3 1
swift-ring-builder object-1.builder add r1z1-{{ hostvars['object1'].nodepool.private_ipv4 }}:{{ swift_base_port + 10 }}/sdb1 1
swift-ring-builder object-1.builder add r1z1-{{ hostvars['object1'].nodepool.private_ipv4 }}:{{ swift_base_port + 10 }}/sdb2 1
swift-ring-builder object-1.builder add r1z1-{{ hostvars['object1'].nodepool.private_ipv4 }}:{{ swift_base_port + 10 }}/sdb3 1
swift-ring-builder object-1.builder rebalance
swift-ring-builder object-2.builder create 10 6 1
swift-ring-builder object-2.builder add r1z1-{{ hostvars['object1'].nodepool.public_ipv4 }}:{{ swift_base_port + 10 }}/sdb1 1
swift-ring-builder object-2.builder add r1z1-{{ hostvars['object1'].nodepool.public_ipv4 }}:{{ swift_base_port + 10 }}/sdb2 1
swift-ring-builder object-2.builder add r1z1-{{ hostvars['object1'].nodepool.public_ipv4 }}:{{ swift_base_port + 10 }}/sdb3 1
swift-ring-builder object-2.builder add r1z1-{{ hostvars['object1'].nodepool.public_ipv4 }}:{{ swift_base_port + 10 }}/sdb4 1
swift-ring-builder object-2.builder add r1z1-{{ hostvars['object1'].nodepool.public_ipv4 }}:{{ swift_base_port + 10 }}/sdb5 1
swift-ring-builder object-2.builder add r1z1-{{ hostvars['object1'].nodepool.public_ipv4 }}:{{ swift_base_port + 10 }}/sdb6 1
swift-ring-builder object-2.builder add r1z1-{{ hostvars['object1'].nodepool.public_ipv4 }}:{{ swift_base_port + 10 }}/sdb7 1
swift-ring-builder object-2.builder add r1z1-{{ hostvars['object1'].nodepool.public_ipv4 }}:{{ swift_base_port + 10 }}/sdb8 1
swift-ring-builder object-2.builder add r1z1-{{ hostvars['object1'].nodepool.private_ipv4 }}:{{ swift_base_port + 10 }}/sdb1 1
swift-ring-builder object-2.builder add r1z1-{{ hostvars['object1'].nodepool.private_ipv4 }}:{{ swift_base_port + 10 }}/sdb2 1
swift-ring-builder object-2.builder add r1z1-{{ hostvars['object1'].nodepool.private_ipv4 }}:{{ swift_base_port + 10 }}/sdb3 1
swift-ring-builder object-2.builder add r1z1-{{ hostvars['object1'].nodepool.private_ipv4 }}:{{ swift_base_port + 10 }}/sdb4 1
swift-ring-builder object-2.builder add r1z1-{{ hostvars['object1'].nodepool.private_ipv4 }}:{{ swift_base_port + 10 }}/sdb5 1
swift-ring-builder object-2.builder add r1z1-{{ hostvars['object1'].nodepool.private_ipv4 }}:{{ swift_base_port + 10 }}/sdb6 1
swift-ring-builder object-2.builder add r1z1-{{ hostvars['object1'].nodepool.private_ipv4 }}:{{ swift_base_port + 10 }}/sdb7 1
swift-ring-builder object-2.builder add r1z1-{{ hostvars['object1'].nodepool.private_ipv4 }}:{{ swift_base_port + 10 }}/sdb8 1
swift-ring-builder object-2.builder rebalance
swift-ring-builder container.builder create 10 3 1
swift-ring-builder container.builder add r1z1-{{ hostvars['container1'].nodepool.public_ipv4 }}:{{ swift_base_port + 11 }}/sdb1 1
swift-ring-builder container.builder add r1z1-{{ hostvars['container1'].nodepool.public_ipv4 }}:{{ swift_base_port + 11 }}/sdb2 1
swift-ring-builder container.builder add r1z1-{{ hostvars['container1'].nodepool.public_ipv4 }}:{{ swift_base_port + 11 }}/sdb3 1
swift-ring-builder container.builder add r1z1-{{ hostvars['container1'].nodepool.private_ipv4 }}:{{ swift_base_port + 11 }}/sdb1 1
swift-ring-builder container.builder add r1z1-{{ hostvars['container1'].nodepool.private_ipv4 }}:{{ swift_base_port + 11 }}/sdb2 1
swift-ring-builder container.builder add r1z1-{{ hostvars['container1'].nodepool.private_ipv4 }}:{{ swift_base_port + 11 }}/sdb3 1
swift-ring-builder container.builder rebalance
swift-ring-builder account.builder create 10 3 1
swift-ring-builder account.builder add r1z1-{{ hostvars['account1'].nodepool.public_ipv4 }}:{{ swift_base_port + 12 }}/sdb1 1
swift-ring-builder account.builder add r1z1-{{ hostvars['account1'].nodepool.public_ipv4 }}:{{ swift_base_port + 12 }}/sdb2 1
swift-ring-builder account.builder add r1z1-{{ hostvars['account1'].nodepool.public_ipv4 }}:{{ swift_base_port + 12 }}/sdb3 1
swift-ring-builder account.builder add r1z1-{{ hostvars['account1'].nodepool.private_ipv4 }}:{{ swift_base_port + 12 }}/sdb1 1
swift-ring-builder account.builder add r1z1-{{ hostvars['account1'].nodepool.private_ipv4 }}:{{ swift_base_port + 12 }}/sdb2 1
swift-ring-builder account.builder add r1z1-{{ hostvars['account1'].nodepool.private_ipv4 }}:{{ swift_base_port + 12 }}/sdb3 1
swift-ring-builder account.builder rebalance

View File

@ -1,6 +1,6 @@
[func_test]
# Sample config for Swift with tempauth
auth_host = {{ hostvars['proxy1'].nodepool.public_ipv4 }}
auth_host = {{ hostvars['proxy1'].nodepool.private_ipv4 }}
auth_port = 8080
auth_ssl = no
auth_prefix = /auth/