Skip to content

fsfreeze fails if the mayastor volume is published but not mounted. #1686

@Abhinandan-Purkait

Description

@Abhinandan-Purkait

Describe the bug
It its seen that if a node has supposedly recovered from an abrupt shutdown and the application is not running, in that case the the filesystem mayastor volume is published but it's not mounted on the node where the application is. Mayastor control-plane volume being published gives the csi-controller a wrong notion that the volume is under use i.e mounted thus it tries to issue fsfreeze to ensure fs consistency, but fsfreeze wouldn't succeed as it would search for the mount path to issue FIFREEZE ioctl. In such case the flow returns a very vague error of Terminated with error error=Cannot find volume: volume ID: e0316b8c-e4f4-454c-9803-c238dc68457c.

To [Reproduce]

  • Create a k8s pod to consume a mayastor single replica volume.
  • Restart the k8s node where application is scheduled.
  • Create a volume snapshot on the mayastor single replica volume.

Expected behavior
The snapshot creation should have succeeded and fsfreeze should not have been issued? Again here's a catch here what happens if we don't issue fsfreeze and in the meanwhile the volume gets mounted and io resumes. Even though the window is very small it can still happen.

Screenshots
Screenshot 2024-07-05 at 12 23 31 PM

** OS info (please complete the following information):**

  • Distro: Ubuntu
  • Kernel version: 5.4.0-182-generic
  • MayaStor revision or container image: develop(2.7)

Additional context
Tasks to handle this:

  • Improve the error message saying what the actual error is.
  • Implement a proper fix if any for the same.

Metadata

Metadata

Labels

kind/bugCategorizes issue or PR as related to a bugkind/documentationImprovements or additions to documentation

Type

No type

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions