]> sourceware.org Git - lvm2.git/log
lvm2.git
10 years agotest: fix report_select test to work in cluster
Peter Rajnoha [Tue, 17 Jun 2014 16:28:27 +0000 (18:28 +0200)]
test: fix report_select test to work in cluster

The snapshot LV is used to check selection of percent values.
The orig volume must be activated exclusively in cluster.

10 years agotests: update lvcreate-thin for latest changes
Peter Rajnoha [Tue, 17 Jun 2014 16:19:59 +0000 (18:19 +0200)]
tests: update lvcreate-thin for latest changes

With recent changes introduced with the report selection support,
the content of lv_modules field is of string list type (before
it was just string type).

String list elements are always ordered now so update lvcreate-thin
test to expect the elements to be ordered.

10 years agoprop: update FIELD macro to accomodate the differentiation of number, size and percen...
Peter Rajnoha [Tue, 17 Jun 2014 16:14:38 +0000 (18:14 +0200)]
prop: update FIELD macro to accomodate the differentiation of number, size and percent field values

The differentiation of the original number field into number, size and
percent field types has been introduced with recent changes for report
selection support.

10 years agoreport: select: add man pages for report selection feature
Peter Rajnoha [Mon, 16 Jun 2014 14:23:55 +0000 (16:23 +0200)]
report: select: add man pages for report selection feature

10 years agoreport: select: add --select arg to lvm devtypes
Peter Rajnoha [Fri, 13 Jun 2014 10:57:22 +0000 (12:57 +0200)]
report: select: add --select arg to lvm devtypes

10 years agoreport: add support for implicit fields, add implicit "selected" field
Peter Rajnoha [Thu, 12 Jun 2014 11:57:22 +0000 (13:57 +0200)]
report: add support for implicit fields, add implicit "selected" field

Implicit fields are fields that are registered with the report
and reported internally by libdevmapper itself (compared to explicit
fields that are registered by the layer above libdevmapper - e.g. LVM,
dmsetup...).

The "selected" field is the implicit field (for now the only one)
that reports the result of the selection. Since the selection itself
is the property of the libdevmapper, the upper layer using dm_report_init
can't register this field itself and it must be done directly at
libdevmapper layer.

The "selected" field is internally registered as part of the "common"
report type with id 0x80000000 (the last bit in uin32_t) which is then
reserved (the explicit report types are then checked if they do not
contain this id and if yes, we error out).

This way, the "selected" field is recognized by all libdevmapper users
that initialize the reporting with "dm_report_init_with_selection".
If reporting is initialized with the classical "dm_report_init",
there's no functional change (so the "selected" field is not defined
and it's not recognized).

10 years agotests: select: add test for report selection feature
Peter Rajnoha [Tue, 10 Jun 2014 07:20:58 +0000 (09:20 +0200)]
tests: select: add test for report selection feature

10 years agoreport: select: add support for percent selection
Peter Rajnoha [Mon, 9 Jun 2014 14:23:45 +0000 (16:23 +0200)]
report: select: add support for percent selection

10 years agoreport: select: refactor: move percent handling code to libdm for reuse
Peter Rajnoha [Mon, 9 Jun 2014 10:08:27 +0000 (12:08 +0200)]
report: select: refactor: move percent handling code to libdm for reuse

10 years agoreport: select: add support for reserved value recognition in report selection string...
Peter Rajnoha [Fri, 30 May 2014 13:02:21 +0000 (15:02 +0200)]
report: select: add support for reserved value recognition in report selection string - add struct dm_report_reserved_value

Make dm_report_init_with_selection to accept an argument with an
array of reserved values where each element contains a triple:

  {dm report field type, reserved value, array of strings representing this value}

When the selection is parsed, we always check whether a string
representation of some reserved value is not hit and if it is,
we use the reserved value assigned for this string instead of
trying to parse it as a value of certain field type.

This makes it possible to define selections like:

   ... --select lv_major=undefined (or -1 or unknown or undef or whatever string representations are registered for this reserved value in the future)
   ... --select lv_read_ahead=auto
   ... --select vg_mda_copies=unmanaged

With this, each time the field value of certain type is hit
and when we compare it with the selection, we use the proper
value for comparison.

For now, register these reserved values that are used at the moment
(also more descriptive names are used for the values):

  const uint64_t _reserved_number_undef_64 = UINT64_MAX;
  const uint64_t _reserved_number_unmanaged_64 = UINT64_MAX - 1;
  const uint64_t _reserved_size_auto_64 = UINT64_MAX;

 {
  {DM_REPORT_FIELD_TYPE_NUMBER, _reserved_number_undef_64, {"-1", "undefined", "undef", "unknown", NULL}},
  {DM_REPORT_FIELD_TYPE_NUMBER, _reserved_number_unmanaged_64, {"unmanaged", NULL}},
  {DM_REPORT_FIELD_TYPE_SIZE, _reserved_size_auto_64, {"auto", NULL}},
  NULL
 }

Same reserved value of different field types do not collide.
All arrays are null-terminated.

The list of reserved values is automatically displayed within
selection help output:

  Selection operands
  ------------------
  ...

  Reserved values
  ---------------
    -1, undefined, undef, unknown   - Reserved value for undefined numeric value. [number]
    unmanaged                       - Reserved value for unmanaged number of metadata copies in VG. [number]
    auto                            - Reserved value for size that is automatically calculated. [size]

  Selection operators
  -------------------
  ...

10 years agoreport: select: show field type in field list if in context of selection
Peter Rajnoha [Mon, 16 Jun 2014 12:06:04 +0000 (14:06 +0200)]
report: select: show field type in field list if in context of selection

When the field list is displayed as help for constructing selection
criteria, show also the field value type. This is useful for users
to know what set of operators are allowed for the type - the subsequent
"Selection operands" section in the help output summarize all known
types that can be used in selection.

10 years agoreport: select: add help for creating selections
Peter Rajnoha [Thu, 29 May 2014 07:42:14 +0000 (09:42 +0200)]
report: select: add help for creating selections

The "<lvm command> -S/--select help" shows help (including list of fields to match against):

  ...field list here including the field type name...

  Selection operands
  ------------------
    field               - Reporting field.
    number              - Non-negative integer value.
    size                - Floating point value with units specified.
    string              - Characters quoted by ' or " or unquoted.
    string list         - Strings enclosed by [ ] and elements delimited by either
                          "all items must match" or "at least one item must match" operator.
    regular expression  - Characters quoted by ' or " or unquoted.

  Selection operators
  -------------------
    Comparison operators:
        =~  - Matching regular expression.
        !~  - Not matching regular expression.
         =  - Equal to.
        !=  - Not equal to.
        >=  - Greater than or equal to.
         >  - Greater than
        <=  - Less than or equal to.
         <  - Less than.

    Logical and grouping operators:
        &&  - All fields must match
         ,  - All fields must match
        ||  - At least one field must match
         #  - At least one field must match
         !  - Logical negation
         (  - Left parenthesis
         )  - Right parenthesis
         [  - List start
         ]  - List end

10 years agoreport: select: add support for comparing string lists with selection defined
Peter Rajnoha [Thu, 29 May 2014 07:42:02 +0000 (09:42 +0200)]
report: select: add support for comparing string lists with selection defined

10 years agoreport: select: add support for processing string lists in selection
Peter Rajnoha [Thu, 29 May 2014 07:41:50 +0000 (09:41 +0200)]
report: select: add support for processing string lists in selection

Selection list items are enclosed in '[' and ']' (if there's only
one item, the '[' and ']' can be omitted). Each element of the list
is a string (either quoted or unquoted, like the usual string operand
used in selection) and each element is delimited either by conjunction
(meaining "match all") or disjunction operator (meaning "match any").

For example, if "," is the conjuction operator and "/" is the
disjunction operator then:

  lv_tags=[a,b,c]

...will match all fields where tags contain *all* a, b and c.

  lv_tags=[a/b/c]

...will match all fields where tags contain *any* of a, b, or c.

Mixing operators within the list is not supported:

  lv_tags=[a,b/c]

...will give an error.

The order in which items are defined in the selection do not matter.

This patch enhances the selection parsing functionality to recognize
such lists.

10 years agoreport: select: add DM_REPORT_FIELD_TYPE_STRING_LIST to make a difference between...
Peter Rajnoha [Thu, 29 May 2014 07:41:36 +0000 (09:41 +0200)]
report: select: add DM_REPORT_FIELD_TYPE_STRING_LIST to make a difference between STRING and STRING_LIST

The {pv,vg,lv,seg}_tags and lv_modules fields are reported as string
lists using the new dm_report_field_string_list - so we just pass
the list to the fn that takes care of reporting and item sorting itself.

10 years agoreport: select: add dm_report_field_string_list to libdm
Peter Rajnoha [Thu, 29 May 2014 07:41:18 +0000 (09:41 +0200)]
report: select: add dm_report_field_string_list to libdm

Add a separate dm_report_field_string_list fn to libdevmapper to
support reporting string lists. Before, the code used libdevmappers's
dm_report_field_string fn which required formatting the list to a
single string. This functionality is now moved to libdevmapper
and the code that needs to report the string list just needs
to pass the list itself and libdevmapper will take care of this.
This also enhances code reuse.

The dm_report_field_string_list also accepts an argument to define
custom delimiter to use. If not defined, a default "," (comma) is
used as item delimiter in the string list reported.

The dm_report_field_string_list automatically sorts the items in
the list before formatting it to a final string. It also encodes
the position and length within the final string where each element
can be found. This can be used to support checking against each
list item reported since since when formatted as a single string
for the actual report, we would lose this information otherwise
(we don't want to copy each item, the position and length within
the final string is enough for us to get the original items back).

When such lists are checked against the selection tree, we can check
each item individually this way and we can support operators like
"match any" and "match all".

10 years agoreport: select: refactor: move str_list to libdm
Peter Rajnoha [Thu, 29 May 2014 07:41:03 +0000 (09:41 +0200)]
report: select: refactor: move str_list to libdm

The list of strings is used quite frequently and we'd like to reuse
this simple structure for report selection support too. Make it part
of libdevmapper for general reuse throughout the code.

This also simplifies the LVM code a bit since we don't need to
include and manage lvm-types.h anymore (the string list was the
only structure defined there).

10 years agoreport: select: add --select arg to pvdisplay, vgdisplay and lvdisplay
Peter Rajnoha [Thu, 29 May 2014 07:39:11 +0000 (09:39 +0200)]
report: select: add --select arg to pvdisplay, vgdisplay and lvdisplay

10 years agoreport: select: add --select arg to pvs, vgs and lvs
Peter Rajnoha [Thu, 29 May 2014 07:38:59 +0000 (09:38 +0200)]
report: select: add --select arg to pvs, vgs and lvs

10 years agoreport: select: add --select arg to dmsetup
Peter Rajnoha [Thu, 29 May 2014 07:38:49 +0000 (09:38 +0200)]
report: select: add --select arg to dmsetup

10 years agoreport: select: use _check_report_selection in dm_report_object to report only object...
Peter Rajnoha [Thu, 29 May 2014 07:38:36 +0000 (09:38 +0200)]
report: select: use _check_report_selection in dm_report_object to report only objects that satisfy the report selection

This is rebased and edited version of the original design and
patch proposed by Jun'ichi Nomura:
  http://www.redhat.com/archives/dm-devel/2007-April/msg00025.html

This activates the actual selection process in dm_report_object.

10 years agoreport: select: add _check_selection fn to support checking fields against given...
Peter Rajnoha [Thu, 29 May 2014 07:38:22 +0000 (09:38 +0200)]
report: select: add _check_selection fn to support checking fields against given selections

This is rebased and edited versions of the original design and
patch proposed by Jun'ichi Nomura:
  http://www.redhat.com/archives/dm-devel/2007-April/msg00025.html

The _check_selection implements the actual field checking against the
selection tree.

10 years agoreport: select: add dm_report_init_with_selection to libdm
Peter Rajnoha [Thu, 29 May 2014 07:38:08 +0000 (09:38 +0200)]
report: select: add dm_report_init_with_selection to libdm

This is rebased and edited version of the original design and
patch proposed by Jun'ichi Nomura:
  http://www.redhat.com/archives/dm-devel/2007-April/msg00025.html

The dm_report_init_with_selection is the same as dm_report_init
but it contains an additional argument to set the selection
in the form of a string that contains field names to check against and
selection operators. The selection string is parsend and a selection
tree is composed for use in the checks against individual fields when
the report is processed. The parsed selection tree is stored in dm_report
structure as "selection_root".

10 years agoreport: select: add supporting infrastucture for token parsing in report selections
Peter Rajnoha [Thu, 29 May 2014 07:37:54 +0000 (09:37 +0200)]
report: select: add supporting infrastucture for token parsing in report selections

This is rebased and edited version of the original design and
patch proposed by Jun'ichi Nomura:
  http://www.redhat.com/archives/dm-devel/2007-April/msg00025.html

Add support for parsing numbers, strings (quoted or unquoted), regexes
and operators amogst these operands in selection condition supplied.

10 years agoreport: select: add structs for report selection
Peter Rajnoha [Thu, 29 May 2014 07:37:41 +0000 (09:37 +0200)]
report: select: add structs for report selection

This is rebased and edited version of the original design and
patch proposed by Jun'ichi Nomura:
  http://www.redhat.com/archives/dm-devel/2007-April/msg00025.html

This patch defines operators and structures that will be used
to store the report selection against which the actual values
reported will be checked.

  Selection operators
  -------------------
    Comparison operators:
        =~  - Matching regular expression.
        !~  - Not matching regular expression.
         =  - Equal to.
        !=  - Not equal to.
        >=  - Greater than or equal to.
         >  - Greater than
        <=  - Less than or equal to.
         <  - Less than.

    Logical and grouping operators:
        &&  - All fields must match
         ,  - All fields must match
        ||  - At least one field must match
         #  - At least one field must match
         !  - Logical negation
         (  - Left parenthesis
         )  - Right parenthesis

10 years agoreport: select: add DM_REPORT_FIELD_TYPE_SIZE to make a difference between NUMBER...
Peter Rajnoha [Thu, 29 May 2014 07:37:22 +0000 (09:37 +0200)]
report: select: add DM_REPORT_FIELD_TYPE_SIZE to make a difference between NUMBER and SIZE

This makes it easier to check against the fields (following patches for
report selection) and check whether size units are allowed or not
with the field value.

10 years agotests: check new snapshot skills
Zdenek Kabelac [Tue, 17 Jun 2014 11:35:40 +0000 (13:35 +0200)]
tests: check new snapshot skills

10 years agotests: detect version of thin_restore command
Zdenek Kabelac [Mon, 16 Jun 2014 15:46:54 +0000 (17:46 +0200)]
tests: detect version of thin_restore command

Skip test when missing.

10 years agotests: wait for udev
Zdenek Kabelac [Mon, 16 Jun 2014 11:37:22 +0000 (13:37 +0200)]
tests: wait for udev

Before test exits, wait for udev.

10 years agocleanup: we already know max device name size
Zdenek Kabelac [Mon, 16 Jun 2014 10:39:32 +0000 (12:39 +0200)]
cleanup: we already know max device name size

Use NAME_LEN constant to simplify creation of device name.
Since the max size should be already tested in validation,
throw INTERNAL_ERROR if the size of vg/lv is bigger then NAME_LEN.

10 years agocleanup: use stack for small buffer
Zdenek Kabelac [Mon, 16 Jun 2014 10:38:14 +0000 (12:38 +0200)]
cleanup: use stack for small buffer

Avoid error checking of allocation error when just few bytes are needed
for short string and use stack.
Stacktrace lvmetad_pv_gone() fail path.

10 years agosnapshot: %ORIGIN is relative to data size
Zdenek Kabelac [Tue, 17 Jun 2014 11:33:42 +0000 (13:33 +0200)]
snapshot: %ORIGIN is relative to data size

Let's use the size of origin as the real base for percenta calculation,
and 'silenly' add needed metadata space for snapshot.

So now command   'lvcreate -s -l100%ORIGIN vg/lv' should always create a
snapshot to handle full device overwrite.

10 years agosnapshot: report proper error message
Zdenek Kabelac [Tue, 17 Jun 2014 11:13:23 +0000 (13:13 +0200)]
snapshot: report proper error message

Expresing -lXX%LV is not valid for snapshot, but error message for
snapshost case was not complete and missed %ORIGIN.
Also document correct settings for in manpage properly where
it missed %PVS.

10 years agosnapshot: do not spawn when origin is not active
Zdenek Kabelac [Mon, 16 Jun 2014 10:43:22 +0000 (12:43 +0200)]
snapshot: do not spawn when origin is not active

Since the code is not doing anything when origin is not active,
avoid spawning polling thread.

10 years agosnapshot: check snapshot exists
Zdenek Kabelac [Mon, 16 Jun 2014 10:41:30 +0000 (12:41 +0200)]
snapshot: check snapshot exists

Return 0 if the LV is not even snapshot.

10 years agosnapshot: check it's still snapshot
Zdenek Kabelac [Mon, 16 Jun 2014 11:38:35 +0000 (13:38 +0200)]
snapshot: check it's still snapshot

While polling for snapshot, detect first the snapshot still
exits.  It's valid to have multiple polling threads watching
for the same thing and just 1 can 'win' the finish part.
All others should nicely 'fail'.

10 years agopoll_daemon: Cleanly exit polling if the LV is no longer active
Jonathan Brassow [Mon, 16 Jun 2014 23:56:32 +0000 (18:56 -0500)]
poll_daemon:  Cleanly exit polling if the LV is no longer active

If the we are polling an LV due to some sort of conversion and it
becomes inactive, a rather worrisome message is produced, e.g.:
"  ABORTING: Mirror percentage check failed."

We can cleanly exit if we do a simple check to see if the LV is
active before performing the check.  This eliminates the scary
message.

10 years agocache: Properly rename origin LV tree when adding "_corig"
Jonathan Brassow [Mon, 16 Jun 2014 23:15:39 +0000 (18:15 -0500)]
cache: Properly rename origin LV tree when adding "_corig"

When creating a cache LV with a RAID origin, we need to ensure that
the sub-LVs of that origin properly change their names to include
the "_corig" extention of the top-level LV.  We do this by first
performing a 'lv_rename_update' before making the call to
'insert_layer_for_lv'.

