Skip to content

Commit

Permalink
Extend log collecting for subscription and operator pods
Browse files Browse the repository at this point in the history
Signed-off-by: Jakub Stejskal <[email protected]>
  • Loading branch information
Frawless committed Jan 11, 2024
1 parent 779ac75 commit c094677
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions src/main/java/io/odh/test/framework/logs/LogCollector.java
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,16 @@ private static void saveClusterState(Path logpath) throws IOException {
Files.writeString(logpath.resolve("pvs.log"), cmdClient.exec(false, false, "describe", "pv").out());
Files.writeString(logpath.resolve("dsc.yml"), cmdClient.exec(false, false, "get", "dsc", "-o", "yaml").out());
Files.writeString(logpath.resolve("dsci.yml"), cmdClient.exec(false, false, "get", "dsci", "-o", "yaml").out());
Files.writeString(logpath.resolve("subsccriptions.yml"), cmdClient.exec(false, false, "get", "subscriptions.operators.coreos.com", "--all-namespaces", "-o", "yaml").out());
kube.listPodsByPrefixInName(OdhConstants.BUNDLE_OPERATOR_NAMESPACE, "opendatahub-operator-controller-manager").forEach(pod -> {
writeLogsFromPods(logpath, pod);
});
kube.listPodsByPrefixInName(OdhConstants.OLM_OPERATOR_NAMESPACE, "opendatahub").forEach(pod -> {
writeLogsFromPods(logpath, pod);
});
kube.listPodsByPrefixInName(OdhConstants.OLM_OPERATOR_NAMESPACE, OdhConstants.OLM_OPERATOR_NAME).forEach(pod -> {
writeLogsFromPods(logpath, pod);
});
kube.listPods(OdhConstants.CONTROLLERS_NAMESPACE).forEach(pod -> {
writeLogsFromPods(logpath, pod);
});
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/io/odh/test/utils/PodUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public class PodUtils {
private PodUtils() { }

public static void waitForPodsReady(String namespaceName, boolean containers, Runnable onTimeout) {
TestUtils.waitFor("readiness of all Pods matching in namespace {} " + namespaceName,
TestUtils.waitFor("readiness of all Pods matching in namespace " + namespaceName,
TestConstants.GLOBAL_POLL_INTERVAL_MEDIUM, READINESS_TIMEOUT,
() -> {
List<Pod> pods = ResourceManager.getClient().listPods(namespaceName);
Expand Down

0 comments on commit c094677

Please sign in to comment.