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

errors and return codes on a per-lv basis #45

Open
richm opened this issue Feb 20, 2024 · 0 comments
Open

errors and return codes on a per-lv basis #45

richm opened this issue Feb 20, 2024 · 0 comments

Comments

@richm
Copy link
Contributor

richm commented Feb 20, 2024

If you specify --all, or provide a snapset, then the code performs operations on several volumes. For example, if a snapset of 5 volumes are passed in, and the operations are successful on the first 4, then the 5th one fails, the user has no way to know which of those operations were successful. The response should contain information about each volume e.g.

result:
  return_code: N  # if there are any errors, this will be the return_code of the last error
  changed: true|false  # if there are any changes, this will be true
  results:
    - name: name argument for snapset element, if given
      vg: volume group, if given
      lv: logical volume, if given
      return_code: N  # code from operation
      changed: true|false  # if the operation changed something
      message: ....  # message from the operation
    - name: ....
    ....

We could also have a config parameter - snapshot_fail_fast: true|false - if true, once it hits the first failure, it returns without processing all of the items in the snapset. If false, it will process all of them.
This is similar to how Ansible returns results from a loop - https://docs.ansible.com/ansible/latest/playbook_guide/playbooks_loops.html#registering-variables-with-a-loop

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant