search for: compare_lvm2_uuid

Displaying 17 results from an estimated 17 matches for "compare_lvm2_uuid".

Did you mean: compare_lvm2_uuids
2015 Jan 28
4
[PATCH 0/3] sparsify: Ignore read-only LVs (RHBZ#1185561).
virt-sparsify shouldn't die if sparsifying a filesystem that contains read-only LVs. https://bugzilla.redhat.com/show_bug.cgi?id=1185561 I thought about trying to make the LV writable temporarily, but I suspect that if the sysadmin has made the LV read-only, then they probably did it for a reason, so we shouldn't touch it. Rich.
2016 May 23
0
[PATCH 4/5] mllib: move stringify_args from dib
...Sys.argv in let dib_vars = read_dib_envvars () in if debug >= 1 then ( printf "DIB args:\n%s\n" dib_args; diff --git a/mllib/common_utils.ml b/mllib/common_utils.ml index d1aa8d2..0332510 100644 --- a/mllib/common_utils.ml +++ b/mllib/common_utils.ml @@ -648,6 +648,16 @@ let compare_lvm2_uuids uuid1 uuid2 = in loop 0 0 +let stringify_args args = + let args = Array.to_list args in + let rec quote_args = function + | [] -> "" + | x :: xs -> " " ^ (Filename.quote x) ^ quote_args xs + in + match args with + | [] -> "" + | app :: xs...
2015 Mar 18
0
[PATCH 1/2] mllib: allow external_command to return on nonzero return value
...mllib/common_utils.ml | 15 ++++++++++----- mllib/common_utils.mli | 2 +- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/mllib/common_utils.ml b/mllib/common_utils.ml index 76d8b79..9719b16 100644 --- a/mllib/common_utils.ml +++ b/mllib/common_utils.ml @@ -528,23 +528,28 @@ let compare_lvm2_uuids uuid1 uuid2 = loop 0 0 (* Run an external command, slurp up the output as a list of lines. *) -let external_command ~prog cmd = +let external_command ~prog ?(ignore_error = false) cmd = let chan = Unix.open_process_in cmd in let lines = ref [] in (try while true do lines := input_li...
2016 Jul 07
7
[PATCH 0/3] fix btrfs subvolume procession in tools
This patcheset fixes errors in virt-sysprep and virt-sparsify. Here we have a common functionality: is_btrfs_subvolume. Doesn't it make sense to turn it into guestfs API? Also I found an issue. In 'virt-sysprep fs-uuids', the uuids for ALL filesystems are regenerated as many times as many roots are in guest. Is it done intentionally? Maxim Perevedentsev (3): mllib: add checking
2015 Mar 18
5
[PATCH 0/2] [RFE] virt-builder should support download resume
This patchset adds support for resuming downloads in virt-builder. Partially downloaded file is not deleted on exit anymore. There is a check for partially downloaded image in cache directory based on its name. When found, download_to crafts appropriate options to continue its download. Maros Zatko (2): mllib: allow external_command to return [] on nonzero return value builder: support for
2016 Jul 07
0
[PATCH 2/3] sparsify: fix btrfs subvolume processing in is_read_only_lv
...if lv_attr.[1] = 'r' then Some lv_uuid else None ) lvs in fun fs -> - if g#is_lv fs then ( + (* Btrfs subvolumes are NOT read-only LVs *) + if not (is_btrfs_subvolume g fs) && g#is_lv fs then ( let uuid = g#lvuuid fs in List.exists (fun u -> compare_lvm2_uuids uuid u = 0) ro_uuids ) -- 1.8.3.1
2015 Jan 28
0
[PATCH 3/3] sparsify: Ignore read-only LVs (RHBZ#1185561).
...y_lv (g : G.guestfs) = + let lvs = Array.to_list (g#lvs_full ()) in + let romap = List.map ( + fun { G.lv_uuid = lv_uuid; lv_attr = lv_attr } -> + lv_uuid, lv_attr.[1] = 'r' + ) lvs in + fun fs -> + if g#is_lv fs then ( + let uuid = g#lvuuid fs in + assoc ~cmp:compare_lvm2_uuids ~default:false uuid romap + ) + else false -- 2.1.0
2015 Jan 28
1
Re: [PATCH 3/3] sparsify: Ignore read-only LVs (RHBZ#1185561).
...y.to_list (g#lvs_full ()) in > + let romap = List.map ( > + fun { G.lv_uuid = lv_uuid; lv_attr = lv_attr } -> > + lv_uuid, lv_attr.[1] = 'r' > + ) lvs in > + fun fs -> > + if g#is_lv fs then ( > + let uuid = g#lvuuid fs in > + assoc ~cmp:compare_lvm2_uuids ~default:false uuid romap > + ) > + else false This looks to me that it would go through all the LVs, even RW ones, when is_read_only_lv is invoked, right? Considering that we get a list of all the LVs anyway when doing: > + let is_read_only_lv = is_read_only_lv g in wouldn'...
2016 May 23
7
[PATCH 1/5] mllib: make external_command echo the command executed
...debug "%s" cmd; let lines = external_command cmd in let current = ref None in let subkeys = ref [] in diff --git a/mllib/common_utils.ml b/mllib/common_utils.ml index 0ffa92c..32071f4 100644 --- a/mllib/common_utils.ml +++ b/mllib/common_utils.ml @@ -649,7 +649,9 @@ let compare_lvm2_uuids uuid1 uuid2 = loop 0 0 (* Run an external command, slurp up the output as a list of lines. *) -let external_command cmd = +let external_command ?(echo_cmd = true) cmd = + if echo_cmd then + debug "%s" cmd; let chan = Unix.open_process_in cmd in let lines = ref [] in (t...
2017 Jun 15
0
[PATCH v6 04/41] mllib: Split ‘Common_utils’ into ‘Std_utils’ + ‘Common_utils’.
...v1) (split_version v2) + +(* Annoying LVM2 returns a differing UUID strings for different + * function calls (sometimes containing or not containing '-' + * characters), so we have to normalize each string before + * comparison. c.f. 'compare_pvuuids' in virt-filesystem. + *) +let compare_lvm2_uuids uuid1 uuid2 = + let n1 = String.length uuid1 and n2 = String.length uuid2 in + let rec loop i1 i2 = + if i1 = n1 && i2 = n2 then 0 (* matching *) + else if i1 >= n1 then 1 (* different lengths *) + else if i2 >= n2 then -1 + else if uuid1.[i1]...
2017 Jun 19
16
[PATCH v7 00/13] Refactor utilities
This is just the utilities part of the patch series from: https://www.redhat.com/archives/libguestfs/2017-June/msg00103.html I believe this addresses everything raised in comments on that patch series. Rich.
2015 May 15
5
[PATCH 0/4] Only tell people to use -v -x when reporting bugs if they're not using those flags.
.. and a lot of refactoring. https://bugzilla.redhat.com/show_bug.cgi?id=1167623 Rich.
2015 May 15
6
[PATCH v2 0/4] Only tell people to use -v -x when reporting bugs if they're not using those flags.
https://bugzilla.redhat.com/show_bug.cgi?id=1167623
2017 Jun 09
12
[PATCH 00/12] Refactor utility functions.
This turned out to be rather more involved than I thought. We have lots of utility functions, spread all over the repository, with not a lot of structure. This moves many of them under common/ and structures them so there are clear dependencies. This doesn't complete the job by any means. Other items I had on my to-do list for this change were: - Split up mllib/common_utils into: -
2017 Jun 12
32
[PATCH v5 00/32] Refactor utilities, implement some APIs in OCaml.
This is a combination of: https://www.redhat.com/archives/libguestfs/2017-June/msg00046.html [PATCH 00/12] Refactor utility functions. plus: https://www.redhat.com/archives/libguestfs/2017-June/msg00023.html [PATCH v3 00/19] Allow APIs to be implemented in OCaml. with the second patches rebased on top of the utility refactoring, and some other adjustments and extensions. This passes
2017 Jun 15
45
[PATCH v6 00/41] Refactor utilities, reimplement inspection in the daemon.
v5: https://www.redhat.com/archives/libguestfs/2017-June/msg00065.html Since v5, this now implements inspection almost completely for Linux and Windows guests. Rich.
2017 Jun 21
45
[PATCH v8 00/42] Refactor utilities and reimplement inspection.
v7 was: https://www.redhat.com/archives/libguestfs/2017-June/msg00169.html https://www.redhat.com/archives/libguestfs/2017-June/msg00184.html I believe this addresses all comments received so far. Also it now passes a test where I compared about 100 disk images processed with old and new virt-inspector binaries. The output is identical in all cases except one which is caused by a bug in blkid