Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[IMPROVEMENT] Don't log about inability to change settings that didn't change.Β #6812

@james-munson

Description

@james-munson

Is your improvement request related to a feature? Please describe (πŸ‘ if you like this request)

When changing an unrelated setting, each longhorn-manager logs this

[longhorn-manager-bpnpc] time="2023-09-29T17:52:15Z" level=error msg="Failed to sync Longhorn setting longhorn-system/storage-network" controller=longhorn-setting error="failed to sync setting for longhorn-system/storage-network: failed to apply storage-network setting to Longhorn workloads when there are attached volumes" node=jbm-u20-rke2-pool2-b96bb8a4-l7b7n 
[longhorn-manager-bpnpc] time="2023-09-29T17:52:15Z" level=error msg="Failed to sync Longhorn setting longhorn-system/v2-data-engine" controller=longhorn-setting error="failed to sync setting for longhorn-system/v2-data-engine: cannot apply v2-data-engine setting to Longhorn workloads when there are attached volumes" node=jbm-u20-rke2-pool2-b96bb8a4-l7b7n 
[longhorn-manager-bpnpc] time="2023-09-29T17:52:15Z" level=error msg="Failed to sync Longhorn setting longhorn-system/storage-network" controller=longhorn-setting error="failed to sync setting for longhorn-system/storage-network: failed to apply storage-network setting to Longhorn workloads when there are attached volumes" node=jbm-u20-rke2-pool2-b96bb8a4-l7b7n 
[longhorn-manager-bpnpc] time="2023-09-29T17:52:15Z" level=error msg="Failed to sync Longhorn setting longhorn-system/v2-data-engine" controller=longhorn-setting error="failed to sync setting for longhorn-system/v2-data-engine: cannot apply v2-data-engine setting to Longhorn workloads when there are attached volumes" node=jbm-u20-rke2-pool2-b96bb8a4-l7b7n 
[longhorn-manager-bpnpc] time="2023-09-29T17:52:15Z" level=error msg="Failed to sync Longhorn setting longhorn-system/storage-network" controller=longhorn-setting error="failed to sync setting for longhorn-system/storage-network: failed to apply storage-network setting to Longhorn workloads when there are attached volumes" node=jbm-u20-rke2-pool2-b96bb8a4-l7b7n 
[longhorn-manager-bpnpc] E0929 17:52:15.616595       1 setting_controller.go:204] failed to sync setting for longhorn-system/v2-data-engine: cannot apply v2-data-engine setting to Longhorn workloads when there are attached volumes 
[longhorn-manager-bpnpc] time="2023-09-29T17:52:15Z" level=error msg="Dropping Longhorn setting longhorn-system/v2-data-engine out of the queue" controller=longhorn-setting error="failed to sync setting for longhorn-system/v2-data-engine: cannot apply v2-data-engine setting to Longhorn workloads when there are attached volumes" node=jbm-u20-rke2-pool2-b96bb8a4-l7b7n 
[longhorn-manager-bpnpc] E0929 17:52:15.623254       1 setting_controller.go:204] failed to sync setting for longhorn-system/storage-network: failed to apply storage-network setting to Longhorn workloads when there are attached volumes 
[longhorn-manager-bpnpc] time="2023-09-29T17:52:15Z" level=error msg="Dropping Longhorn setting longhorn-system/storage-network out of the queue" controller=longhorn-setting error="failed to sync setting for longhorn-system/storage-network: failed to apply storage-network setting to Longhorn workloads when there are attached volumes" node=jbm-u20-rke2-pool2-b96bb8a4-l7b7n 

That's 9 lines of pointless and distracting logging (at error level!) for a change that was not even requested.

Describe the solution you'd like

Surely we can check that the value did change and log nothing, rather than supposing it might have and warning why we can't do it if it actually did.

Describe alternatives you've considered

Additional context

Metadata

Metadata

Labels

backport/1.4.4backport/1.5.2kind/improvementRequest for improvement of existing functionpriority/0Must be implement or fixed in this release (managed by PO)require/auto-e2e-testRequire adding/updating auto e2e test cases if they can be automatedrequire/backportRequire backport. Only used when the specific versions to backport have not been definied.

Type

No type

Projects

Status

Closed

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions