kubernetes / cloud-provider-openstack

Apache License 2.0
616 stars 601 forks source link

[cinder-csi-plugin] if node-expand is called after node-publish, the test failed #1498

Closed jichenjc closed 3 years ago

jichenjc commented 3 years ago

Is this a BUG REPORT or FEATURE REQUEST?:

Uncomment only one, leave it on its own line:

/kind bug /kind feature

What happened:

https://github.com/kubernetes-csi/csi-test/blob/master/pkg/sanity/node.go#L731

failed,

Unexpected error:
2021-04-26 09:51:19.538596 | ubuntu-xenial-citynetwork |         <*status.statusError | 0xc000089e00>: {
2021-04-26 09:51:19.538609 | ubuntu-xenial-citynetwork |             state: {
2021-04-26 09:51:19.538622 | ubuntu-xenial-citynetwork |                 NoUnkeyedLiterals: {},
2021-04-26 09:51:19.538635 | ubuntu-xenial-citynetwork |                 DoNotCompare: [],
2021-04-26 09:51:19.538648 | ubuntu-xenial-citynetwork |                 DoNotCopy: [],
2021-04-26 09:51:19.538661 | ubuntu-xenial-citynetwork |                 atomicMessageInfo: nil,
2021-04-26 09:51:19.538674 | ubuntu-xenial-citynetwork |             },
2021-04-26 09:51:19.538686 | ubuntu-xenial-citynetwork |             sizeCache: 0,
2021-04-26 09:51:19.538700 | ubuntu-xenial-citynetwork |             unknownFields: nil,
2021-04-26 09:51:19.538712 | ubuntu-xenial-citynetwork |             Code: 13,
2021-04-26 09:51:19.538725 | ubuntu-xenial-citynetwork |             Message: "Unable to find Device path for volume",
2021-04-26 09:51:19.538738 | ubuntu-xenial-citynetwork |             Details: nil,
2021-04-26 09:51:19.538751 | ubuntu-xenial-citynetwork |         }
2021-04-26 09:51:19.538764 | ubuntu-xenial-citynetwork |         rpc error: code = Internal desc = Unable to find Device path for volume
2021-04-26 09:51:19.538777 | ubuntu-xenial-citynetwork |     occurred

What you expected to happen:

How to reproduce it:

Anything else we need to know?:

Environment:

jichenjc commented 3 years ago

the issue is findmnt not work under some situations (return “” after node -publish even if the device existing but not able to find it ) we should use upstream util functions as much as we can such as to avoid further isuses like this

https://github.com/kubernetes/mount-utils/blob/master/mount_linux.go#L321 https://github.com/kubernetes/mount-utils/blob/77a9b3dc97f9e87135fbdc74e84ab9611bcf9a1c/mount_linux.go#L556