-# Since this log collection work is happening before the archive build macro which also
-# creates the ${WORKSPACE}/archives dir, we have to do it here first. The mkdir in the
-# archives build step will essentially be a noop.
-mkdir -p ${WORKSPACE}/archives
-
-# Control Node
-for i in `seq 1 ${NUM_OPENSTACK_CONTROL_NODES}`
-do
- OS_CTRL_IP=OPENSTACK_CONTROL_NODE_${i}_IP
- OS_CTRL_FOLDER="control_${i}"
- mkdir -p ${OS_CTRL_FOLDER}
- scp ${!OS_CTRL_IP}:/opt/stack/devstack/nohup.out ${OS_CTRL_FOLDER}/stack.log
- scp ${!OS_CTRL_IP}:/var/log/openvswitch/ovs-vswitchd.log ${OS_CTRL_FOLDER}/ovs-vswitchd.log
- scp ${!OS_CTRL_IP}:/etc/neutron/plugins/ml2/ml2_conf.ini ${OS_CTRL_FOLDER}
- scp ${!OS_CTRL_IP}:/etc/neutron/dhcp_agent.ini ${OS_CTRL_FOLDER}
- scp ${!OS_CTRL_IP}:/etc/neutron/neutron.conf ${OS_CTRL_FOLDER}/neutron.conf
- scp ${!OS_CTRL_IP}:/etc/nova/nova.conf ${OS_CTRL_FOLDER}/nova.conf
- scp ${!OS_CTRL_IP}:/etc/kuryr/kuryr.conf ${OS_CTRL_FOLDER}/kuryr.conf
- scp ${!OS_CTRL_IP}:/etc/neutron/neutron_lbaas.conf ${OS_CTRL_FOLDER}/neutron-lbaas.conf
- scp ${!OS_CTRL_IP}:/etc/neutron/services/loadbalancer/haproxy/lbaas_agent.ini ${OS_CTRL_FOLDER}/lbaas-agent.ini
- rsync --rsync-path="sudo rsync" -avhe ssh ${!OS_CTRL_IP}:/usr/lib/systemd/system/haproxy.service ${OS_CTRL_FOLDER}
- rsync -avhe ssh ${!OS_CTRL_IP}:/opt/stack/logs/* ${OS_CTRL_FOLDER} # rsync to prevent copying of symbolic links
- rsync --rsync-path="sudo rsync" -avhe ssh ${!OS_CTRL_IP}:/etc/hosts ${OS_CTRL_FOLDER}/hosts.log
- # Use rsync with sudo to get access to the log dir.
- rsync --rsync-path="sudo rsync" -avhe ssh ${!OS_CTRL_IP}:/var/log/audit/audit.log ${OS_CTRL_FOLDER}
- scp extra_debug.sh ${!OS_CTRL_IP}:/tmp
- ${SSH} ${!OS_CTRL_IP} "bash /tmp/extra_debug.sh > /tmp/extra_debug.log"
- scp ${!OS_CTRL_IP}:/tmp/extra_debug.log ${OS_CTRL_FOLDER}/extra_debug.log
- scp ${!OS_CTRL_IP}:/tmp/journalctl.log ${OS_CTRL_FOLDER}
- rsync --rsync-path="sudo rsync" -avhe ssh ${!OS_CTRL_IP}:/var/log/messages ${OS_CTRL_FOLDER}
- scp ${!OS_CTRL_IP}:/tmp/*.xz ${OS_CTRL_FOLDER}/
- mv local.conf_control_${!OS_CTRL_IP} ${OS_CTRL_FOLDER}/local.conf
- mv ${OS_CTRL_FOLDER} ${WORKSPACE}/archives/
-done
+ # Since this log collection work is happening before the archive build macro which also
+ # creates the ${WORKSPACE}/archives dir, we have to do it here first. The mkdir in the
+ # archives build step will essentially be a noop.
+ mkdir -p ${WORKSPACE}/archives
+
+ # Control Node
+ for i in `seq 1 ${NUM_OPENSTACK_CONTROL_NODES}`; do
+ OS_CTRL_IP=OPENSTACK_CONTROL_NODE_${i}_IP
+ OS_CTRL_FOLDER="control_${i}"
+ mkdir -p ${OS_CTRL_FOLDER}
+ scp ${!OS_CTRL_IP}:/opt/stack/devstack/nohup.out ${OS_CTRL_FOLDER}/stack.log
+ scp ${!OS_CTRL_IP}:/var/log/openvswitch/ovs-vswitchd.log ${OS_CTRL_FOLDER}/ovs-vswitchd.log
+ scp ${!OS_CTRL_IP}:/etc/neutron/plugins/ml2/ml2_conf.ini ${OS_CTRL_FOLDER}
+ scp ${!OS_CTRL_IP}:/etc/neutron/dhcp_agent.ini ${OS_CTRL_FOLDER}
+ scp ${!OS_CTRL_IP}:/etc/neutron/neutron.conf ${OS_CTRL_FOLDER}/neutron.conf
+ scp ${!OS_CTRL_IP}:/etc/nova/nova.conf ${OS_CTRL_FOLDER}/nova.conf
+ scp ${!OS_CTRL_IP}:/etc/kuryr/kuryr.conf ${OS_CTRL_FOLDER}/kuryr.conf
+ scp ${!OS_CTRL_IP}:/etc/neutron/neutron_lbaas.conf ${OS_CTRL_FOLDER}/neutron-lbaas.conf
+ scp ${!OS_CTRL_IP}:/etc/neutron/services/loadbalancer/haproxy/lbaas_agent.ini ${OS_CTRL_FOLDER}/lbaas-agent.ini
+ rsync --rsync-path="sudo rsync" -avhe ssh ${!OS_CTRL_IP}:/usr/lib/systemd/system/haproxy.service ${OS_CTRL_FOLDER}
+ rsync -avhe ssh ${!OS_CTRL_IP}:/opt/stack/logs/* ${OS_CTRL_FOLDER} # rsync to prevent copying of symbolic links
+ rsync --rsync-path="sudo rsync" -avhe ssh ${!OS_CTRL_IP}:/etc/hosts ${OS_CTRL_FOLDER}/hosts.log
+ # Use rsync with sudo to get access to the log dir.
+ rsync --rsync-path="sudo rsync" -avhe ssh ${!OS_CTRL_IP}:/var/log/audit/audit.log ${OS_CTRL_FOLDER}
+ scp ${!OS_CTRL_IP}:/tmp/get_devstack.sh.txt ${OS_CTRL_FOLDER}
+ scp extra_debug.sh ${!OS_CTRL_IP}:/tmp
+ ${SSH} ${!OS_CTRL_IP} "bash /tmp/extra_debug.sh > /tmp/extra_debug.log"
+ scp ${!OS_CTRL_IP}:/tmp/extra_debug.log ${OS_CTRL_FOLDER}/extra_debug.log
+ scp ${!OS_CTRL_IP}:/tmp/journalctl.log ${OS_CTRL_FOLDER}
+ rsync --rsync-path="sudo rsync" -avhe ssh ${!OS_CTRL_IP}:/var/log/messages ${OS_CTRL_FOLDER}
+ scp ${!OS_CTRL_IP}:/tmp/*.xz ${OS_CTRL_FOLDER}/
+ mv local.conf_control_${!OS_CTRL_IP} ${OS_CTRL_FOLDER}/local.conf
+ mv ${OS_CTRL_FOLDER} ${WORKSPACE}/archives/
+ done