Bug 1410768
Summary: | Convert dmeventd thin plugin event reaction code to configurable internal or external command. | |||
---|---|---|---|---|
Product: | [Community] LVM and device-mapper | Reporter: | Zdenek Kabelac <zkabelac> | |
Component: | lvm2 | Assignee: | Zdenek Kabelac <zkabelac> | |
lvm2 sub component: | dmeventd | QA Contact: | cluster-qe <cluster-qe> | |
Status: | CLOSED CURRENTRELEASE | Docs Contact: | ||
Severity: | unspecified | |||
Priority: | unspecified | CC: | agk, heinzm, jbrassow, msnitzer, prajnoha, thornber, zkabelac | |
Version: | 2.02.169 | Flags: | rule-engine:
lvm-technical-solution?
rule-engine: lvm-test-coverage? |
|
Target Milestone: | --- | |||
Target Release: | --- | |||
Hardware: | Unspecified | |||
OS: | Unspecified | |||
Whiteboard: | ||||
Fixed In Version: | 2.02.169 | Doc Type: | If docs needed, set a value | |
Doc Text: | Story Points: | --- | ||
Clone Of: | ||||
: | 1442992 (view as bug list) | Environment: | ||
Last Closed: | 2017-05-10 22:43:45 UTC | Type: | Bug | |
Regression: | --- | Mount Type: | --- | |
Documentation: | --- | CRM: | ||
Verified Versions: | Category: | --- | ||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | ||
Cloudforms Team: | --- | Target Upstream Version: | ||
Embargoed: | ||||
Bug Depends On: | ||||
Bug Blocks: | 1370490, 1442992 |
Description
Zdenek Kabelac
2017-01-06 12:11:29 UTC
Maybe we go with 'more' generic logic: thin_pool_fail_autoextend_threshold = XXX thin_pool_fail_autoextend_command = [ ""..... ] which will call some preconfigured 'command' when configured 'threshold' passed with the last passed argument being thin-pool vgname/lvname (or maybe user can use user %thinpool in arglist....) Add more.... It seems we should try to let whole 'command' for extend to be fully configure - so i.e. plugin for thin-pool dmeventd gets this new field: dmeventd { thin_pool_command = [ ] } Defaulting to existing 'lvextend --use-policies....' (with dropped umount at dmeventd plugin part) This let user to gain full configuration for any percentage value of thin-pool from range of 50%, 55,...100% and appropriate reaction. Otherwise we would facing non-trivial troubles to solve with VG locking. This way user may plug-in just place-in any shell script and do query and change VG or any LV as need - even far before failure (i.e. dropping some unneeded thin LVs at some 'fullness' level. In general we would support much wider range or policies. The 'easiest' looks like passing in command with new API functions: dm_event_handler_set_command dm_event_handler_get_command We may also convert other plugins (mirror, raid, snapshot...) So the API of dmeventd is not good for this, it's not extensible unless major rework would be made. So the new plan is to introduce 'smarter' command - plugin will use this command which then according to lvm.conf will run the configured action (i.e. old lvextend or some new script...) So this is now resolved upstream and the behavior is documented in 'dmeventd' man page for thin plugin which needs to be checked for full description. We have either internal or external command lvm <- internal command (which no longer umounts volumes on error) /fullpath <- external command In the future we may add systemd service usage for this to avoid dmeventd forking. |