You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by GitBox <gi...@apache.org> on 2021/10/25 07:13:33 UTC

[GitHub] [skywalking-infra-e2e] mrproliu opened a new pull request #59: Support create kind cluster from local `kind` command

mrproliu opened a new pull request #59:
URL: https://github.com/apache/skywalking-infra-e2e/pull/59


   1. When I tried to add the Istio E2E test to the main repo, I found we could not use the `build-in` kind to build the Kubernetes cluster, need to use the `kind` command line from the host.
   2. Fix when exposing multiple ports in `KinD` environment, the cleanup will hang.


-- 
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: notifications-unsubscribe@skywalking.apache.org

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



[GitHub] [skywalking-infra-e2e] mrproliu closed pull request #59: Support create kind cluster from local `kind` command

Posted by GitBox <gi...@apache.org>.
mrproliu closed pull request #59:
URL: https://github.com/apache/skywalking-infra-e2e/pull/59


   


-- 
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: notifications-unsubscribe@skywalking.apache.org

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



[GitHub] [skywalking-infra-e2e] kezhenxu94 commented on pull request #59: Support create kind cluster from local `kind` command

Posted by GitBox <gi...@apache.org>.
kezhenxu94 commented on pull request #59:
URL: https://github.com/apache/skywalking-infra-e2e/pull/59#issuecomment-950624607


   > > > * When I tried to add the Istio E2E test to the main repo, I found we could not use the `build-in` kind to build the Kubernetes cluster, need to use the `kind` command line from the host.
   > > 
   > > 
   > > What's the reason why it cannot use built-in kind to create a cluster?
   > 
   > When I trying to running Istio E2E on the GitHub Action, using build-in kind the `istio` or `skywalking` could not be schedule to running pod, popup the error `0/4 nodes are available: 1 node(s) had taint {node-role.kubernetes.io/master: }, that the pod didn't tolerate, 3 node(s) had taint {node.kubernetes.io/not-ready: }, that the pod didn't tolerate.`, but when I trying to using `kind` command line, it's worked. I think maybe GitHub Action version kind has been adapted.
   
   I'll take a look, that doesn't make sense to me.
   
   > > Using local kind command again relies on the users local machine.
   > 
   > I have checked local machine have `kind` command, if it's not exists, we keep to using build-in version of kind.
   
   I don't want to have this kind of cases in the repo, when people have locally installed a different version of `kind` but we want to use another in this repo, we're getting ourselves in trouble to explain the different behaviors in local machine and GHA


-- 
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: notifications-unsubscribe@skywalking.apache.org

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



[GitHub] [skywalking-infra-e2e] kezhenxu94 commented on pull request #59: Support create kind cluster from local `kind` command

Posted by GitBox <gi...@apache.org>.
kezhenxu94 commented on pull request #59:
URL: https://github.com/apache/skywalking-infra-e2e/pull/59#issuecomment-950806650


   And this https://github.com/apache/skywalking-infra-e2e/pull/60


-- 
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: notifications-unsubscribe@skywalking.apache.org

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



[GitHub] [skywalking-infra-e2e] kezhenxu94 commented on pull request #59: Support create kind cluster from local `kind` command

Posted by GitBox <gi...@apache.org>.
kezhenxu94 commented on pull request #59:
URL: https://github.com/apache/skywalking-infra-e2e/pull/59#issuecomment-950599450


   > * When I tried to add the Istio E2E test to the main repo, I found we could not use the `build-in` kind to build the Kubernetes cluster, need to use the `kind` command line from the host.
   
   What's the reason why it cannot use built-in kind to create a cluster? Using local kind command again relies on the users local machine


-- 
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: notifications-unsubscribe@skywalking.apache.org

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



[GitHub] [skywalking-infra-e2e] mrproliu commented on pull request #59: Support create kind cluster from local `kind` command

Posted by GitBox <gi...@apache.org>.
mrproliu commented on pull request #59:
URL: https://github.com/apache/skywalking-infra-e2e/pull/59#issuecomment-950608259


   > > * When I tried to add the Istio E2E test to the main repo, I found we could not use the `build-in` kind to build the Kubernetes cluster, need to use the `kind` command line from the host.
   > 
   > What's the reason why it cannot use built-in kind to create a cluster? 
   
   When I trying to running Istio E2E on the GitHub Action, using build-in kind the `istio` or `skywalking` could not be schedule to running pod, popup the error `0/4 nodes are available: 1 node(s) had taint {node-role.kubernetes.io/master: }, that the pod didn't tolerate, 3 node(s) had taint {node.kubernetes.io/not-ready: }, that the pod didn't tolerate.`, but when I trying to using `kind` command line, it's worked. 
   I think maybe GitHub Action version kind has been adapted.
   
   > Using local kind command again relies on the users local machine.
   
   I have checked local machine have `kind` command, if it's not exists, we keep to using build-in version of kind.


-- 
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: notifications-unsubscribe@skywalking.apache.org

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



[GitHub] [skywalking-infra-e2e] kezhenxu94 commented on pull request #59: Support create kind cluster from local `kind` command

Posted by GitBox <gi...@apache.org>.
kezhenxu94 commented on pull request #59:
URL: https://github.com/apache/skywalking-infra-e2e/pull/59#issuecomment-950805641


   Turns out to be the cluster is not ready when applying resources. Check this https://github.com/kezhenxu94/skywalking/runs/3995203614?check_suite_focus=true


-- 
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: notifications-unsubscribe@skywalking.apache.org

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



[GitHub] [skywalking-infra-e2e] mrproliu commented on pull request #59: Support create kind cluster from local `kind` command

Posted by GitBox <gi...@apache.org>.
mrproliu commented on pull request #59:
URL: https://github.com/apache/skywalking-infra-e2e/pull/59#issuecomment-950929140


   kjk


-- 
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: notifications-unsubscribe@skywalking.apache.org

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



[GitHub] [skywalking-infra-e2e] mrproliu removed a comment on pull request #59: Support create kind cluster from local `kind` command

Posted by GitBox <gi...@apache.org>.
mrproliu removed a comment on pull request #59:
URL: https://github.com/apache/skywalking-infra-e2e/pull/59#issuecomment-950929140


   kjk


-- 
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: notifications-unsubscribe@skywalking.apache.org

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



[GitHub] [skywalking-infra-e2e] wu-sheng commented on a change in pull request #59: Support create kind cluster from local `kind` command

Posted by GitBox <gi...@apache.org>.
wu-sheng commented on a change in pull request #59:
URL: https://github.com/apache/skywalking-infra-e2e/pull/59#discussion_r735335073



##########
File path: internal/components/setup/kind.go
##########
@@ -140,23 +141,42 @@ func KindShouldWaitSignal() bool {
 // KindCleanNotify notify when clean up
 func KindCleanNotify() {
 	if portForwardContext != nil {
-		portForwardContext.stopChannel <- struct{}{}
+		close(portForwardContext.stopChannel)
 		// wait all stopped
 		for i := 0; i < portForwardContext.resourceCount; i++ {
-			<-portForwardContext.resourceFinishedChannel
+			// add timeout prevent port already close
+			select {
+			case <-portForwardContext.resourceFinishedChannel:
+			case <-time.After(time.Second * 2):
+			}
 		}
 	}
 }
 
 func createKindCluster(kindConfigPath string) error {
 	// the config file name of the k8s cluster that kind create
 	kubeConfigPath = constant.K8sClusterConfigFilePath
-	args := []string{"create", "cluster", "--config", kindConfigPath, "--kubeconfig", kubeConfigPath}
 
 	logger.Log.Info("creating kind cluster...")
-	logger.Log.Debugf("cluster create commands: %s %s", constant.KindCommand, strings.Join(args, " "))
-	if err := kind.Run(kindcmd.NewLogger(), kindcmd.StandardIOStreams(), args); err != nil {
-		return err
+	_, findKindErr := exec.LookPath("kind")
+	args := []string{"create", "cluster", "--config", kindConfigPath, "--kubeconfig", kubeConfigPath}
+	if findKindErr != nil {
+		logger.Log.Debugf("using internal kind cluster create commands: %s %s", constant.KindCommand, strings.Join(args, " "))
+		if err := kind.Run(kindcmd.NewLogger(), kindcmd.StandardIOStreams(), args); err != nil {
+			return err
+		}
+	} else {
+		logger.Log.Debugf("using command kind cluster create commands: %s %s", constant.KindCommand, strings.Join(args, " "))

Review comment:
       Could you be more clear about these 2 cases? The words seem confusing.




-- 
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: notifications-unsubscribe@skywalking.apache.org

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



[GitHub] [skywalking-infra-e2e] wu-sheng commented on pull request #59: Support create kind cluster from local `kind` command

Posted by GitBox <gi...@apache.org>.
wu-sheng commented on pull request #59:
URL: https://github.com/apache/skywalking-infra-e2e/pull/59#issuecomment-950628891


   I agree. We should not switch to local command system which reply on user's local setup or GHA setup. In-built KinD should be recommended only. It is better to locate what is going wrong.


-- 
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: notifications-unsubscribe@skywalking.apache.org

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