Uploaded image for project: 'Apache Ozone'
  1. Apache Ozone
  2. HDDS-10057

Snapshot: 'ozone fs -ls' on '.snapshot' dir of a bucket should list only active snapshots

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 1.4.0
    • None

    Description

      ozone fs -ls throws an error for listing a deleted snapshot which is not garbage collected and deleted completely.

      Steps to reproduce:

      Create two snapshots with some keys in it and list them

      sh-4.2$ ozone fs -ls -R ofs://om/vol1/bucket1/.snapshot| grep -i key
      -rw-rw-rw-   1 hadoop hadoop       4068 2024-01-04 00:38 ofs://om/vol1/bucket1/.snapshot/snap1/key1
      -rw-rw-rw-   1 hadoop hadoop       4068 2024-01-04 00:38 ofs://om/vol1/bucket1/.snapshot/snap2/key1
      -rw-rw-rw-   1 hadoop hadoop       4068 2024-01-04 00:39 ofs://om/vol1/bucket1/.snapshot/snap2/key2
      

      Now delete one snapshot and list again before snapshot deleting service does the garbage collection:

      sh-4.2$ ozone fs -ls -R ofs://om/vol1/bucket1/.snapshot| grep -i key
      -rw-rw-rw-   1 hadoop hadoop       4068 2024-01-04 00:38 ofs://om/vol1/bucket1/.snapshot/snap1/key1
      ls: Unable to load snapshot. Snapshot with table key '/vol1/bucket1/snap2' is no longer active
      

      It returns error message instead of simply ignoring the deleted snapshot.

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            hemantk Hemant Kumar
            hemantk Hemant Kumar
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment