Block host-fs resize if a drbd-fs is being resized
While a controllerfs is resizing, the cgts-vg available size
is not yet updated with the resulting available size after the resize,
so, during this period, a host-fs resize can be executed in parallel,
but may fail if cgts-vg doesn't have enough space for both resizes
(and puppet runtime won't return a failure because of [1]). As a
consequence, the host-fs size will be updated on the database,
even though is is not resized in fact.
This commit blocks host-fs resizes to be executed if a controllerfs
resize is running, allowing them to be executed only when the
latter finishes and thus the available size is updated on the database.
Test Plan:
PASS: Execute controllerfs-modify
Execute host-fs-modify when status=drbd_fs_resizing_in_progress
Verify that system blocks the host-fs-modify command
PASS: Execute host-fs-modify with no controllerfs being resized
Verify that host-fs-modify command running as usual
PASS: Fresh install, bootstrap and configuration
PASS: Run backup and restore successfully
PASS: Upgrade AIO SX successfully
Reviewed: https:/ /review. opendev. org/c/starlingx /config/ +/837002 /opendev. org/starlingx/ config/ commit/ e4c2191324f9616 e5dc59eb17fc7ec c9f6ee17d9
Committed: https:/
Submitter: "Zuul (22348)"
Branch: master
commit e4c2191324f9616 e5dc59eb17fc7ec c9f6ee17d9
Author: Heitor Matsui <email address hidden>
Date: Thu Apr 7 14:20:21 2022 -0300
Block host-fs resize if a drbd-fs is being resized
While a controllerfs is resizing, the cgts-vg available size
is not yet updated with the resulting available size after the resize,
so, during this period, a host-fs resize can be executed in parallel,
but may fail if cgts-vg doesn't have enough space for both resizes
(and puppet runtime won't return a failure because of [1]). As a
consequence, the host-fs size will be updated on the database,
even though is is not resized in fact.
This commit blocks host-fs resizes to be executed if a controllerfs
resize is running, allowing them to be executed only when the
latter finishes and thus the available size is updated on the database.
[1] https:/ /opendev. org/starlingx/ stx-puppet/ src/branch/ master/ puppet- manifests/ src/modules/ platform/ manifests/ filesystem. pp#L146
Test Plan: drbd_fs_ resizing_ in_progress
PASS: Execute controllerfs-modify
Execute host-fs-modify when status=
Verify that system blocks the host-fs-modify command
PASS: Execute host-fs-modify with no controllerfs being resized
Verify that host-fs-modify command running as usual
PASS: Fresh install, bootstrap and configuration
PASS: Run backup and restore successfully
PASS: Upgrade AIO SX successfully
Closes-bug: 1968201 bc36e5abc761ea0 1f1df33b09d
Change-Id: I0285d1856d76cd
Signed-off-by: Heitor Matsui <email address hidden>