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

Support snapshot revert operation #3623

Draft
wants to merge 17 commits into
base: master
Choose a base branch
from

Commits on Sep 11, 2024

  1. Increase devicemapper dependency lower bound to 0.34.4

    Signed-off-by: mulhern <amulhern@redhat.com>
    mulkieran committed Sep 11, 2024
    Configuration menu
    Copy the full SHA
    a1427ea View commit details
    Browse the repository at this point in the history
  2. Add optional merge field to FilesystemSave metadata

    Add MergeRequested property to filesystem D-Bus interface.
    Use it to set and unset the filesystem metadata field.
    
    Change destroy_filesystems to take into account the merge status of a
    filesystem.  Move all the destroy functionality into thinpool implementation.
    Do more checks to avoid deleting filesystems that shouldn't be deleted.
    Check for situations where multiple snapshots are referring to the same
    deleted filesystem.
    
    Check for invalid scheduling requests when requesting or canceling a
    merge request.
    
    Add some tests.
    mulkieran committed Sep 11, 2024
    Configuration menu
    Copy the full SHA
    95e1c40 View commit details
    Browse the repository at this point in the history
  3. Read the filesystem metadata before any setup

    Verify that scheduled merges are permissible.
    
    Return with an error without setting up any filesystems if duplicate
    UUIDs or names are found.
    
    Perform the merges before setting up any filesystems. If a merge can be
    rolled back, set up the two filesystems in the merge relation in the
    normal way.
    
    Signed-off-by: mulhern <amulhern@redhat.com>
    mulkieran committed Sep 11, 2024
    Configuration menu
    Copy the full SHA
    165ef8e View commit details
    Browse the repository at this point in the history
  4. Also set reverted filesystem UUID

    Signed-off-by: mulhern <amulhern@redhat.com>
    mulkieran committed Sep 11, 2024
    Configuration menu
    Copy the full SHA
    1e0cb6d View commit details
    Browse the repository at this point in the history
  5. On revert, use origin's created value

    Signed-off-by: mulhern <amulhern@redhat.com>
    mulkieran committed Sep 11, 2024
    Configuration menu
    Copy the full SHA
    01f3169 View commit details
    Browse the repository at this point in the history
  6. Clean up origin links after revert

    If a snapshot was taken after the one reverted to, remove its origin
    field.
    
    If a snapshot was reverted, any snapshot that points at it should have
    its origin field removed.
    
    Signed-off-by: mulhern <amulhern@redhat.com>
    mulkieran committed Sep 11, 2024
    Configuration menu
    Copy the full SHA
    6331a0a View commit details
    Browse the repository at this point in the history
  7. Run a python-based test to revert a filesystem

    Signed-off-by: mulhern <amulhern@redhat.com>
    mulkieran committed Sep 11, 2024
    Configuration menu
    Copy the full SHA
    c30bda3 View commit details
    Browse the repository at this point in the history
  8. Do not remove origin field of later snapshots

    Signed-off-by: mulhern <amulhern@redhat.com>
    mulkieran committed Sep 11, 2024
    Configuration menu
    Copy the full SHA
    67d67c6 View commit details
    Browse the repository at this point in the history
  9. Set a snapshot of the reverted snapshot to the origin

    Signed-off-by: mulhern <amulhern@redhat.com>
    mulkieran committed Sep 11, 2024
    Configuration menu
    Copy the full SHA
    5613ad9 View commit details
    Browse the repository at this point in the history
  10. Retain origin when reverting a snap into another

    Signed-off-by: mulhern <amulhern@redhat.com>
    mulkieran committed Sep 11, 2024
    Configuration menu
    Copy the full SHA
    09d8346 View commit details
    Browse the repository at this point in the history
  11. Generalize unset_origin to set_origin

    Semantics preserving, so pass None where it is invoked.
    
    Signed-off-by: mulhern <amulhern@redhat.com>
    mulkieran committed Sep 11, 2024
    Configuration menu
    Copy the full SHA
    0aa3096 View commit details
    Browse the repository at this point in the history
  12. Pass value to D-Bus methods for origin changes

    Signed-off-by: mulhern <amulhern@redhat.com>
    mulkieran committed Sep 11, 2024
    Configuration menu
    Copy the full SHA
    aa6be1e View commit details
    Browse the repository at this point in the history
  13. Patch up origin fields if deleted filesystem was an origin

    Make this change visible on the D-Bus.
    
    Signed-off-by: mulhern <amulhern@redhat.com>
    mulkieran committed Sep 11, 2024
    Configuration menu
    Copy the full SHA
    bf1eea3 View commit details
    Browse the repository at this point in the history
  14. More docs for tests

    Signed-off-by: mulhern <amulhern@redhat.com>
    mulkieran committed Sep 11, 2024
    Configuration menu
    Copy the full SHA
    dca91a6 View commit details
    Browse the repository at this point in the history
  15. Add additional test code

    Signed-off-by: mulhern <amulhern@redhat.com>
    mulkieran committed Sep 11, 2024
    Configuration menu
    Copy the full SHA
    4240fb3 View commit details
    Browse the repository at this point in the history
  16. Refactor with a few methods

    Signed-off-by: mulhern <amulhern@redhat.com>
    mulkieran committed Sep 11, 2024
    Configuration menu
    Copy the full SHA
    b1c1ab5 View commit details
    Browse the repository at this point in the history
  17. Define a merge operation for FilesystemSave

    To avoid a mutable snap and miscellaneous setting and unsetting in the
    setup method.
    
    Signed-off-by: mulhern <amulhern@redhat.com>
    mulkieran committed Sep 11, 2024
    Configuration menu
    Copy the full SHA
    43fb5c5 View commit details
    Browse the repository at this point in the history