Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to create cluster with kind podman #347

Closed
heylongdacoder opened this issue Nov 4, 2023 · 2 comments · Fixed by #348
Closed

Failed to create cluster with kind podman #347

heylongdacoder opened this issue Nov 4, 2023 · 2 comments · Fixed by #348
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@heylongdacoder
Copy link
Contributor

What happened?

Error returned in CreateCluster function.

Error:

F1104 16:46:26.675423   12330 env.go:375] Setup failure: error loading config file "/var/folders/gk/jhz_72bs7830pb6pq1ywhcm00000gp/T/kind-cluser-test-58ebc2614499a2d22e72edbf54f-kubecfg1049500896": yaml: line 2: mapping values are not allowed in this context

Content of /var/folders/gk/jhz_72bs7830pb6pq1ywhcm00000gp/T/kind-cluser-test-58ebc2614499a2d22e72edbf54f-kubecfg1049500896:

enabling experimental podman provider
apiVersion: v1
clusters:
- cluster:
    certificate-authority-data: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUMvakNDQWVhZ0F3SUJBZ0lCQURBTkJna3Foa2lHOXcwQkFRc0ZBREFWTVJNd0VRWURWUVFERXdwcmRXSmwKY201bGRHVnpNQjRYRFRJek1URXdOREE0TkRZeE0xb1hEVE16TVRFd01UQTRORFl4TTFvd0ZURVRNQkVHQTFVRQpBeE1LYTNWaVpYSnVaWFJsY3pDQ0FTSXdEUVlKS29aSWh2Y05BUUVCQlFBRGdnRVBBRENDQVFvQ2dnRUJBS3ZXCnAzdURIUVIvKzlTUGlpeVpQTU4wSHVTSUg5QUc1eEUvZGxnbmpmSkJweXVKa0pYanE5bGVSVTF4Qmw0QmJEbWwKT2NaZUVTZ3N4blEyaU1KNEl4QSt0MWNaNk01bmVsQlRsdU8zM2krYmNaQks3UEh6TVJBL0p1V0lWTnV4S3FuRgpJWmpqY0dWeFBrT3MwS2JV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edbf54f
    user: kind-test-58ebc2614499a2d22e72edbf54f
  name: kind-test-58ebc2614499a2d22e72edbf54f
current-context: kind-test-58ebc2614499a2d22e72edbf54f
kind: Config
preferences: {}
users:
- name: kind-test-58ebc2614499a2d22e72edbf54f
  user:
    client-certificate-data: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSURJVENDQWdtZ0F3SUJBZ0lJUDdZMW92eXJpdUl3RFFZSktvWklodmNOQVFFTEJRQXdGVEVUTUJFR0ExVUUKQXhNS2EzVmlaWEp1WlhSbGN6QWVGdzB5TXpFeE1EUXdPRFEyTVROYUZ3MHlOREV4TURNd09EUTJNVFJhTURReApGekFWQmdOVkJBb1REbk41YzNSbGJUcHRZWE4wWlhKek1Sa3dGd1lEVlFRREV4QnJkV0psY201bGRHVnpMV0ZrCmJXbHVNSUlCSWpBTkJna3Foa2lHOXcwQkFRRUZBQU9DQVE4QU1JSUJDZ0tDQVFFQXBRMzVXT3BmaEJObXpoV20KOUNFSERKOHdrL3QyNlZHbitXZmRZRDRETmZIZXN5VEtkMDMrSDhyT2FRUUlLVXdpYitmQ1l2QmhGUEJwaE1VeAorNjVlY2dDdTZFVG4wZndDanhJS2hCSnZiYlBDTUtENlp1OXhOdy9BZEljaG1zbGI4VVh6aG0vY1Nkc3A1OWppCk40cUZkNzA0VUxzMEV3UVMvdnNlQk4xZ2tVU2NGSm5IMUt1R284eGRieFp3Nnc2N21GMVlnSndoOE5ka25vOTEKUnltd0h1eThYakt2NnFJRHYxWlh2Z1drSkF4TElQT3kzcG5jV29uTldBV0ttUlVrckNWb1U4UVkxRWszZjdaTgpVaWxjSEcyTzFuWUVMdHZjRFlXQUMyTkVPc0FGVkVybURoT2xXVXR6akdNcTFEdzBUbXFMNGptbEQyWEw2UmpkCjRpdFRUUUlEQVFBQm8xWXdWREFPQmdOVkhROEJBZjhFQkFNQ0JhQXdFd1lEVlIwbEJBd3dDZ1lJS3dZQkJRVUgKQXdJd0RBWURWUjBUQVFI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NnWUFCMHhXUEhEWlcvZ290QnZDKzlCTjYKaTA2TXkxdDZ4Z1BQeHBHNUp3cXFlV3Z3VGVWTFcrMDdWbUl6bFBHMzFUSXFrUXRSQU9VM3prcktOSklwL3ZUawpQS2xGcWI5NkEzU1JrMzJkNDh1ZWp6UEk0Nm5BSWF3K21JUHBFRnhzQ2RDM3AzREhlaVNHbEVSK0lENHZIallCClkwY3Zac1BRTVBELzlqRThhRzIzV1FLQmdRREJ5QTJiVm9jN3ZyamdDU2U1eW1CalNqV1MzRlBxNUw1ay9UM1EKRHBKTlpxSVJHYzY1ZU5KYmVhZ1BobVFHUHdVVXRZT2F6RkJNZXF6dzd0dTFxS3hib0RMK0xoTTJqSG1TekxtcApPTjBzVTR4dm5RTHdaeEdqM29SWXhBTnppU0QySzdDeHIxcVo1dGNXNjIwaC9PdkcxQTcya1dIa2UrUFJ4bHhnCkdzZHlVUUtCZ0YxL3FHSFhqcGpOZm1TdmRZTmNJMVY3VXVyVWNBbmxGOUZ4b0owallwWlFLZjhXUjF3NTg5YkYKakdqV0JWN1lQYW9wOHg4TXhqVHNGKzRiaXppOXJ3bHM4SmVrVGRHRHh5WU81Mk5jdktTZ0tMVmJsbVV0TldYTQpFbXY3MUM3M29hc29IRVp2aUVQSk11cXlBS2FUc2dvR3BBOWtUWHpNVXlQTkxES1lZN01nCi0tLS0tRU5EIFJTQSBQUklWQVRFIEtFWS0tLS0tCg==

I believe there is a bug in this line(https://github.com/kubernetes-sigs/e2e-framework/blob/main/support/kind/kind.go#L119) where p.Out() is actually outputting both stdout and stderr(https://github.com/vladimirvivien/gexe/blob/main/exec/proc.go#L206), causing the kubeconfig content to be incorrect.

What did you expect to happen?

Able to create a kind podman cluster.

How can we reproduce it (as minimally and precisely as possible)?

Code to reproduce:

package e2e

import (
	"os"
	"testing"

	"sigs.k8s.io/e2e-framework/pkg/env"
	"sigs.k8s.io/e2e-framework/pkg/envconf"
	"sigs.k8s.io/e2e-framework/pkg/envfuncs"
	"sigs.k8s.io/e2e-framework/support/kind"
)

var testenv env.Environment

func TestMain(m *testing.M) {
	testenv, _ = env.NewFromFlags()
	kindClusterName := envconf.RandomName("test", 32)

	testenv.Setup(
		envfuncs.CreateCluster(kind.NewProvider(), kindClusterName),
	)

	os.Exit(testenv.Run(m))
}

Anything elese we need to know?

Version:

kind: 0.20.0
podman: 4.6.2

E2E Provider Used

kind

e2e-framework Version

v0.3.0

OS version

MacOS M2 chip

@heylongdacoder heylongdacoder added the kind/bug Categorizes issue or PR as related to a bug. label Nov 4, 2023
heylongdacoder added a commit to heylongdacoder/e2e-framework that referenced this issue Nov 4, 2023
Fixes: kubernetes-sigs#347

Signed-off-by: Wen Long <heylongdacoder@gmail.com>
@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue as fresh with /remove-lifecycle stale
  • Close this issue with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Feb 2, 2024
@Cajga
Copy link

Cajga commented Feb 26, 2024

/remove-lifecycle stale

This is still relevant and prevents people with (rootless) podman to run tests based on e2e.

@k8s-ci-robot k8s-ci-robot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Feb 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants