Skip to content

Commit f31152e

Browse files
committed
Replaced _is_mounted(DATABASE_PATH) by is_controller() when relevant.
Also some explanations on new LINSTOR_AUTO_BACKUP_DELAY in constants.py Signed-off-by: Arnaud Garcia-Fernandez <arnaud.garcia-fernandez@vates.tech>
1 parent d341622 commit f31152e

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

drivers/constants.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,5 @@
1212
# on the master.
1313
NS_PREFIX_LVM: Final = "lvm-"
1414

15+
# Delay in seconds between two LINSTOR DB backups when launched by the check_sr helper.
1516
LINSTOR_AUTO_BACKUP_DELAY = 3600

drivers/linstorvolumemanager.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3049,15 +3049,15 @@ def force_exec(fn):
30493049
except Exception:
30503050
pass
30513051

3052-
if mount == cls._is_mounted(DATABASE_PATH):
3052+
if mount == cls.is_controller():
30533053
force_exec(lambda: cls._move_files(
30543054
DATABASE_PATH, backup_path
30553055
))
30563056
force_exec(lambda: cls._mount_volume(
30573057
volume_path, DATABASE_PATH, not mount
30583058
))
30593059

3060-
if mount != cls._is_mounted(DATABASE_PATH):
3060+
if mount != cls.is_controller():
30613061
force_exec(lambda: cls._move_files(
30623062
backup_path, DATABASE_PATH
30633063
))

0 commit comments

Comments
 (0)