History | View | Annotate | Download (27 kB)
lvmstrap: fix logic bug for partition reread
The if structure in CheckReread is broken, and makes partitions rereadbe full of race issues (esp. after updating them).
Also fix a small message bug.
Signed-off-by: Iustin Pop <iustin@google.com>Reviewed-by: Michael Hanselmann <hansmi@google.com>
lvmstrap: fix very old contact information
A memory from the past: this was left over from before the 1.2 releaseor so…
lvmstrap: add more excluded FS types
Also moves the list of excluded types to the top level and make it afrozenset.
lvmstrap: add an explicit test for mounted devices
Recent kernels/userland report a mounted filesystem as follows:
root@node4:~# fuser -avm /dev/sda5 USER PID ACCESS COMMAND /dev/sda5: root kernel mount /srv/ganeti...
lvmstrap: add explicit test for swap backends
Similar to mounted filesystems, recent kernel/userland report swapbackends:
root@node4:~# fuser -avm /dev/sda6 USER PID ACCESS COMMAND /dev/sda6: root kernel swap /dev/sda6...
lvmstrap: ignore small-sized partitions
This patch changes lvmstrap to ignore “small” partitions. Currentlyextended partitions are reported as unused as with a size of 1024(bytes), and this confuses lvmstrap. Since a very small partitionwon't help anyway (below hundred of PE size is not helpful), let's...
lvmstrap: abstract a little the sysfs paths
lvmstrap: add PV-on-partition support
This is a not-so-nice change, adding support for partitions to be usedas PVs.
The not-nice part is that partitions live in a separate place insysfs, whereas in dev they live at the same level as disks. Weworkaround this via a new SysfsName function that computes the correct...
lvmstrap: also test sysfs holders
If a device has entries in its holder directory(/sys/block/$name/holders), it means that some kernel system "uses" that device, and hence should not be considered available.
This patch adds a new 'in-use' check based on this sysfs test, and...
lvmstrap: add support for non-partitioned md disks
This patch, originally written by Marc Schmitt <mschmitt@google.com>,adds support for MD devices (used in a non-partitioned mode). Iabstracted all the original startswith('md') checks into separatefunctions, and also moved the supported disk types to a list....
Update docstrings in tools/ and enable epydoc
This patch updates the docstrings in tools/ (mostly in lvmstrap, whichis very very old code-base) and then enabled the tools in this directoryfor 'make apidoc' too.
Signed-off-by: Iustin Pop <iustin@google.com>...
Remove more unused variables
This removes unused variables in the rest of the code (outside lib/).
Signed-off-by: Iustin Pop <iustin@google.com>Reviewed-by: Olivier Tharan <olive@google.com>
Add targeted pylint disables
This patch should have only:
- pylint disables- docstring changes- whitespace changes
Unify the multiple 'verbose' options
Currently multiple files define a 'verbose' option. This patch moves allthese definitions to a single VERBOSE_OPT option which is exported fromcli.py.
Merge branch 'next' into branch-2.1
lvmstrap: Change diskinfo to use GenerateTable
This way the produced table is formatted nicely.
Signed-off-by: Stephen Shirley <diamond@google.com>Signed-off-by: Guido Trotter <ultrotter@google.com>Reviewed-by: Michael Hanselmann <hansmi@google.com>
Fix some typos
Signed-off-by: Michael Hanselmann <hansmi@google.com>Reviewed-by: Iustin Pop <iustin@google.com>
Use ReadFile.splitlines() rather than readlines
A few places in the code open a file "manually" rather than using ourwrapper function, because they need an array with the lines. Combiningthe result of utils.ReadFile with splitlines() we get rid of theexceptions....
lvmstrap: allow removable devices too
For testing or just in case a device is exported by a bad driver withthe 'removable' flag set, this patch adds a flag to lvmstrap that allowsit to use these devices too.
Reviewed-by: ultrotter
Codestyle fixes: adding a few empty lines
Various code style fixes for strings.
- When line wrapping is needed, move spaces to the next line.- Remove embedded line breaks from error messages.
Reviewed-by: schreiberal
Replace tabs with spaces.
Reviewed-by: iustinp
Initial commit.