10 years agosystemd: use RemoveOnStop for dm-event.socket and lvm2-lvmetad.socket
Peter Rajnoha [Fri, 13 Jun 2014 13:45:25 +0000 (15:45 +0200)]
systemd: use RemoveOnStop for dm-event.socket and lvm2-lvmetad.socket

Systemd version 214 introduced new "RemoveOnStop" option for socket
units to remove the socket/FIFO when the particular unit is stopped.

Also https://bugzilla.redhat.com/show_bug.cgi?id=802748.

10 years agospec: new thin-generic.profile
Peter Rajnoha [Fri, 13 Jun 2014 08:01:34 +0000 (10:01 +0200)]
spec: new thin-generic.profile

10 years agoprofile: add thin-generic.profile
Peter Rajnoha [Fri, 13 Jun 2014 07:45:26 +0000 (09:45 +0200)]
profile: add thin-generic.profile

The thin-generic.profile contains settings for thin/thin pool volumes
suitable for generic environment/use containing default settings.
This allows users to change the global lvm.conf settings at will
and still keep the original settings for volumes that have this
thin profile assigned already.

10 years agotest: pvs bz1108394
Zdenek Kabelac [Thu, 12 Jun 2014 09:31:21 +0000 (11:31 +0200)]
test: pvs bz1108394

10 years agolibdm: dm_report_object report error for no data
Zdenek Kabelac [Thu, 12 Jun 2014 09:38:04 +0000 (11:38 +0200)]
libdm: dm_report_object report error for no data

NULL data would cause problems....

10 years agolibdm: dm_report_object avoid duplicat strlen call
Zdenek Kabelac [Thu, 12 Jun 2014 09:36:51 +0000 (11:36 +0200)]
libdm: dm_report_object avoid duplicat strlen call

Remember strlen result.

10 years agoreport: avoid passing NULL label
Zdenek Kabelac [Thu, 12 Jun 2014 09:33:16 +0000 (11:33 +0200)]
report: avoid passing NULL label

Internal reporting function cannot handle NULL reporting value,
so ensure there is at least dummy label.

So move dummy_lable from tools/reporter.c and use it for all
report_object() calls in lib/report/report.c.
(Fixes RHBZ 1108394)

Simlify lvm_report_object initialization.

10 years agotests: change to inittest
Zdenek Kabelac [Wed, 11 Jun 2014 15:46:55 +0000 (17:46 +0200)]
tests: change to inittest

10 years agotests: update vgchange -c
Zdenek Kabelac [Tue, 10 Jun 2014 11:13:51 +0000 (13:13 +0200)]
tests: update vgchange -c

Vgchange now detects runnig clvmd - so update test to reflect this.

10 years agoman: dmsetup manglename
Zdenek Kabelac [Wed, 11 Jun 2014 08:52:16 +0000 (10:52 +0200)]
man: dmsetup manglename

More updates to manglename option.
Add reference to LVM2 resource page, since for a long time,
this is the right places for sources for libdevmapper....

10 years agoman: kiB uppercase
Zdenek Kabelac [Wed, 11 Jun 2014 08:54:19 +0000 (10:54 +0200)]
man: kiB uppercase

10 years agoman: update lvmthin
Zdenek Kabelac [Tue, 10 Jun 2014 21:58:45 +0000 (23:58 +0200)]
man: update lvmthin

Improve graphics form of page and use shorter correct and suggested
forms of thin pool manipulation commands.

10 years agoman: more compliant
Zdenek Kabelac [Tue, 10 Jun 2014 17:32:39 +0000 (19:32 +0200)]
man: more compliant

10 years agoman: properly escape -
Zdenek Kabelac [Wed, 11 Jun 2014 09:06:30 +0000 (11:06 +0200)]
man: properly escape -

Dash should be using '\' to be typographically correct.

10 years agoman: use bullets
Zdenek Kabelac [Wed, 11 Jun 2014 09:06:13 +0000 (11:06 +0200)]
man: use bullets

10 years agoman: advertise lvmcache, lvmthin
Zdenek Kabelac [Tue, 10 Jun 2014 09:05:51 +0000 (11:05 +0200)]
man: advertise  lvmcache, lvmthin

Add references to new man pages so they get known.

10 years agotests: some more renames lib/test -> lib/inittest
Peter Rajnoha [Wed, 11 Jun 2014 09:07:32 +0000 (11:07 +0200)]
tests: some more renames lib/test -> lib/inittest

10 years agotests: rename test to inittest
Zdenek Kabelac [Fri, 6 Jun 2014 15:40:04 +0000 (17:40 +0200)]
tests: rename test to inittest

We are getting into problem when we use 'test' for commands like
should/not/...

So avoid overloading test name and change it to inittest.

10 years agotests: make timeouts longer
Zdenek Kabelac [Fri, 6 Jun 2014 15:36:38 +0000 (17:36 +0200)]
tests: make timeouts longer

Add more time for tests, since debug kernels are getting slower...
and we add more and more tests.

However many test should be shortened to avoid testing disk-perfomance
and focus on lvm functionality...
(Often we should probably test with inactive volumes when we check
metadata operation of lvm2)

We may need to support option for 'DEEP' longer testing.

Also something like LVM_TEST_TIMEOUT_FACTOR might be useful
though it would be much better if test suite could approximete
from system perfomance test lenght...

10 years agocleanup: add missing log_error
Zdenek Kabelac [Tue, 10 Jun 2014 08:49:14 +0000 (10:49 +0200)]
cleanup: add missing log_error

log_error about no change in volume group with 'n' prompt answer.
(in-release fix)

10 years agocleanup: drop inline keyword
Zdenek Kabelac [Tue, 10 Jun 2014 08:46:04 +0000 (10:46 +0200)]
cleanup: drop inline keyword

Inline would need function body in header file.

10 years agoactivation: retry cleanup deactivation
Zdenek Kabelac [Mon, 9 Jun 2014 08:58:57 +0000 (10:58 +0200)]
activation: retry cleanup deactivation

Enable 'retry' deactivation also in 'cleanup' phase.
It shouldn't be mostly needed - however udev now produces
more and more completelny non-synchronizable device opens,
so even for orphan devices we can't easily predict where
udevd opens devices.

So it's more preferable here to log error about device being open
and retry clean, but let the command proceed.

10 years agolvmetad: Drop active connection upon lvmetad_set_active(0).
Petr Rockai [Sun, 8 Jun 2014 23:55:33 +0000 (01:55 +0200)]
lvmetad: Drop active connection upon lvmetad_set_active(0).

10 years agolibdaemon: Keep track of client threads, wait before shutdown.
Petr Rockai [Sun, 8 Jun 2014 23:50:57 +0000 (01:50 +0200)]
libdaemon: Keep track of client threads, wait before shutdown.

10 years agotest: Reflect that --sysinit only treats lvmetad specially with -aay (not -ay).
Petr Rockai [Sun, 8 Jun 2014 21:37:08 +0000 (23:37 +0200)]
test: Reflect that --sysinit only treats lvmetad specially with -aay (not -ay).

10 years agopvremove: Update lvmcache => avoid spurious error messages.
Petr Rockai [Sun, 8 Jun 2014 20:57:04 +0000 (22:57 +0200)]
pvremove: Update lvmcache => avoid spurious error messages.

10 years agolvmetad: Avoid "connect failed" spamming when lvmetad is not available.
Petr Rockai [Sun, 8 Jun 2014 20:09:29 +0000 (22:09 +0200)]
lvmetad: Avoid "connect failed" spamming when lvmetad is not available.

10 years agotest: Try harder to vgremove in lvmetad-lvm1.sh.
Petr Rockai [Sun, 8 Jun 2014 20:01:02 +0000 (22:01 +0200)]
test: Try harder to vgremove in lvmetad-lvm1.sh.

10 years agolvm1: Fail vg_write graciously when devices are missing.
Petr Rockai [Sun, 8 Jun 2014 19:52:54 +0000 (21:52 +0200)]
lvm1: Fail vg_write graciously when devices are missing.

10 years agotest: Fix the vgck test after vg_write change.
Petr Rockai [Sun, 8 Jun 2014 18:16:13 +0000 (20:16 +0200)]
test: Fix the vgck test after vg_write change.

10 years agotest: Fail devices silently in lvconvert-repair-transient.sh.
Petr Rockai [Mon, 26 May 2014 12:38:46 +0000 (14:38 +0200)]
test: Fail devices silently in lvconvert-repair-transient.sh.

10 years agotest: Make it possible to enable/disable devices silently.
Petr Rockai [Mon, 26 May 2014 12:37:45 +0000 (14:37 +0200)]
test: Make it possible to enable/disable devices silently.

10 years agometadata: Make it possible to write partial VGs obtained from lvmetad.
Petr Rockai [Mon, 26 May 2014 12:23:33 +0000 (14:23 +0200)]
metadata: Make it possible to write partial VGs obtained from lvmetad.

10 years agocleanup: move the "daemon is running" checks to lvm-wrappers
Peter Rajnoha [Fri, 6 Jun 2014 12:21:09 +0000 (14:21 +0200)]
cleanup: move the "daemon is running" checks to lvm-wrappers

And use ifdefs there, not exposing it in the tool code itself.
Later in the future, we should probably make the PIDFILE and
daemon checking code available also in case the daemon itself
is not built.

10 years agoconfigure: update libcpg test
Zdenek Kabelac [Fri, 6 Jun 2014 08:29:47 +0000 (10:29 +0200)]
configure: update libcpg test

PKG_CHECK_MODULES needs old-way if;then;fi.

10 years agocleanup: default.profile is not used (and it was split in two and renamed anyway)
Peter Rajnoha [Fri, 6 Jun 2014 08:24:50 +0000 (10:24 +0200)]
cleanup: default.profile is not used (and it was split in two and renamed anyway)

10 years agocleanup: commit c0f9c79 to work also with for non-clustered configuration
Peter Rajnoha [Fri, 6 Jun 2014 08:17:26 +0000 (10:17 +0200)]
cleanup: commit c0f9c79 to work also with for non-clustered configuration

10 years agovgchange: With '--yes', don't prompt the user
Jonathan Brassow [Fri, 6 Jun 2014 03:45:19 +0000 (22:45 -0500)]
vgchange:  With '--yes', don't prompt the user

If the user supplies a '--yes' argument, then don't bother them with
a question to confirm whether to change the cluster attribute (even
if clvmd isn't running).

10 years agoWHATS_NEW: For commit 9399b743 (prompt for VG cluster attr change)
Jonathan Brassow [Fri, 6 Jun 2014 03:29:16 +0000 (22:29 -0500)]
WHATS_NEW:  For commit 9399b743 (prompt for VG cluster attr change)

Minor change, but put a comment in WHATS_NEW anyway.

10 years agovgchange: Prompt when setting VG cluster attr if cluster is not setup
Jonathan Brassow [Fri, 6 Jun 2014 03:27:40 +0000 (22:27 -0500)]
vgchange: Prompt when setting VG cluster attr if cluster is not setup

If clvmd is not running or the locking type is not clustered and someone
attempts to set the cluster attribute on a volume group, prompt them to
see if they are sure.  (Only prompt for one though.  If neither are true,
simply ask them once.)

10 years agotests: disable python failing test
Zdenek Kabelac [Thu, 5 Jun 2014 21:07:23 +0000 (23:07 +0200)]
tests: disable python failing test

Aborts and needs fixes...

10 years agotests: fix test compare
Zdenek Kabelac [Thu, 5 Jun 2014 21:06:45 +0000 (23:06 +0200)]
tests: fix test compare

Comparing 64T can't use -eq

10 years agotests: adapt test for newline delimit
Zdenek Kabelac [Thu, 5 Jun 2014 21:05:52 +0000 (23:05 +0200)]
tests: adapt test for newline delimit

content of DEVICES is now delimited by newlines

10 years agoconfigure: do not exit with error code
Zdenek Kabelac [Thu, 5 Jun 2014 16:02:40 +0000 (18:02 +0200)]
configure: do not exit with error code

Since the test is the last command make a test in a form it will be
after its finished 0.
(regression from last configure cleanup)

10 years agotests: typo
Zdenek Kabelac [Mon, 2 Jun 2014 07:38:10 +0000 (09:38 +0200)]
tests: typo

10 years agotests: use get_devs
Zdenek Kabelac [Thu, 5 Jun 2014 11:01:43 +0000 (13:01 +0200)]
tests: use get_devs

Check how get_devs is usable with shell array DEVICES

10 years agotests: use manglename none for dmsetup
Zdenek Kabelac [Thu, 5 Jun 2014 10:09:02 +0000 (12:09 +0200)]
tests: use manglename none for dmsetup

10 years agotests: add get_devs function
Zdenek Kabelac [Wed, 4 Jun 2014 11:55:13 +0000 (13:55 +0200)]
tests: add get_devs function

Instead of rereading device list via cat - keep
the list in bash array. (Also solves problem
with spaces in device path)

Move usage of  "$path" out of lvm shell usage,
since we don't support such thing there...

10 years agotests: use shell arrays to keep device names
Zdenek Kabelac [Wed, 4 Jun 2014 11:46:19 +0000 (13:46 +0200)]
tests: use shell arrays to keep device names

Better preserving spaces in device path name,
though admitely rest of test suite need
more repairs...

10 years agotests: fix use of double apostrophes in get
Zdenek Kabelac [Thu, 5 Jun 2014 11:05:36 +0000 (13:05 +0200)]
tests: fix use of double apostrophes in get

Need to put "" around parameters.

10 years agoconfigure: reconfigure
Zdenek Kabelac [Thu, 5 Jun 2014 15:24:32 +0000 (17:24 +0200)]
configure: reconfigure

10 years agoconfigure: cleanups
Zdenek Kabelac [Thu, 5 Jun 2014 15:28:03 +0000 (17:28 +0200)]
configure: cleanups

Replace AC_PATH_PROG with AC_PATH_TOOL.
Drop 'x' when already using "" around shell variable.
Simlify some long line and ifs.
Merge multiple test evaluation with '-a', '-o'.
Use 'case' instead if several ifs when it's more elegant.
Improve usage of pkg_config_init and add it where it's been missing.
Check for UDEV_HAS_BUILTIN_BLKID and when building udev-rules.

10 years agoconfigure: accept 'none' as mangling mode
Zdenek Kabelac [Thu, 5 Jun 2014 12:38:10 +0000 (14:38 +0200)]
configure: accept 'none' as mangling mode

Since we advertise 'none' as mangling name, accept it.
Keep it backward compatible and leave disabled option still working
(though I guess there is likely no user of this option...)

10 years agoman: document DM_DEFAULT_NAME_MANGLING_MODE
Zdenek Kabelac [Thu, 5 Jun 2014 15:26:53 +0000 (17:26 +0200)]
man: document DM_DEFAULT_NAME_MANGLING_MODE

Document DM_DEFAULT_NAME_MANGLING_MODE environmental variable.
(its default setting is build time configurable)

10 years agotest: use direct I/O when injecting bad data into RAID images
Jonathan Brassow [Fri, 30 May 2014 22:26:10 +0000 (17:26 -0500)]
test: use direct I/O when injecting bad data into RAID images

When directly corrupting RAID images for the purpose of testing,
we must use direct I/O (or a 'sync' after the 'dd') to ensure that
the writes are not caught in the buffer cache in a way that is not
reachable by the top-level RAID device.

10 years agoreport: fix report field type for lv_kernel_major/minor
Peter Rajnoha [Fri, 30 May 2014 15:23:54 +0000 (17:23 +0200)]
report: fix report field type for lv_kernel_major/minor

Should be defined as numeric field, not string field.

10 years agoactivation: Remove empty DM device when table fails to load.
Jonathan Brassow [Wed, 28 May 2014 15:17:15 +0000 (10:17 -0500)]
activation:  Remove empty DM device when table fails to load.

As part of better error handling, remove DM devices that have been
sucessfully created but failed to load a table.  This can happen
when pvmove'ing in a cluster and the cluster mirror daemon is not
running on a remote node - the mapping table failing to load as a
result.  In this case, any revert would work on other nodes running
cmirrord because the DM devices on those nodes did succeed in loading.
However, because no table was able to load on the non-cmirrord nodes,
there is no table present that points to what needs to be reverted.
This causes the empty DM device to remain on the system without being
present in any LVM representation.

This patch should only be considered a partial fix to the overall
problem.  This is because only the device which failed to load a
table is removed.  Any LVs that may have been loaded as requirements
to the DM device that failed to load may be left in place.  Complete
clean-up will require tracking those devices which have been created
as dependencies and removing them along with the device that failed
to load a table.

10 years agotests: rename test
Zdenek Kabelac [Wed, 28 May 2014 13:41:06 +0000 (15:41 +0200)]
tests: rename test

10 years agorevert: restore original timeout
Zdenek Kabelac [Wed, 28 May 2014 13:27:14 +0000 (15:27 +0200)]
revert: restore original timeout

Accidently it's been commited - but it has also shown,
that on heavy loaded systems (like our test machine could be)
slightly bigger timeouts which waits longer for udev rules
processing does help and avoids occasional refuse of deactivation
because device is still being open.
(i.e. lvcreate...; lvchange -an...)

Unsure how we could now synchronize for this. On very slow(/loaded)
system 5 second timeout is simply not enough.

TODO: introduce at least lvm.conf configurable setting to
allow longer 'retry' loops.

10 years agotests: dd needs to hit disk
Zdenek Kabelac [Wed, 28 May 2014 13:24:41 +0000 (15:24 +0200)]
tests: dd needs to hit disk

Unsure if this is feature or bug of syncaction,
but it needs to be present physically on the media
and it ignores content of buffer cache...

(maybe lvchange should implicitely fsync all disks
that are members of raid array before starting test??)

10 years agotests: raid syncaction activation race
Zdenek Kabelac [Wed, 28 May 2014 13:23:46 +0000 (15:23 +0200)]
tests: raid syncaction activation race

Demonstrace problem of syncaction being called right after activation.

10 years agotests: detect same uuid on PV
Zdenek Kabelac [Tue, 27 May 2014 14:51:57 +0000 (16:51 +0200)]
tests: detect same uuid on PV

Check we know how to handle same UUID
Test  currently does NOT work on lvmetad
(or it's unclear it even should - thus test error
is currently lowered to 'test warning')

TODO: replace lib/test with a better shell script name

This page took 0.083643 seconds and 5 git commands to generate.