You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@yunikorn.apache.org by "pbacsko (via GitHub)" <gi...@apache.org> on 2023/01/24 15:04:52 UTC

[GitHub] [yunikorn-k8shim] pbacsko commented on a diff in pull request #516: [YUNIKORN-1531] Log the yk logs, dump etc to stdout

pbacsko commented on code in PR #516:
URL: https://github.com/apache/yunikorn-k8shim/pull/516#discussion_r1085454902


##########
test/e2e/wrappers.go:
##########
@@ -95,33 +93,39 @@ func RestoreConfigMapWrapper(oldConfigMap *v1.ConfigMap, annotation string) {
 }
 
 func LogTestClusterInfoWrapper(testName string, namespaces []string) {
+	fmt.Fprintf(ginkgo.GinkgoWriter, "%s Log test cluster info\n", testName)
 	var restClient yunikorn.RClient
-	outputDir := filepath.Join(configmanager.YuniKornTestConfig.LogDir, testName)
-	dirErr := os.Mkdir(outputDir, 0777)
-	Ω(dirErr).NotTo(HaveOccurred())
+	Ω(k.SetClient()).To(BeNil())
 	for _, ns := range namespaces {
-		logErr := k8s.LogNamespaceInfo(ns, outputDir)
+		logErr := k8s.LogNamespaceInfo(ns)
+		Ω(logErr).NotTo(HaveOccurred())
+
+		logErr = restClient.LogAppsInfo(ns)
 		Ω(logErr).NotTo(HaveOccurred())
 	}
-	logErr := restClient.LogAppsInfo(outputDir)
-	Ω(logErr).NotTo(HaveOccurred())
-	logErr = restClient.LogQueuesInfo(outputDir)
+	logErr := restClient.LogQueuesInfo()
 	Ω(logErr).NotTo(HaveOccurred())
-	logErr = restClient.LogNodesInfo(outputDir)
+	logErr = restClient.LogNodesInfo()
 	Ω(logErr).NotTo(HaveOccurred())
+	nodes, err := k.GetNodes()
+	Ω(err).NotTo(HaveOccurred())
+	By("Node count is " + strconv.Itoa(len(nodes.Items)))
+	for _, node := range nodes.Items {
+		By("Running describe node command for " + node.Name + "..")
+		err = k.DescribeNode(node)
+		Ω(err).NotTo(HaveOccurred())
+	}
 }
 
 // Writes Yunikorn container log "yk.log" to test log directory

Review Comment:
   Nit: comment no longer valid



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@yunikorn.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org