Commit 8479915
Fix controller-runtime logger initialization warning
Remove conditional check in setRuntimeLoggerDiscard() that was causing
stack trace warnings when commands took more than 30 seconds to execute.
The controller-runtime library enforces logger initialization by printing
a stack trace if SetLogger() hasn't been called within 30 seconds of
startup. The previous implementation tried to check if the logger was
already enabled before setting it, but this check itself triggered the
eventuallyFulfillRoot() mechanism that prints the warning.
Solution: Unconditionally call SetLogger() since it can be called
multiple times safely (the last call wins). This prevents the warning
regardless of execution timing.
Affected commands:
- osdctl network verify-egress
- osdctl cluster resize (infra/controlplane/requestserving nodes)
- osdctl cluster resync
- osdctl dynatrace cluster
- And any other commands using k8s.New() or k8s.NewAsBackplaneClusterAdmin()
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>1 parent 757858d commit 8479915
1 file changed
+7
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
177 | 177 | | |
178 | 178 | | |
179 | 179 | | |
180 | | - | |
181 | | - | |
182 | | - | |
183 | | - | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
184 | 187 | | |
185 | 188 | | |
186 | 189 | | |
| |||
0 commit comments