You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor(lvm): continue refactoring of lvm command calling convention (#261)
* refactor(ci): rename env variables and update vgcreate command
Env vars LVM_SYSTEMID and LVM_CONFIG are used to describe a potentially
foreign lvm system on the kubernetes host. The lvm system is only meant
to be foreign to the lvm-localpv containers.
Due to the way the ci tests are written, the kubernetes host and the
lvm-localpv conatiners must have identical lvm configurations or ci
tests might fail.
The variables LVM_SYSTEMID and LVM_CONFIG have been renamed to
FOREIGN_LVM_SYSTEMID and FOREIGN_LVM_CONFIG, respectively. This is
helpful when determining their roles at a glance.
A secondary change was made to the foreign pv creation: the lvm option
`--config` has been used in place of `--systemid` to hopefully minimize
unintended side effects of using the same lvm config (with the exception
of the system id) during volume group creation.
Signed-off-by: kro <[email protected]>
* refactor(lvm): update all lvm commands to use split output
The LVM system may sometimes produce non-critical warnings which are
written to STDERR without formatting. Combining STDERR with STDIN may
cause failures when the output is being formatted or otherwise
interpreted.
Following pull #250, it's been requested that all lvm commands be
refactored to use a split output in order to resolve this issue under
non-tested scenarios. See issue #247.
The definition for RunCommandSplit has been moved above all uses of the
function, and any Command using CombinedOutput and an lvm command (s.a.:
lvs, vgs, lvcreate, &c.) has been refactored to instead use
RunCommandSplit to obtain the command's output.
If anything is written to STDERR by the lvm commands, RunCommandSplit
prints the message to the log as a warning.
Signed-off-by: kro <[email protected]>
---------
Signed-off-by: kro <[email protected]>
0 commit comments