summaryrefslogtreecommitdiff
path: root/daemons
Commit message (Collapse)AuthorAgeFilesLines
* lvmdbusd: Prevent running --nojson with VDO supportTony Asleson2019-10-301-0/+4
|
* lvmdbusd: Add VgVdo class & assoc. interfaceTony Asleson2019-10-303-3/+64
| | | | | When VDO support is available we will create VG object instances which will allow the API user to create VDO pool LVs.
* lvmdbusd: Add cfg.vdo_supportTony Asleson2019-10-302-1/+8
| | | | Will be used to add vdo interfaces on demand.
* lvmdbusd: Add check for reserved name '_vdata'Tony Asleson2019-10-301-1/+1
| | | | Added for vdo support.
* lvmdbusd: Add d and D to type map for VolumeTypeTony Asleson2019-10-301-0/+1
| | | | These were added for vdo integration.
* lvmdbusd: Remove use of tmp variablesTony Asleson2019-10-303-73/+43
| | | | | We can use tuple expansion from the command handler functions directly.
* lvmdbusd: Remove duplicate error handling codeTony Asleson2019-10-304-24/+16
| | | | | vg, lv, pv code had the same function for handling command execution. Move to utility function and abstract the difference.
* cmirrord: deamon links libdmZdenek Kabelac2019-10-042-2/+3
| | | | | Correct included header files for this outdated tool since it's linked with libdm, it need to use header files from this dir.
* dmeventd: avoid bail out preventing repair in raid plugin but keep messageHeinz Mauelshagen2019-09-201-8/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | Followup patch mentioned in previous commit fe577f84cbf6bd7be76b457c9d54d0e54e57f93d. Problem: even though dead raid component devices are detected, the raid plugin is bailing out thus preventing a repair attempt. Rational: in case of component device errors, the MD resynchronization thread runs in parallel with the thrown event being processed by the raid plugin. The plugin retrieves the raid device status but that still reflects insync regions as 0 (when it should already be total regions) because the MD thread didn't update it yet. Solution: Remove the insync regions check but keep the informal message "waiting for resynchronization" and let lvconvert carry out its pre-repair checks and optionally carry out a repair attempt. Related: https://bugzilla.redhat.com/show_bug.cgi?id=1751887 Related: https://bugzilla.redhat.com/show_bug.cgi?id=1560739 Related: https://bugzilla.redhat.com/show_bug.cgi?id=1468590 Related: https://bugzilla.redhat.com/show_bug.cgi?id=1654860 Related: https://bugzilla.redhat.com/show_bug.cgi?id=1729303 Related: https://bugzilla.redhat.com/show_bug.cgi?id=1741016
* Revert "dmeventd: avoid bail out preventing repair in raid plugin"Heinz Mauelshagen2019-09-201-6/+10
| | | | | | | | | | | | This reverts commit ad560a286a0b5d08086324e6194b060c136e9353. The reverted patch also removed the warning which we realized we need to keep as valuable process information (see related bugzilla below). In a followup patch, we'll keep the message and avoid bailing out thus always allowing lvconvert to try repairing if 'allocate' fault policy set. Related: https://bugzilla.redhat.com/show_bug.cgi?id=1751887
* Revert "lvmlockd: use commonly used define NOTIFYDBUS_SUPPORT"David Teigland2019-09-162-8/+15
| | | | | | This reverts commit 71af650760c2b75b3c267277f47d8ba235421300. It disabled sd_notify() which broke 'systemctl start lvmlockd'.
* Fix converting dbus.UInt types to stringVojtech Trefny2019-08-271-16/+19
| | | | | | | | | | | | | | | | | | | | With Python 3.8 converting these directly to string using str() no longer works, we need to convert these to integer first. On Python 3.8: >>> str(dbus.Int64(1)) 'dbus.Int64(1)' On Python 3.7 (and older): >>> str(dbus.UInt64(1)) '1' This is probably related to removing __str__ function from method from int (dbus.UInt is subclass of int) which happened in 3.8, see https://docs.python.org/3.8/whatsnew/3.8.html Signed-off-by: Vojtech Trefny <vtrefny@redhat.com>
* dmeventd: avoid bail out preventing repair in raid pluginHeinz Mauelshagen2019-08-161-10/+6
| | | | | | | | | | | | | | | | | | | | | | | Problem: even though dead raid component devices are detected, the raid plugin is bailing out thus preventing a repair attempt. Rational: in case of component device errors, the MD resynchronization thread runs in parallel with the thrown event being processed by the raid plugin. The plugin retrieves the raid device status but that still reflects insync regions as 0 (when it should already be total regions) because the MD thread didn't update it yet. Solution: Remove the insync regions check and let lvconvert carry out its pre-repair checks and optionally carry out a repair attempt. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1560739 Related: https://bugzilla.redhat.com/show_bug.cgi?id=1468590 Related: https://bugzilla.redhat.com/show_bug.cgi?id=1654860 Related: https://bugzilla.redhat.com/show_bug.cgi?id=1729303 Related: https://bugzilla.redhat.com/show_bug.cgi?id=1741016
* lvmlockd: fix snprintf warningsDavid Teigland2019-05-023-12/+24
|
* libdaemon: use pselect to avoid condition checking raceZdenek Kabelac2019-04-161-1/+1
| | | | | | | | | | To avoid tiny race on checking arrival of signal and entering select (that can latter remain stuck as signal was already delivered) switch to use pselect(). If it would needed, we can eventually add extra code for older systems without pselect(), but there are probably no such ancient systems in use.
* lvextend: refresh shared LV without using selectDavid Teigland2019-04-041-3/+2
| | | | | Using select instead of normal args did not end up being a help, so remove it.
* lvextend: refresh shared LV with vgname as argDavid Teigland2019-03-221-1/+2
| | | | | | | Update the previous commit to leave the vgname as an arg instead of moving it into the select option, (the compound select option rule is confusing the dlm arg processing.)
* lvextend: refresh shared LV using select optionDavid Teigland2019-03-221-1/+33
| | | | | | | | Using --select 'lvname=LV && vgname=VG' avoids the problem of the lvchange exit code not distinguishing an actual error result vs the VG or LV not existing. (This is in case there is an odd dlm/gfs2 setup where some nodes are running the dlm but do not have access to the VG.)
* lvextend: refresh shared LV remotely using dlm/corosyncDavid Teigland2019-03-214-0/+127
| | | | | | | | | When lvextend extends an LV that is active with a shared lock, use this as a signal that other hosts may also have the LV active, with gfs2 mounted, and should have the LV refreshed to reflect the new size. Use the libdlmcontrol run api, which uses dlm_controld/corosync to run an lvchange --refresh command on other cluster nodes.
* lvextend: allow on LV active with a shared lockDavid Teigland2019-03-212-1/+5
| | | | | Detect when a shared lock exists, don't require the normal exclusive lock, and allow the lvextend.
* warn about changes to an active lv with shared lockDavid Teigland2019-03-212-0/+42
| | | | | | | | | | When an LV is active with a shared lock, a command can be run to change the LV with --lockopt skiplv (to override the exclusive lock the command ordinarily requires which is not compatible with the outstanding shared lock.) In this case, other commands may have the LV active and may need to refresh the LV, so print warning stating this.
* vdo: enable dmeventd resizeZdenek Kabelac2019-01-211-2/+1
|
* lvmdbusd: Use UUID instead of name for VG renameTony Asleson2019-01-162-3/+3
| | | | | Use the UUID to specify the VG to rename instead of the name as this approach works when we have duplicate VG names.
* lvmdbusd: Handle duplicate VG namesTony Asleson2019-01-162-9/+42
| | | | | | | | | | | Lvm can at times have duplicate names. When this happens the daemon will internally use vg_name:vg_uuid as the name for lookups, but display just the vg_name externally. If an API user uses the Manager.LookUpByLvmId and queries the vg name they will only get returned one result as the API can only accommodate returning 1. The one returned is the first instance found when sorting the volume groups by UUID. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1583510
* lvmdbusd: Correct object manager lookupsTony Asleson2019-01-161-35/+15
| | | | | | | | | When we have two logical volumes which switch their names at the same time we are left with incorrect lookups. Anytime we find an entry by doing a lookup by UUID or by name we will ensure that the lookups are indeed correct. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1642176
* lvmdbusd: Spelling correctionTony Asleson2019-01-161-1/+1
|
* lvmdbusd: LookUpByLvmId: Add doc for cb, cbeTony Asleson2019-01-161-0/+2
|
* lvmdbusd: Ensure all paths return valueTony Asleson2019-01-161-1/+1
|
* lvmlockd: make lockstart wait for existing startDavid Teigland2019-01-161-3/+6
| | | | | | | | | | | | | | | | | | If there are two independent scripts doing: vgchange --lockstart vg lvchange -ay vg/lv The first vgchange to do the lockstart will wait for the lockstart to complete before returning. The second vgchange to do the lockstart will see that the start is already in progress (from the first) and will do nothing. This means the second does not wait for any lockstart to complete, and moves on to the lvchange which may find the lockspace still starting and fail. To fix this, make the vgchange lockstart command wait for any lockstart's in progress to complete.
* cleanup: use zallocZdenek Kabelac2018-12-224-14/+8
| | | | Some places forget to use zalloc().
* cov: fix memleak on error pathZdenek Kabelac2018-12-221-1/+2
| | | | Do not leak lvs pointer on error path.
* Revert "lvmlockd: Fix arguments when built without sanlock"Zdenek Kabelac2018-12-211-2/+2
| | | | | | This reverts commit b068f21f6a24094936a33269067c18373b48f2cd. This revert was incorrect.
* dmeventd: unlock lvm2 lock on error pathZdenek Kabelac2018-12-211-0/+1
| | | | | New code missed to unlock locked lvm2 on error path when command is not configured.
* lvmlockd: drop superfluous definesZdenek Kabelac2018-12-211-3/+0
| | | | | These defines are automatically granted with _GNU_SOURCE which is use for whole compilation via configure.h.
* lvmlockd: use commonly used define NOTIFYDBUS_SUPPORTZdenek Kabelac2018-12-212-15/+8
| | | | | Build with configured NOTIFYDBUS_SUPPORT, SYSTEMD_LIBS, SYSTEMD_CFLAGS. Also add proper build dependencies on internal libraries.
* lvmpolld: improve makefile depsZdenek Kabelac2018-12-211-5/+4
| | | | Add correct build dependencies on internal libraries.
* configure: avoid repeative inclusion of configure.hZdenek Kabelac2018-12-213-3/+0
| | | | | | | | | | Since configure.h is a generated header and it's missing traditional ifdefs preambule - it can be included & parsed multiple times. Normally compiler is fine when defines have same value and there is no warning - yet we don't need to parse this several times and by adding -include directive we can ensure every file in the package is rightly compile with configure.h as the first header file.
* lvmdbusd: Handle exported VG(s)Tony Asleson2018-12-202-2/+6
| | | | | | | When a VG is exported, the 'fullreport' returns an exit code of 5, but otherwise returns the data we are wanting. Signed-off-by: Tony Asleson <tasleson@redhat.com>
* lvmdbusd: Exit daemon when unable to retrieve stateTony Asleson2018-12-202-1/+28
| | | | | | | | | In some cases we get stuck where we are unable to retrieve the current state of lvm as we are encountering an error. When the error is persistent we will log and exit the daemon instead of consuming vast amounts of resources. Signed-off-by: Tony Asleson <tasleson@redhat.com>
* dmeventd: resolve compilation of vdo status parsingZdenek Kabelac2018-12-201-1/+3
| | | | | | | | | | | | | A bit of chicken & egg problem - dmeventd needs to use old libdm library. VDO is only part of new device_mapper internal library. So include directly source file for parsing status - this fixes usability problem of VDO plugin introduced with previous Makefile reshaping patchset. NOTE: source file needs to be keep then compilable in both environments. Also add missing copyright header.
* lvmlockd: Fix arguments when built without sanlockMarian Csontos2018-12-181-2/+2
| | | | (cherry picked from commit 24254ca86671ae49431e67788c039603fe4b79fb)
* makefiles: sortZdenek Kabelac2018-12-171-3/+3
|
* cmirror: link with libdmZdenek Kabelac2018-12-172-4/+4
| | | | | | | Since there is very little change there will be any new devel going to happing with cmirror - avoid eating extra disk space and link with already installed libdm which implements all use basic function of dm list
* dmeventd: do not link internal libraries to pluginsZdenek Kabelac2018-12-176-12/+6
| | | | | Avoid linking internal device-mapper and link dynamically libdevmapper. This considerably reduced size of installed binaries.
* dmeventd: fix linking with libdevmapperZdenek Kabelac2018-12-144-13/+13
| | | | | | | | | | | | | | | | | | Since dmeventd is 'libdm' based project, it needs to link libdm library instead of its internal version An external users may provide plugins loadeable by dmeventd. So external user of libdevmapper-event library has no other option then to link with released libdevmapper library. The complexity comes with lvm2 plugins. The lvm2 plugin itself uses internal version of device_mapper, but libdevmapper-event usage is libdm based - so there needs to be avoided any breakage on compatibility of internal i.e. dm_task_run structures. TODO: most likely dmeventd itself should be moved into libdm/dm-tools dir, and only lvm2 plugins should be created as part of lvm project, but those still need to link with libdevmapper.
* lvmdbusd: Update table lookup for state lv_attrTony Asleson2018-12-141-2/+8
|
* lvmdbusd: Update table lookup for health lv_attrTony Asleson2018-12-141-3/+11
|
* lvmdbusd: Handle missing lv_attr table lookupsTony Asleson2018-12-141-11/+24
| | | | | | | | If we don't know the meaning we will return the key with default text instead of raising an exception and taking the daemon out in the process. Resolves: rhbz1657950
* lvmdbusd: Dump blackbox newest firstTony Asleson2018-12-141-1/+1
| | | | | | When we get bug reports we may not get the entire log, so lets dump the fight recorder from newest to oldest as the one we are interested in was likely to be the last command run.
* headers: use full path header instead of -I directiveZdenek Kabelac2018-12-1410-11/+6
| | | | | Replace Makefile -I with full path to headers like we use now everywhere else.