Skip to content

Commit

Permalink
Explicit redirection of stderr to stdout (SC2069)
Browse files Browse the repository at this point in the history
  • Loading branch information
luksa committed Mar 2, 2021
1 parent f1a53cf commit ad4a682
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions gather_istio
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,10 @@ function getSynchronization() {
local pilotName
pilotName=$(getPilotName ${namespace})

echo "Overall Envoy synchronization status for namespace ${namespace}" 2>&1 1>${logPath}/controlPlaneStatus
{ echo "Overall Envoy synchronization status for namespace ${namespace}" > ${logPath}/controlPlaneStatus; } 2>&1
local logPath=${BASE_COLLECTION_PATH}/namespaces/${namespace}/controlplane
mkdir -p ${logPath}
oc exec ${pilotName} -n ${namespace} -c discovery -- /usr/local/bin/pilot-discovery request GET /debug/syncz 2>&1 1>${logPath}/synchronization
{ oc exec ${pilotName} -n ${namespace} -c discovery -- /usr/local/bin/pilot-discovery request GET /debug/syncz > ${logPath}/synchronization; } 2>&1
}

# getEnvoyConfigForPodsInNamespace dumps the envoy config for the specified namespace and
Expand Down Expand Up @@ -140,11 +140,11 @@ function getEnvoyConfigForPodsInNamespace() {
local logPath=${BASE_COLLECTION_PATH}/namespaces/${podNamespace}/pods/${podName}
mkdir -p ${logPath}

echo "Pilot config for pod ${podName}.${podNamespace} from istiod ${pilotName}.${controlPlaneNamespace}" 2>&1 1>${logPath}/pilotConfiguration
oc exec ${pilotName} -n ${controlPlaneNamespace} -c discovery -- bash -c "/usr/local/bin/pilot-discovery request GET /debug/config_dump?proxyID=${podName}.${podNamespace}" 2>&1 1>${logPath}/pilotConfiguration
{ echo "Pilot config for pod ${podName}.${podNamespace} from istiod ${pilotName}.${controlPlaneNamespace}" > ${logPath}/pilotConfiguration; } 2>&1
{ oc exec ${pilotName} -n ${controlPlaneNamespace} -c discovery -- bash -c "/usr/local/bin/pilot-discovery request GET /debug/config_dump?proxyID=${podName}.${podNamespace}" > ${logPath}/pilotConfiguration; } 2>&1

echo "Envoy config for pod ${podName}.${podNamespace} from pilot ${pilotName}.${controlPlaneNamespace}" 2>&1 1>${logPath}/envoyConfiguration
oc exec -n ${podNamespace} ${podName} -c istio-proxy -- /usr/local/bin/pilot-agent request GET config_dump 2>&1 1>${logPath}/envoyConfiguration
{ echo "Envoy config for pod ${podName}.${podNamespace} from pilot ${pilotName}.${controlPlaneNamespace}" > ${logPath}/envoyConfiguration; } 2>&1
{ oc exec -n ${podNamespace} ${podName} -c istio-proxy -- /usr/local/bin/pilot-agent request GET config_dump > ${logPath}/envoyConfiguration; } 2>&1
fi
done
}
Expand Down

0 comments on commit ad4a682

Please sign in to comment.