Bug 2086889
Summary: | The resource-agent "lvmlockd" returns success in setup_lvm_config(), even if use_lvmlockd was not changed to 1. | |||
---|---|---|---|---|
Product: | Red Hat Enterprise Linux 8 | Reporter: | Shane Bradley <sbradley> | |
Component: | resource-agents | Assignee: | Oyvind Albrigtsen <oalbrigt> | |
Status: | CLOSED ERRATA | QA Contact: | cluster-qe <cluster-qe> | |
Severity: | unspecified | Docs Contact: | ||
Priority: | unspecified | |||
Version: | 8.6 | CC: | agk, cluster-maint, dwojewod, fdinitto, heming.zhao, mjuricek, nwahl, phagara, sbradley, teigland | |
Target Milestone: | rc | |||
Target Release: | 8.7 | |||
Hardware: | Unspecified | |||
OS: | Unspecified | |||
Whiteboard: | ||||
Fixed In Version: | resource-agents-4.9.0-20.el8 | Doc Type: | If docs needed, set a value | |
Doc Text: | Story Points: | --- | ||
Clone Of: | ||||
: | 2094828 (view as bug list) | Environment: | ||
Last Closed: | 2022-11-08 09:09:06 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: | 2094828 |
Description
Shane Bradley
2022-05-16 18:26:56 UTC
> I think the best approach would be to open another bug for "lvm2" that will do the following: > • Add option for lvmconfig to enable "use_lvmlockd": lvmconfig --enable_lvmlockd. AFAIK lvmconfig is a read-only command. In RHEL 7, there was a command called lvmconf whose job was to modify the lvm.conf file. For some reason this was removed in RHEL 8. > * Add ability somehow (unless already exists) for lvmconfig to be able to determine the value of "global/use_lvmlockd" when option is enabled, disable, comment out, or does not exist (the later two is ones I could not find a way to do). If I understand you correctly, we basically have this ability: if the `lvmconfig` output doesn't contain `use_lvmlockd`, then that means it's set to the default value. We don't know if it's commented out or just doesn't exist. It may not be worth the effort (and possibly resulting brittleness) of adding an "is it commented out" check; we can just add a new line if it's either commented or missing. The simplest approach IMO would be: - Update the value in-place if it's there or if it passes a SIMPLE commented-out check (e.g., a regex like /[[:blank:]]*#[[:blank:]]*use_lvmlockd[[:blank:]]*=/). If it's commented out, then either remove the '#' character or put the new line directly underneath. - If we can't find the value, add a new `use_lvmlockd = 1` line directly under the `global {` line. Or if that's too much of a pain, just add a second `global {}` section at the bottom of /etc/lvm/lvm.conf: ``` global { use_lvmlockd = 1 } ``` (In reply to Shane Bradley from comment #1) > "This worked in previous versions, because the /etc/lvm/lvm.conf file had > an uncommented value for use_lvmlockd set to the default value of 0 > However, that looks to have been changed in this commit last year: > https://github.com/lvmteam/lvm2/commit/ > ca38251b1043c49f5453c2c571876b12aad6b450 > where all values that were set to the default were commented out" That change should only have gone into 9.0 IMO. I'd guess there will be more issues like this. > The issue the customer states they are hitting is that on RHEL 8.5 or later > that when the /etc/lvm/lvm.conf > is created, it no longer contains the uncommented option using default value: > use_lvmlockd = 0 > > Instead on RHEL 8.5 or later, the created /etc/lvm/lvm.conf will comment out > any options that are using > default values (at least they are saying it does for use_lvmlockd). > # use_lvmlockd = 0 Fixing setup_lvm_config like in comment 4 (to not assume specific lvm.conf contents) seems like the right solution. Letting lvmconfig edit lvm.conf has been an obvious missing feature for many years, but nobody has taken it up. Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (resource-agents bug fix and enhancement update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2022:7443 Hello all, sorry for waking up this bug. I prefer the solution in comment 4 & 6. But comment 8 (lvmlockd RA commit: b3885f7d95fe3) method directly returns error when cmd "$(lvmconfig 'global/use_lvmlockd' 2> /dev/null)" return empty. under this change, RA can't change commented-out use_lvmlockd automatically. It makes very bad customer experience. Do we have any plan to create a new patch for comment 4 idea? (In reply to heming.zhao from comment #15) > Hello all, sorry for waking up this bug. > > I prefer the solution in comment 4 & 6. > But comment 8 (lvmlockd RA commit: b3885f7d95fe3) method directly returns > error when cmd "$(lvmconfig 'global/use_lvmlockd' 2> /dev/null)" return > empty. > under this change, RA can't change commented-out use_lvmlockd automatically. > It makes very bad customer experience. > > Do we have any plan to create a new patch for comment 4 idea? I've made a patch, and will push it when CI maintenance is done (should be sometime tomorrow or friday). very good news, thank you. |