Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Linux-HA: Dev

[PATCH 2/2] Medium: LVM: force dmevent monitoring for clones

 

 

Linux-HA dev RSS feed   Index | Next | Previous | View Threaded


florian at hastexo

Nov 25, 2011, 9:38 AM

Post #1 of 4 (506 views)
Permalink
[PATCH 2/2] Medium: LVM: force dmevent monitoring for clones

Starting a clustered volume with monitoring disabled is not allowed:

http://www.redhat.com/archives/lvm-devel/2010-March/msg00289.html

Which would be fine, as activation/monitoring = 1 ships as the default
in lvm.conf. However, at least some versions of LVM seem to ignore this,
throwing an error on vgchange unless "--monitor y" is explicitly set
on the command line:

https://bugs.launchpad.net/ubuntu/+source/lvm2/+bug/833368

Thus, for cloned instances, always invoke vgchange with "--monitor y".

Thanks to Nils Meyer <nils [at] nm> for pointing out this issue.
---
heartbeat/LVM | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/heartbeat/LVM b/heartbeat/LVM
index d8ad3ca..05eefe7 100755
--- a/heartbeat/LVM
+++ b/heartbeat/LVM
@@ -224,6 +224,12 @@ LVM_start() {
vgchange_options="$vgchange_options --partial"
fi

+ # for clones (clustered volume groups), we'll also have to force
+ # monitoring, even if disabled in lvm.conf.
+ if ocf_is_clone; then
+ vgchange_options="$vgchange_options --monitor y"
+ fi
+
ocf_run vgchange $vgchange_options $1 || return $OCF_ERR_GENERIC

if LVM_status $1; then
--
1.7.5.4

_______________________________________________________
Linux-HA-Dev: Linux-HA-Dev [at] lists
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/


lmb at suse

Nov 26, 2011, 2:58 AM

Post #2 of 4 (468 views)
Permalink
Re: [PATCH 2/2] Medium: LVM: force dmevent monitoring for clones [In reply to]

On 2011-11-25T18:38:06, Florian Haas <florian [at] hastexo> wrote:

> Starting a clustered volume with monitoring disabled is not allowed:
>
> http://www.redhat.com/archives/lvm-devel/2010-March/msg00289.html
>
> Which would be fine, as activation/monitoring = 1 ships as the default
> in lvm.conf. However, at least some versions of LVM seem to ignore this,
> throwing an error on vgchange unless "--monitor y" is explicitly set
> on the command line:
>
> https://bugs.launchpad.net/ubuntu/+source/lvm2/+bug/833368
>
> Thus, for cloned instances, always invoke vgchange with "--monitor y".
>
> Thanks to Nils Meyer <nils [at] nm> for pointing out this issue.
> ---
> heartbeat/LVM | 6 ++++++
> 1 files changed, 6 insertions(+), 0 deletions(-)

Seems to make sense. of course, an alternative would be to add a
"Conflicts: lvm2 < x.y.z" to the package on the respective versions to
make sure it's only installed with a fixed lvm2 package ...?


Regards,
Lars

--
Architect Storage/HA
SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 21284 (AG Nürnberg)
"Experience is the name everyone gives to their mistakes." -- Oscar Wilde

_______________________________________________________
Linux-HA-Dev: Linux-HA-Dev [at] lists
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/


florian at hastexo

Nov 28, 2011, 12:14 PM

Post #3 of 4 (457 views)
Permalink
Re: [PATCH 2/2] Medium: LVM: force dmevent monitoring for clones [In reply to]

On Sat, Nov 26, 2011 at 11:58 AM, Lars Marowsky-Bree <lmb [at] suse> wrote:
> On 2011-11-25T18:38:06, Florian Haas <florian [at] hastexo> wrote:
>
>> Starting a clustered volume with monitoring disabled is not allowed:
>>
>> http://www.redhat.com/archives/lvm-devel/2010-March/msg00289.html
>>
>> Which would be fine, as activation/monitoring = 1 ships as the default
>> in lvm.conf. However, at least some versions of LVM seem to ignore this,
>> throwing an error on vgchange unless "--monitor y" is explicitly set
>> on the command line:
>>
>> https://bugs.launchpad.net/ubuntu/+source/lvm2/+bug/833368
>>
>> Thus, for cloned instances, always invoke vgchange with "--monitor y".
>>
>> Thanks to Nils Meyer <nils [at] nm> for pointing out this issue.
>> ---
>>  heartbeat/LVM |    6 ++++++
>>  1 files changed, 6 insertions(+), 0 deletions(-)
>
> Seems to make sense. of course, an alternative would be to add a
> "Conflicts: lvm2 < x.y.z" to the package on the respective versions to
> make sure it's only installed with a fixed lvm2 package ...?

Surely you're joking. resource-agents does not enforce any packaging
dependencies for the stuff it's capable of managing, so why throw in a
random conflict here?

Of course, we probably wouldn't have this version issue if the LVM RA
was packaged with LVM, but someone shot down that suggestion. Who was
that, I wonder? I'm thinking, I'm thinking... nevermind, it'll come to
me.

Cheers,
Florian
_______________________________________________________
Linux-HA-Dev: Linux-HA-Dev [at] lists
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/


lmb at suse

Nov 30, 2011, 4:21 PM

Post #4 of 4 (449 views)
Permalink
Re: [PATCH 2/2] Medium: LVM: force dmevent monitoring for clones [In reply to]

On 2011-11-28T21:14:22, Florian Haas <florian [at] hastexo> wrote:

> > Seems to make sense. of course, an alternative would be to add a
> > "Conflicts: lvm2 < x.y.z" to the package on the respective versions to
> > make sure it's only installed with a fixed lvm2 package ...?
> Surely you're joking. resource-agents does not enforce any packaging
> dependencies for the stuff it's capable of managing, so why throw in a
> random conflict here?

It makes sense to conflict with versions that are so old that they are
no longer supported or have known bugs. Note that that is different from
requiring a specific version to be installed.

Alternatively, the respective RA could do such a check itself. But a
work-around (like implemented here) is fine by me too.

> Of course, we probably wouldn't have this version issue if the LVM RA
> was packaged with LVM,

That wouldn't really solve it; it'd still require users to update the
LVM package, or to patch that accordingly if they can't update the main
aspects.

> but someone shot down that suggestion. Who was that, I wonder? I'm
> thinking, I'm thinking... nevermind, it'll come to me.

Maybe then you'll also find a way of not being passive-aggressive? ;-)


Regards,
Lars

--
Architect Storage/HA
SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 21284 (AG Nürnberg)
"Experience is the name everyone gives to their mistakes." -- Oscar Wilde

_______________________________________________________
Linux-HA-Dev: Linux-HA-Dev [at] lists
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/

Linux-HA dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.