Skip to content

Check if the vfs is synced before fully unmounting #51

@olevski

Description

@olevski

To replicate:

  • mount something
  • copy a large file or many small files into the location
  • delete the pod that has the mount

The file(s) will not be fully synced with the remote.

According to this: rclone/rclone#5816 (comment)

You can get vfs stats via the remote control api. In the stats you can see if there is an ongoing upload or sync.

For synced you'd want these both 0
"uploadsInProgress": 0,
"uploadsQueued": 0

Here are the docs on that remote control endpoint: https://rclone.org/rc/#vfs-stats

We should do this check in NodeUnpublishVolume or in DeleteVolume. There is also NodeUnstageVolume and one of these 3 is most suitable for this operation. Some research may be required to figure out which step makes the most sense for this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions