SUSE / salt-shaptools

Salt execution module and state to manage SAP Applications (HANA only at the moment) and SUSE Linux Enterprise High Availability components
Apache License 2.0
14 stars 11 forks source link

DRBD: check unfinished request of sync status #48

Closed nick-wang closed 4 years ago

nick-wang commented 4 years ago

The sync target change status to UpToDate first before syncing md. It may take unexpected long time on lower level devices. Checking the unfinished request even state is UpToDate.

Be aware still have possibility to make inconsistent state of sync target and sync source. But this will distinct drop the reason cause by slow backing device.

nick-wang commented 4 years ago

Thanks @nick-wang -wang , More than the logic itself, that looks good (I don't really know how to interpret the drbdsetup outputs), I think we are running to many times the status command. In each if condition more than once. I would suggest to change this somehow, just getting the status first, and passing this status to the check commands instead of running the command every time. What do you think? If it's a big change, we can merge this PR and work on that later (if you think that it's a good idea)

Yes, it is a good idea. It doesn't need to call 3 times. I will fix it in the next week, most effort is adapt the unit test and real env testing i think. So we can either release the pr first(already tested) or wait for the new commits together.