File tree Expand file tree Collapse file tree
tests/roles/swift_migration/tasks Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -98,6 +98,10 @@ ssh commands for your existing nodes that store the {object_storage} data:
9898$ oc extract --confirm cm/swift-ring-files
9999$ $CONTROLLER1_SSH "tar -C /var/lib/config-data/puppet-generated/swift/etc/swift/ -xzf -" < swiftrings.tar.gz
100100$ $CONTROLLER1_SSH "systemctl restart tripleo_swift_*"
101+ $ $CONTROLLER2_SSH "tar -C /var/lib/config-data/puppet-generated/swift/etc/swift/ -xzf -" < swiftrings.tar.gz
102+ $ $CONTROLLER2_SSH "systemctl restart tripleo_swift_*"
103+ $ $CONTROLLER3_SSH "tar -C /var/lib/config-data/puppet-generated/swift/etc/swift/ -xzf -" < swiftrings.tar.gz
104+ $ $CONTROLLER3_SSH "systemctl restart tripleo_swift_*"
101105----
102106
103107. Track the replication progress by using the `swift-dispersion-report` tool:
Original file line number Diff line number Diff line change 5757 ansible.builtin.shell : |
5858 {{ shell_header }}
5959 CONTROLLER1_SSH="{{ controller1_ssh }}"
60- $CONTROLLER1_SSH "timeout 900s bash -c 'while \$(find /srv/node/ -type f -name \"*.db\" -o -name \"*.data\" | grep -q \".\"); do sleep 5; done'"
60+ $CONTROLLER1_SSH "timeout 900s bash -c 'while \$(find /srv/node/ -ignore_readdir_race - type f -name \"*.db\" -o -name \"*.data\" | grep -q \".\"); do sleep 5; done'"
6161
6262 - name : remove standalone node from rings
6363 ansible.builtin.shell : |
Original file line number Diff line number Diff line change 66 swift-ring-tool forced_rebalance
77 swift-ring-tool push'
88
9- - name : push rings to standalone and restart swift services
9+ - name : push rings to controller nodes and restart swift services
1010 ansible.builtin.shell : |
1111 {{ shell_header }}
1212 {{ oc_header }}
1313 CONTROLLER1_SSH="{{ controller1_ssh }}"
14+ CONTROLLER2_SSH="{{ controller2_ssh }}"
15+ CONTROLLER3_SSH="{{ controller3_ssh }}"
16+
1417 oc extract --confirm cm/swift-ring-files
15- $CONTROLLER1_SSH "tar -C /var/lib/config-data/puppet-generated/swift/etc/swift/ -xzf -" < swiftrings.tar.gz
16- $CONTROLLER1_SSH "systemctl restart tripleo_swift_*"
18+
19+ for i in {1..3}; do
20+ SSH_CMD="CONTROLLER${i}_SSH"
21+ if [ ! -z "${!SSH_CMD}" ]; then
22+ ${!SSH_CMD} "tar -C /var/lib/config-data/puppet-generated/swift/etc/swift/ -xzf -" < swiftrings.tar.gz
23+ ${!SSH_CMD} "systemctl restart tripleo_swift_*"
24+ fi
25+ done
1726
1827 - name : wait until all replicas are 100% available after rebalance
1928 ansible.builtin.shell : |
You can’t perform that action at this time.
0 commit comments