trident icon indicating copy to clipboard operation
trident copied to clipboard

Unnecessary error is logged when using NFS instead of iscsi

Open c-goes opened this issue 10 months ago • 3 comments

Describe the bug

In this line of code https://github.com/NetApp/trident/blob/9e3b0079cfaf4c39abf40156a7cb04ac5264c692/utils/iscsi/iscsi.go#L506 an error is logged even though publishInfo.IscsiTargetPortal is an empty string. In our case it is an empty string when using NFS. The error message was a bit confusing when we tried to debug another problem.

The error was:

time="2024-12-16T09:18:33Z" level=error msg="Portal '' is missing target IQN; it may not be considered for iSCSI self-healing." logLayer=csi_frontend requestID=<requestID> requestSource="Internal workflow="plugin=activate"

Environment Provide accurate information about the environment to help us reproduce the issue.

  • Trident version: [e.g. 19.10] 24.10
  • Trident installation flags used: [e.g. -d -n trident --use-custom-yaml]
  • Container runtime: [e.g. Docker 19.03.1-CE] containerd
  • Kubernetes version: [e.g. 1.15.1] 1.30.7
  • Kubernetes orchestrator: [e.g. OpenShift v3.11, Rancher v2.3.3] Rancher
  • Kubernetes enabled feature gates: [e.g. CSINodeInfo]
  • OS: [e.g. RHEL 7.6, Ubuntu 16.04] SLES 15 SP6
  • NetApp backend types: [e.g. CVS for AWS, ONTAP AFF 9.5, HCI 1.7]
  • Other:

To Reproduce

Use NFS and watch the log of trident pods.

Expected behavior

No error when using NFS regarding iSCSI self-healing.

c-goes avatar Feb 03 '25 13:02 c-goes

Hi @c-goes, we will investigate and fix this in a future release. Thanks !

sjpeeris avatar Feb 05 '25 18:02 sjpeeris

How can one verify if the error message is caused by a NFS volume or not?

Cajga avatar Mar 19 '25 08:03 Cajga

The issue is still there with the latest v25.06.0 version. @sjpeeris would you accept a PR that switches the log message to debug in case the portal is empty?

Cajga avatar Jul 25 '25 07:07 Cajga