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

🌱 Fix log.SetLogger(...) was never called issue #1658

Merged
merged 1 commit into from
May 17, 2024

Conversation

kashifest
Copy link
Member

@kashifest kashifest commented May 13, 2024

This PR attempts to solve the log.SetLogger(...) was never called issue.
In CI e2e runs we see the following stacktrace https://jenkins.nordix.org/view/Metal3/job/metal3-ubuntu-e2e-integration-test-main/176/consoleFull. This PR fixes the issue.

[controller-runtime] log.SetLogger(...) was never called; logs will not be displayed.
12:49:34  Detected at:
12:49:34  	>  goroutine 292 [running]:
12:49:34  	>  runtime/debug.Stack()
12:49:34  	>  	/usr/local/go/src/runtime/debug/stack.go:24 +0x5e
12:49:34  	>  sigs.k8s.io/controller-runtime/pkg/log.eventuallyFulfillRoot()
12:49:34  	>  	/home/metal3ci/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/log/log.go:60 +0xcd
12:49:34  	>  sigs.k8s.io/controller-runtime/pkg/log.(*delegatingLogSink).WithName(0xc0000cf040, {0x2669614, 0x14})
12:49:34  	>  	/home/metal3ci/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/log/deleg.go:147 +0x45
12:49:34  	>  github.com/go-logr/logr.Logger.WithName({{0x2a50288, 0xc0000cf040}, 0x0}, {0x2669614?, 0x0?})
12:49:34  	>  	/home/metal3ci/go/pkg/mod/github.com/go-logr/[email protected]/logr.go:345 +0x3d
12:49:34  	>  sigs.k8s.io/controller-runtime/pkg/client.newClient(0xc0005e6f50?, {0x0, 0xc0003bce00, {0x0, 0x0}, 0x0, {0x0, 0x0}, 0x0})
12:49:34  	>  	/home/metal3ci/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/client/client.go:129 +0xec
12:49:34  	>  sigs.k8s.io/controller-runtime/pkg/client.New(0x412805?, {0x0, 0xc0003bce00, {0x0, 0x0}, 0x0, {0x0, 0x0}, 0x0})
12:49:34  	>  	/home/metal3ci/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/client/client.go:110 +0x7d
12:49:34  	>  sigs.k8s.io/cluster-api/test/framework.(*clusterProxy).GetClient.func1({0xb2d05e00, 0xc0003bcc50})
12:49:34  	>  	/home/metal3ci/go/pkg/mod/sigs.k8s.io/cluster-api/[email protected]/framework/cluster_proxy.go:204 +0x79
12:49:34  	>  k8s.io/apimachinery/pkg/util/wait.loopConditionUntilContext.func1(0xc0003458c0?, {0x2a4a2b0?, 0xc0003bcc40?})
12:49:34  	>  	/home/metal3ci/go/pkg/mod/k8s.io/[email protected]/pkg/util/wait/loop.go:53 +0x52
12:49:34  	>  k8s.io/apimachinery/pkg/util/wait.loopConditionUntilContext({0x2a4a2b0, 0xc0003bcc40}, {0x2a3f6c8?, 0xc0003458c0}, 0x1, 0x0, 0x0?)
12:49:34  	>  	/home/metal3ci/go/pkg/mod/k8s.io/[email protected]/pkg/util/wait/loop.go:54 +0x117
12:49:34  	>  k8s.io/apimachinery/pkg/util/wait.PollUntilContextTimeout({0x2a4a198?, 0x3f534e0?}, 0xb2d05e00, 0x1?, 0x1?, 0x1000000000000?)
12:49:34  	>  	/home/metal3ci/go/pkg/mod/k8s.io/[email protected]/pkg/util/wait/poll.go:48 +0x98
12:49:34  	>  sigs.k8s.io/cluster-api/test/framework.(*clusterProxy).GetClient(0xc000c80480)
12:49:34  	>  	/home/metal3ci/go/pkg/mod/sigs.k8s.io/cluster-api/[email protected]/framework/cluster_proxy.go:203 +0xbe
12:49:34  	>  sigs.k8s.io/cluster-api/test/framework/clusterctl.ApplyCustomClusterTemplateAndWait.setDefaults.func3({_, _}, {{0x2a5acf8, 0xc000c80480}, {0xc000eaa001, 0x44fb5, 0x44fb6}, {0x2650038, 0x5}, {0x2650dec, ...}, ...}, ...)
12:49:34  	>  	/home/metal3ci/go/pkg/mod/sigs.k8s.io/cluster-api/[email protected]/framework/clusterctl/clusterctl_helpers.go:464 +0x3d
12:49:34  	>  sigs.k8s.io/cluster-api/test/framework/clusterctl.ApplyCustomClusterTemplateAndWait({_, _}, {{0x2a5acf8, 0xc000c80480}, {0xc000eaa001, 0x44fb5, 0x44fb6}, {0x2650038, 0x5}, {0x2650dec, ...}, ...}, ...)
12:49:34  	>  	/home/metal3ci/go/pkg/mod/sigs.k8s.io/cluster-api/[email protected]/framework/clusterctl/clusterctl_helpers.go:428 +0x1110
12:49:34  	>  sigs.k8s.io/cluster-api/test/framework/clusterctl.ApplyClusterTemplateAndWait({_, _}, {{0x2a5acf8, 0xc000c80480}, {{0x0, 0x0}, {0xc000688593, 0x42}, {0xc0006885d6, 0x1b}, ...}, ...}, ...)
12:49:34  	>  	/home/metal3ci/go/pkg/mod/sigs.k8s.io/cluster-api/[email protected]/framework/clusterctl/clusterctl_helpers.go:323 +0x994
12:49:34  	>  github.com/metal3-io/cluster-api-provider-metal3/test/e2e.createTargetCluster({0xc000056193, 0x7})
12:49:34  	>  	/home/metal3ci/metal3/test/e2e/pivoting_based_feature_test.go:181 +0x3a5
12:49:34  	>  github.com/metal3-io/cluster-api-provider-metal3/test/e2e.glob..func6.1()
12:49:34  	>  	/home/metal3ci/metal3/test/e2e/integration_test.go:28 +0xa7
12:49:34  	>  github.com/onsi/ginkgo/v2/internal.extractBodyFunction.func3({0x7a0ee8, 0xc000351200})
12:49:34  	>  	/home/metal3ci/go/pkg/mod/github.com/onsi/ginkgo/[email protected]/internal/node.go:472 +0x13
12:49:34  	>  github.com/onsi/ginkgo/v2/internal.(*Suite).runNode.func3()
12:49:34  	>  	/home/metal3ci/go/pkg/mod/github.com/onsi/ginkgo/[email protected]/internal/suite.go:889 +0x8d
12:49:34  	>  created by github.com/onsi/ginkgo/v2/internal.(*Suite).runNode in goroutine 99
12:49:34  	>  	/home/metal3ci/go/pkg/mod/github.com/onsi/ginkgo/[email protected]/internal/suite.go:876 +0xddb

@metal3-io-bot
Copy link
Contributor

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@metal3-io-bot metal3-io-bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label May 13, 2024
@metal3-io-bot metal3-io-bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label May 13, 2024
@kashifest
Copy link
Member Author

/test metal3-ubuntu-e2e-integration-test-main

2 similar comments
@kashifest
Copy link
Member Author

/test metal3-ubuntu-e2e-integration-test-main

@kashifest
Copy link
Member Author

/test metal3-ubuntu-e2e-integration-test-main

@kashifest kashifest marked this pull request as ready for review May 13, 2024 10:46
@metal3-io-bot metal3-io-bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label May 13, 2024
@kashifest
Copy link
Member Author

/test metal3-centos-e2e-integration-test-main

@kashifest
Copy link
Member Author

/test metal3-centos-e2e-integration-test-main
/test metal3-ubuntu-e2e-integration-test-main

5 similar comments
@kashifest
Copy link
Member Author

/test metal3-centos-e2e-integration-test-main
/test metal3-ubuntu-e2e-integration-test-main

@kashifest
Copy link
Member Author

/test metal3-centos-e2e-integration-test-main
/test metal3-ubuntu-e2e-integration-test-main

@kashifest
Copy link
Member Author

/test metal3-centos-e2e-integration-test-main
/test metal3-ubuntu-e2e-integration-test-main

@kashifest
Copy link
Member Author

/test metal3-centos-e2e-integration-test-main
/test metal3-ubuntu-e2e-integration-test-main

@kashifest
Copy link
Member Author

/test metal3-centos-e2e-integration-test-main
/test metal3-ubuntu-e2e-integration-test-main

@kashifest
Copy link
Member Author

/test metal3-centos-e2e-integration-test-main

1 similar comment
@kashifest
Copy link
Member Author

/test metal3-centos-e2e-integration-test-main

Copy link
Member

@Sunnatillo Sunnatillo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@metal3-io-bot metal3-io-bot added the lgtm Indicates that a PR is ready to be merged. label May 15, 2024
Copy link
Member

@tuminoid tuminoid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/approve

No such complaint visible anymore.

@metal3-io-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: tuminoid

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@metal3-io-bot metal3-io-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 15, 2024
@kashifest
Copy link
Member Author

/test metal3-centos-e2e-integration-test-main

2 similar comments
@kashifest
Copy link
Member Author

/test metal3-centos-e2e-integration-test-main

@kashifest
Copy link
Member Author

/test metal3-centos-e2e-integration-test-main

@tuminoid
Copy link
Member

/retest

3 similar comments
@kashifest
Copy link
Member Author

/retest

@tuminoid
Copy link
Member

/retest

@kashifest
Copy link
Member Author

/retest

@tuminoid
Copy link
Member

/override metal3-centos-e2e-integration-test-main
Ubuntu passed, centos CI is timing out.

@metal3-io-bot
Copy link
Contributor

@tuminoid: Overrode contexts on behalf of tuminoid: metal3-centos-e2e-integration-test-main

In response to this:

/override metal3-centos-e2e-integration-test-main
Ubuntu passed, centos CI is timing out.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@metal3-io-bot metal3-io-bot merged commit ab97486 into metal3-io:main May 17, 2024
14 of 16 checks passed
@metal3-io-bot metal3-io-bot deleted the fix/infra-logs branch May 17, 2024 04:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants