Closed elmiko closed 9 months ago
@elmiko: This pull request references Jira Issue OCPBUGS-28965, which is invalid:
Comment /jira refresh
to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.
The bug has been updated to refer to the pull request using the external bug tracker.
/jira refresh
@elmiko: This pull request references Jira Issue OCPBUGS-28965, which is valid. The bug has been moved to the POST state.
Requesting review from QA contact: /cc @sunzhaohua2
updated with Joel's suggestion
pre-merge test with e8aed223
$ oc get po -n openshift-machine-api
NAME READY STATUS RESTARTS AGE cluster-autoscaler-operator-6c4f8f7cd6-szgx2 2/2 Running 0 72m cluster-baremetal-operator-544f778588-wb5jt 2/2 Running 0 72m control-plane-machine-set-operator-89cc757b4-4qjx2 1/1 Running 0 72m machine-api-controllers-5c7b86795d-xjr4g 6/7 CrashLoopBackOff 17 (70s ago) 64m machine-api-operator-6c548cfd5f-vtvdg 2/2 Running 0 71m$ oc logs -n openshift-machine-api -c machine-controller machine-api-controllers-5c7b86795d-xjr4g flag provided but not defined: -logtostderr Usage of /machine-controller-manager: -health-addr string ...
@cjschaef happy for any help, and i thought i did remove that line in the latest version but seems like we still have a problem.
updated to set the logtostderr in a similar manner as the vsphere code
Do we need to add the flag to the binary in order to support that klog option? Since it appears to be the same error yet. https://github.com/openshift/machine-api-operator/blob/8d0f4a1ea47f92c2e78273c24f549202f1ae8178/cmd/vsphere/main.go#L80-L84
I can try testing that out today, and some other tweaks if necessary to see what I find out.
I did some local testing and used a custom release and this appears to work properly
diff --git a/cmd/manager/main.go b/cmd/manager/main.go
index a5317135..34934a8c 100644
--- a/cmd/manager/main.go
+++ b/cmd/manager/main.go
@@ -90,11 +90,20 @@ func main() {
"Address for hosting metrics",
)
+ logToStderr := flag.Bool(
+ "logtostderr",
+ true,
+ "Log to Stderr instead of files",
+ )
+
textLoggerConfig := textlogger.NewConfig()
textLoggerConfig.AddFlags(flag.CommandLine)
ctrl.SetLogger(textlogger.NewLogger(textLoggerConfig))
- klog.LogToStderr(true)
+
flag.Parse()
+ if logToStderr != nil {
+ klog.LogToStderr(*logToStderr)
+ }
if *printVersion {
fmt.Println(version.String)
Here's the commit I added on top of this PR (if that is easier to see diffs): https://github.com/cjschaef/machine-api-provider-ibmcloud/commit/28bdf2551e0d242748f8e473d1bd5ba7161c79f8
machine-api-controllers-5749bdff54-5r5pp 7/7 Running 0 5m19s
machine-api 4.16.0-0.nightly-2024-02-08-073857 True False False 3m42s
added @cjschaef 's commit into mine, i squashed for brevity but added co-author reference =)
@elmiko: The following test failed, say /retest
to rerun all failed tests or /retest-required
to rerun all mandatory failed tests:
Test name | Commit | Details | Required | Rerun command |
---|---|---|---|---|
ci/prow/e2e-ibmcloud | 3f0bdc5321c08b3df9b05ee714641d66a1455d33 | link | false | /test e2e-ibmcloud |
Full PR test history. Your PR dashboard.
E2E looking better now /lgtm /approve
[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: JoelSpeed
The full list of commands accepted by this bot can be found here.
The pull request process is described here
@elmiko: Jira Issue OCPBUGS-28965: All pull requests linked via external trackers have merged:
Jira Issue OCPBUGS-28965 has been moved to the MODIFIED state.
[ART PR BUILD NOTIFIER]
This PR has been included in build ose-ibmcloud-machine-controllers-container-v4.16.0-202402121210.p0.gb9b0681.assembly.stream.el9 for distgit ose-ibmcloud-machine-controllers. All builds following this will include this PR.
Fix included in accepted release 4.16.0-0.nightly-2024-02-17-013806
This change adds the configuration and command line flags setup for the textlogger configuration. It is being added to address an error when botting with the current code, that was changed to an updated klogr during the kubernetes 1.29 update. The configuration code is inspired by the machine-api-provider-vsphere main function.