-
Notifications
You must be signed in to change notification settings - Fork 100
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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]>
- Loading branch information
Showing
2 changed files
with
42 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters