Skip to content

Commit

Permalink
Merge branch '2.0.8-dev' of https://github.com/vmware/weathervane int…
Browse files Browse the repository at this point in the history
…o 2.0.8-dev
  • Loading branch information
hrosenbe committed Aug 10, 2020
2 parents 731ca24 + 93878a8 commit 77a719b
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions runHarness/ComputeResources/KubernetesCluster.pm
Original file line number Diff line number Diff line change
Expand Up @@ -579,23 +579,23 @@ sub kubernetesExecOne {
$logger->debug("Output: $outString");
my @names = split /\s+/, $outString;
if ($#names < 0) {
$console_logger->error("kubernetesExecOne: There are no pods with label $serviceTypeImpl in namespace $namespace");
exit(-1);
}

# Get the name of the first pod
my $podName = $names[0];
$console_logger->debug("kubernetesExecOne: There are no pods with label $serviceTypeImpl in namespace $namespace");
$cmdFailed = 1;
$outString = "";
} else {
# Get the name of the first pod
my $podName = $names[0];

$cmd = "kubectl exec -c $serviceTypeImpl --namespace=$namespace --kubeconfig=$kubeconfigFile $contextString $podName -- $commandString";
($cmdFailed, $outString) = runCmd($cmd);
if ($cmdFailed) {
$logger->info("kubernetesExecOne exec failed: $cmdFailed");
$cmd = "kubectl exec -c $serviceTypeImpl --namespace=$namespace --kubeconfig=$kubeconfigFile $contextString $podName -- $commandString";
($cmdFailed, $outString) = runCmd($cmd);
if ($cmdFailed) {
$logger->info("kubernetesExecOne exec failed: $cmdFailed");
}
$logger->debug("Command: $cmd");
$logger->debug("Output: $outString");
}
$logger->debug("Command: $cmd");
$logger->debug("Output: $outString");


return ($cmdFailed, $outString);

}

# Does a kubectl exec in all p[ods] where the impl label matches
Expand Down

0 comments on commit 77a719b

Please sign in to comment.