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

Logs & CSISnapshot inaccurate #629

Closed
YvosOnTheHub opened this issue Aug 24, 2021 · 4 comments
Closed

Logs & CSISnapshot inaccurate #629

YvosOnTheHub opened this issue Aug 24, 2021 · 4 comments

Comments

@YvosOnTheHub
Copy link

YvosOnTheHub commented Aug 24, 2021

Describe the bug
When creating a CSI Snapshot, Trident logs show a snapshot not found warning message.
If it corresponds to a pre-check to validate that the snapshot name does not already exist, the message should be different or not displayed in the warning category.
Also, there is no "level=info" message stating that the snapshot was successfully created

Environment
Lab on Demand Kubernetes v4.0

Trident version: 21.07.1
Trident installation flags used: standard with Helm
Container runtime: Docker 18.09.1
Kubernetes version: 1.18.6
Kubernetes orchestrator: Kubernetes
OS: RHEL 7.5
NetApp backend types: ONTAP 9.8

To Reproduce
Configure the Trident Operator with debug: true
Create a PVC & a CSI Snapshot, then look at the logs in debug mode

Expected behavior
A message that is clearer for the users

Additional context
Here are some details about the configuration

[root@rhel3 1_Busybox]# kubectl get -n busybox volumesnapshot
NAME              READYTOUSE   SOURCEPVC   SOURCESNAPSHOTCONTENT   RESTORESIZE   SNAPSHOTCLASS    SNAPSHOTCONTENT                                    CREATIONTIME   AGE
mydata-snapshot   true         mydata                              292Ki         csi-snap-class   snapcontent-c6cd9740-e5bb-4391-b1ed-e97904604ac6   75s            73s

[root@rhel3 1_Busybox]# trident get snapshot
+-----------------------------------------------+------------------------------------------+
|                     NAME                      |                  VOLUME                  |
+-----------------------------------------------+------------------------------------------+
| snapshot-c6cd9740-e5bb-4391-b1ed-e97904604ac6 | pvc-db577cec-ad10-4fc0-af17-cfffa5339bff |
+-----------------------------------------------+------------------------------------------+

[root@rhel3 1_Busybox]# kubectl get tsnap -n trident
NAME
pvc-db577cec-ad10-4fc0-af17-cfffa5339bff-snapshot-c6cd9740-e5bb-4391-b1ed-e97904604ac6

& the logs

[root@rhel3 ~]# trident logs -d | grep 733e62a5
time="2021-08-24T07:07:34Z" level=debug msg="GRPC call: /csi.v1.Controller/CreateSnapshot" requestID=733e62a5-31ac-476b-b65d-92cf34f19136 requestSource=CSI
time="2021-08-24T07:07:34Z" level=debug msg="GRPC request: source_volume_id:"pvc-db577cec-ad10-4fc0-af17-cfffa5339bff" name:"snapshot-c6cd9740-e5bb-4391-b1ed-e97904604ac6" " requestID=733e62a5-31ac-476b-b65d-92cf34f19136 requestSource=CSI
time="2021-08-24T07:07:34Z" level=debug msg=">>>> CreateSnapshot" Method=CreateSnapshot Type=CSI_Controller requestID=733e62a5-31ac-476b-b65d-92cf34f19136 requestSource=CSI
time="2021-08-24T07:07:34Z" level=debug msg="Found no existing snapshot snapshot-c6cd9740-e5bb-4391-b1ed-e97904604ac6 in other volumes." requestID=733e62a5-31ac-476b-b65d-92cf34f19136 requestSource=CSI
time="2021-08-24T07:07:34Z" level=debug msg=AddVolumeTransaction name=pvc-db577cec-ad10-4fc0-af17-cfffa5339bff-snapshot-c6cd9740-e5bb-4391-b1ed-e97904604ac6 op=addSnapshot requestID=733e62a5-31ac-476b-b65d-92cf34f19136 requestSource=CSI
time="2021-08-24T07:07:34Z" level=debug msg="Attempting snapshot create." backend=nas-snap-reserve requestID=733e62a5-31ac-476b-b65d-92cf34f19136 requestSource=CSI snapshot=snapshot-c6cd9740-e5bb-4391-b1ed-e97904604ac6 volume=snapshot-c6cd9740-e5bb-4391-b1ed-e97904604ac6 volumeInternal=
time="2021-08-24T07:07:34Z" level=warning msg="Snapshot not found." requestID=733e62a5-31ac-476b-b65d-92cf34f19136 requestSource=CSI snapshotName=snapshot-c6cd9740-e5bb-4391-b1ed-e97904604ac6 volumeName=sr_pvc_db577cec_ad10_4fc0_af17_cfffa5339bff
time="2021-08-24T07:07:34Z" level=debug msg="<<<< CreateSnapshot" Method=CreateSnapshot Type=CSI_Controller requestID=733e62a5-31ac-476b-b65d-92cf34f19136 requestSource=CSI
time="2021-08-24T07:07:34Z" level=debug msg="GRPC response: snapshot:<size_bytes:299008 snapshot_id:"pvc-db577cec-ad10-4fc0-af17-cfffa5339bff/snapshot-c6cd9740-e5bb-4391-b1ed-e97904604ac6" source_volume_id:"pvc-db577cec-ad10-4fc0-af17-cfffa5339bff" creation_time:<seconds:1629788852 > ready_to_use:true > " requestID=733e62a5-31ac-476b-b65d-92cf34f19136 requestSource=CSI

@YvosOnTheHub YvosOnTheHub changed the title useREST API: Logs & CSISnapshot inaccurate Logs & CSISnapshot inaccurate Aug 24, 2021
@YvosOnTheHub
Copy link
Author

the issue exists in both ZAPI & REST (hence the title update)

@gnarl
Copy link
Contributor

gnarl commented Aug 24, 2021

Hi @YvosOnTheHub,

I just wanted to mention that no one should be using Trident 21.07.0. Please upgrade to Trident 21.07.1 at your earliest convenience.

@YvosOnTheHub
Copy link
Author

you are right, sorry, it is a typo, updating the case right now

@gnarl gnarl added the tracked label Aug 26, 2021
@gnarl
Copy link
Contributor

gnarl commented Mar 10, 2022

This issue was fixed with commit 24845d8 and will be included in the Trident 22.04 release.

@gnarl gnarl closed this as completed Mar 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants