Skip to content

Conversation

@Millefeuille42
Copy link
Contributor

Tests DRBD's corruption recovery using drbdadm verify and invalidate-remote commands as well as basic VM operations (startup, snapshot, shutdown)

Tests DRBD's corruption recovery
using drbdadm verify and invalidate-remote commands as well as
basic VM operations (startup, snapshot, shutdown)

Signed-off-by: Mathieu Labourier <mathieu.labourier@vates.tech>
Copy link
Contributor

@klmp200 klmp200 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Otherwise, lgtm

- add missing type hints in function declarations
- rename wait_sync to wait_drbd_sync
- rename single letter variables

Co-authored-by: Antoine Bartuccio <antoine.bartuccio@vates.tech>
Signed-off-by: Mathieu Labourier <mathieu.labourier@vates.tech>
@Millefeuille42 Millefeuille42 force-pushed the mlr/629-xostor-drbdadm-verify branch from e65c96c to 5af35f6 Compare November 5, 2025 14:13

def get_drbd_status(host: Host, resource: str):
logging.debug(f"[{host}] Fetching DRBD status for resource `{resource}`...")
return json.loads(host.ssh(["drbdsetup", "status", resource, "--json"]))
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would split this line, but you probably know what you are doing more than myself :)

]

def wait_drbd_sync(host: Host, resource: str):
logging.info(f"[{host}] Waiting for DRBD sync on resource `{resource}`...")
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This works but pylint dont like fstrings: W1203: Use lazy % formatting in logging functions (logging-fstring-interpolation)

Copy link

@rzr rzr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

few remarks but not my expertise (yet)

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

Successfully merging this pull request may close these issues.

4 participants