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

reconciler: incomplete log output #1418

Closed
mythi opened this issue May 15, 2023 · 4 comments · Fixed by #1561
Closed

reconciler: incomplete log output #1418

mythi opened this issue May 15, 2023 · 4 comments · Fixed by #1561
Milestone

Comments

@mythi
Copy link
Contributor

mythi commented May 15, 2023

this line

log.Info("", cmp.Diff(ds0.Spec.Template.Spec, ds.Spec.Template.Spec, diff.IgnoreUnset()))

is causing incomplete log lines that look suspicious especially when the diff is empty:

I0515 14:13:19.142299 1922029 reconciler.go:233] "" controller="dsadeviceplugin" controllerGroup="deviceplugin.intel.com" controllerKind="DsaDevicePlugin" DsaDevicePlugin="dsadeviceplugin-test" namespace="" name=
"dsadeviceplugin-test" reconcileID=d9fa9595-5651-4796-9c6d-75073106860e ="(MISSING)"
@hershpa
Copy link
Contributor

hershpa commented May 24, 2023

We have observed similar behavior on OpenShift 4.12:

I0524 15:35:03.613495 1 reconciler.go:233] "intel-device-plugins-manager: " controller="sgxdeviceplugin" controllerGroup="deviceplugin.intel.com" controllerKind="SgxDevicePlugin" SgxDevicePlugin="sgxdeviceplugin-sample" namespace="" name="sgxdeviceplugin-sample" reconcileID=a30409d8-f114-415d-87e4-7be8b43e54e3 ="(MISSING)" I0524 15:35:03.613575 1 reconciler.go:233] "intel-device-plugins-manager: " controller="qatdeviceplugin" controllerGroup="deviceplugin.intel.com" controllerKind="QatDevicePlugin" QatDevicePlugin="qatdeviceplugin-sample" namespace="" name="qatdeviceplugin-sample" reconcileID=72caa4a3-4e4e-40a1-8984-96847a09d204 ="(MISSING)" I0524 15:35:03.613687 1 reconciler.go:233] "intel-device-plugins-manager: " controller="gpudeviceplugin" controllerGroup="deviceplugin.intel.com" controllerKind="GpuDevicePlugin" GpuDevicePlugin="gpudeviceplugin-sample" namespace="" name="gpudeviceplugin-sample" reconcileID=51c54915-9f99-47dc-9fe7-bb769a19a4a2 ="(MISSING)" I0524 15:35:03.627115 1 reconciler.go:233] "intel-device-plugins-manager: " controller="qatdeviceplugin" controllerGroup="deviceplugin.intel.com" controllerKind="QatDevicePlugin" QatDevicePlugin="qatdeviceplugin-sample" namespace="" name="qatdeviceplugin-sample" reconcileID=a18294f2-8169-4570-9cb8-d13131b319e0 ="(MISSING)"

@tkatila
Copy link
Contributor

tkatila commented May 31, 2023

The log.Info function takes pairs of arguments (name & value). The cmp.Diff() should have a name that is before the value. Something like:
log.Info("", "diff", cmp.Diff(ds0.Spec.Template.Spec, ds.Spec.Template.Spec, diff.IgnoreUnset()))

But there are also problems with the individual controllers indicating changes where there isn't any. Like in @hershpa's example: sgx, gpu and qat are all printing this "changed" line even though the Diff() returns empty string (=no changes).

@tkatila
Copy link
Contributor

tkatila commented Oct 11, 2023

I revisited this and created a PR which should decrease those prints.

@hershpa
Copy link
Contributor

hershpa commented Oct 11, 2023

Thanks @tkatila this will definitely help eliminate unwanted confusion.

@tkatila tkatila mentioned this issue Oct 12, 2023
@tkatila tkatila added this to the 0.29.0 milestone Oct 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants