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

[GitHub] [yunikorn-k8shim] manirajv06 opened a new pull request, #516: [YUNIKORN-1531] Log the yk logs, dump etc to stdout

manirajv06 opened a new pull request, #516:
URL: https://github.com/apache/yunikorn-k8shim/pull/516

   ### What is this PR for?[
   
   1. Dump cluster info, yk logs to stdout
   2. Fetch Apps, Queues, Nodes info through corresponding REST API and dump the responses to stdout
   
   Above dumps can be used to troubleshoot e2e test failures occurred with various k8s versions in upstream setup.
   
   ### What type of PR is it?
   * [ ] - Improvement
   
   ### Todos
   * [ ] - Task
   
   ### What is the Jira issue?
   https://issues.apache.org/jira/browse/YUNIKORN-1531
   
   ### How should this be tested?
   
   ### Screenshots (if appropriate)
   
   ### Questions:
   * [ ] - The licenses files need update.
   * [ ] - There is breaking changes for older versions.
   * [ ] - It needs documentation.
   


-- 
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


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

Posted by "pbacsko (via GitHub)" <gi...@apache.org>.
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


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

Posted by "pbacsko (via GitHub)" <gi...@apache.org>.
pbacsko commented on code in PR #516:
URL: https://github.com/apache/yunikorn-k8shim/pull/516#discussion_r1085504316


##########
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:
   Removed during commit



-- 
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


[GitHub] [yunikorn-k8shim] pbacsko closed pull request #516: [YUNIKORN-1531] Log the yk logs, dump etc to stdout

Posted by "pbacsko (via GitHub)" <gi...@apache.org>.
pbacsko closed pull request #516: [YUNIKORN-1531] Log the yk logs, dump etc to stdout
URL: https://github.com/apache/yunikorn-k8shim/pull/516


-- 
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


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

Posted by codecov.
codecov[bot] commented on PR #516:
URL: https://github.com/apache/yunikorn-k8shim/pull/516#issuecomment-1400475379

   # [Codecov](https://codecov.io/gh/apache/yunikorn-k8shim/pull/516?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#516](https://codecov.io/gh/apache/yunikorn-k8shim/pull/516?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (602525f) into [master](https://codecov.io/gh/apache/yunikorn-k8shim/commit/6b96aff34562d8b8801f90bb75211d544463be48?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (6b96aff) will **increase** coverage by `0.02%`.
   > The diff coverage is `n/a`.
   
   ```diff
   @@            Coverage Diff             @@
   ##           master     #516      +/-   ##
   ==========================================
   + Coverage   69.39%   69.41%   +0.02%     
   ==========================================
     Files          45       45              
     Lines        7714     7714              
   ==========================================
   + Hits         5353     5355       +2     
   + Misses       2164     2162       -2     
     Partials      197      197              
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/yunikorn-k8shim/pull/516?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [pkg/dispatcher/dispatcher.go](https://codecov.io/gh/apache/yunikorn-k8shim/pull/516?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL2Rpc3BhdGNoZXIvZGlzcGF0Y2hlci5nbw==) | `76.22% <0.00%> (+1.39%)` | :arrow_up: |
   
   :mega: We’re building smart automated test selection to slash your CI/CD build times. [Learn more](https://about.codecov.io/iterative-testing/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   


-- 
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