Try a single gcloud command for scp-ing all files
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
This commit is contained in:
		| @@ -139,10 +139,11 @@ function copy-logs-from-node() { | |||||||
|     if [[ "${gcloud_supported_providers}" =~ ${KUBERNETES_PROVIDER} ]]; then |     if [[ "${gcloud_supported_providers}" =~ ${KUBERNETES_PROVIDER} ]]; then | ||||||
|       # get-serial-port-output lets you ask for ports 1-4, but currently (11/21/2016) only port 1 contains useful information |       # get-serial-port-output lets you ask for ports 1-4, but currently (11/21/2016) only port 1 contains useful information | ||||||
|       gcloud compute instances get-serial-port-output --project "${PROJECT}" --zone "${ZONE}" --port 1 "${node}" > "${dir}/serial-1.log" || true |       gcloud compute instances get-serial-port-output --project "${PROJECT}" --zone "${ZONE}" --port 1 "${node}" > "${dir}/serial-1.log" || true | ||||||
|       # FIXME(dims): bug in gcloud prevents multiple source files specified using curly braces, so we just loop through for now |       source_file_args=() | ||||||
|       for single_file in "${files[@]}"; do |       for single_file in "${files[@]}"; do | ||||||
|         gcloud compute scp --recurse --project "${PROJECT}" --zone "${ZONE}" "${node}:${single_file}" "${dir}" > /dev/null || true |         source_file_args+=( "${node}:${single_file}" ) | ||||||
|       done |       done | ||||||
|  |       gcloud compute scp --recurse --project "${PROJECT}" --zone "${ZONE}" "${source_file_args[@]}" "${dir}" > /dev/null || true | ||||||
|     elif  [[ "${KUBERNETES_PROVIDER}" == "aws" ]]; then |     elif  [[ "${KUBERNETES_PROVIDER}" == "aws" ]]; then | ||||||
|       local ip |       local ip | ||||||
|       ip=$(get_ssh_hostname "${node}") |       ip=$(get_ssh_hostname "${node}") | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Davanum Srinivas
					Davanum Srinivas