[ClusterLabs] Antw: [EXT] Final Pacemaker 2.0.5 release now available

2020-12-02 Thread Ulrich Windl
>>> Christopher Lumens  schrieb am 02.12.2020 um 19:14 in
Nachricht <851583983.28225008.1606932881629.javamail.zim...@redhat.com>:
> Hi all,
> 
> The final release of Pacemaker version 2.0.5 is now available at:
[...]
> 
> * crm_mon additionally supports a --resource= option for resource-based
>   filtering, similar to the --node= option introduced in a previous release.

Another nice extension based on this would be a nagios-compatible output and 
exit code. I imagine:
OK if the resource is running (or is in its desired state)
WARNING if the resource is starting or stopping
CRITICAL if the resource is stopped (or not in ist desired state)
UNKNOWN if the status cannot be queried or the resource is not known.

Of cource: Likewise for the nodes

clones and master/slave probably would need some special care.

Opinions on that?

Regards,
Ulrich


___
Manage your subscription:
https://lists.clusterlabs.org/mailman/listinfo/users

ClusterLabs home: https://www.clusterlabs.org/


Re: [ClusterLabs] Question on restart of resource during fail over

2020-12-02 Thread Harishkumar Pathangay
Hi Guy,
DB2 is not configured for auto start. So that is ruled out. I had some errors 
in shell script. Just solved that issue and things are ok now.

Hi Reid,
I am like extremely new to pacemaker. I do not even know that ordered resource 
group is implicitly a constraint like behaviour.
So I have to delete the constraint as per your suggestion. Also, I want the 
order in a different way.
Like
First halvmd then clxfs then db2inst then clusterip.
Which is correct order of expectation.
I will correct and resend the files.
Please let me know if it is okay.

Thanks.
Harish P

Get Outlook for Android


From: Users  on behalf of Reid Wahl 

Sent: Thursday, December 3, 2020 6:49:43 AM
To: Cluster Labs - All topics related to open-source clustering welcomed 

Subject: Re: [ClusterLabs] Question on restart of resource during fail over

How did you resolve the issue? I see a problem in the CIB, and it may
be related to the issue you encountered. Even if not, it may cause
other issues later.

You have the following resource group:

  








  

You have the following colocation constraint set:

  

  
  
  
  

  

The group says "place ClusterIP, then place halvmd, then place clxfs,
then place db2inst".
The constraint set says "place db2inst, then place halvmd, then place
clxfs, then place ClusterIP"[1].

A resource group is already an implicit set of ordering and colocation
constraints[2]. If you're happy with the order configured in the
resource group, then you should remove the colocation_set_dthdcs
constraint.

[1] Example 5.15. Equivalent colocation chain expressed using
resource_set 
(https://clusterlabs.org/pacemaker/doc/en-US/Pacemaker/2.0/html-single/Pacemaker_Explained/index.html#idm46061107170640)
[2] ⁠10.1. Groups - A Syntactic Shortcut
(https://clusterlabs.org/pacemaker/doc/en-US/Pacemaker/2.0/html-single/Pacemaker_Explained/index.html#group-resources)

On Wed, Dec 2, 2020 at 4:01 AM Harishkumar Pathangay
 wrote:
>
> Hi,
>
> I realized it can be used in standard mode only after you pointing to that.
>
> Anyways, writing custom agent always gives me a good understanding of the 
> resources start/stop/monitor etc…
>
> My custom agent still has lot of “hard coded” values, but it is meant for 
> studying and understanding purposes rather than to put in a production 
> machine.
>
>
>
> Please find attachments.
>
>
>
> Thanks,
>
> Harish P
>
>
>
> Sent from Mail for Windows 10
>
>
>
> From: Reid Wahl
> Sent: 02 December 2020 15:55
> To: Cluster Labs - All topics related to open-source clustering welcomed
> Subject: Re: [ClusterLabs] Question on restart of resource during fail over
>
>
>
> On Wed, Dec 2, 2020 at 2:16 AM Harishkumar Pathangay
>  wrote:
> >
> > Just got the issue resolved.
>
> Nice work!
>
> > Any case I will send the cib.xml and my custom db2 resource agent.
> >
> > The existing resource agent is for HADR database, where there are two 
> > databases one running as Primary and other as standby.
>
> HADR is only one option. There's also a standard mode:
>   - 
> https://github.com/oalbrigt/resource-agents/blob/master/heartbeat/db2#L64-L69
>
> I don't know much about DB2, so I'm not sure whether that would meet
> your needs. Based on the metadata, standard mode appears to manage a
> single instance (with the databases you select) on one node at a time.
>
> > I have created a script which will start/stop db2 instances with a single 
> > database on shared logical volume [HA-LVM] exclusively activated on one 
> > node.
> >
> >
> >
> > Will mail you shortly.
> >
> >
> >
> > Thanks,
> >
> > Harish P
> >
> >
> >
> > Sent from Mail for Windows 10
> >
> >
> >
> > From: Reid Wahl
> > Sent: 02 December 2020 12:46
> > To: Cluster Labs - All topics related to open-source clustering welcomed
> > Subject: Re: [ClusterLabs] Question on restart of resource during fail over
> >
> >
> >
> > Can you share your pacemaker configuration (i.e.,
> > /var/lib/pacemaker/cib/cib.xml)? If you're concerned about quorum,
> > then also share your /etc/corosync/corosync.conf just in case.
> >
> > Also there's a db2 resource agent already written, if you're interested:
> > - https://github.com/oalbrigt/resource-agents/blob/master/heartbeat/db2
> >
> > On Tue, Dec 1, 2020 at 9:50 AM Harishkumar Pathangay
> >  wrote:
> > >
> > > Hi,
> > >
> > > I have DB2 resource agent scripted by myself.
> > >
> > > It is working fine with a small glitch.
> > >
> > >
> > >
> > > I have node1 and node2 in the cluster. No stonith enabled as I don't need 
> > > one. The environment is for learning purpose only.
> > >
> > >
> > >
> > > If node one is down [power off], it is starting the resource on other 
> > > node which is good. My custom resource agent doing its job. Let us say 
> > > DB2 is running with pid 4567.
> > >
> > >
> > >
> > > Now, the original node 

Re: [ClusterLabs] Preferred node for a service (not constrained)

2020-12-02 Thread Strahil Nikolov
Constraints' values are varying from:
infinity which equals to score of 100
to:
- infinity which equals to score of -100

You can usually set a positive score on the prefered node which is bigger than 
on the other node.

For example setting a location constraint like this will prefer node1:
node1 - score 1
node2 - score 5000

In order to prevent unnecessary downtime , you should also consider setting 
stickiness.

For example a stickiness of 2 will overwhelm the score of 1 on the 
recently recovered node1 and will prevent the resource of being stopped and 
relocated from node2 to node1 .

Note: default stickiness is per resource , while the total stickiness score of 
a group is calculated based on the scores of all resources in it.

Best Regards,
Strahil Nikolov





В сряда, 2 декември 2020 г., 16:54:43 Гринуич+2, Dan Swartzendruber 
 написа: 





On 2020-11-30 23:21, Petr Bena wrote:
> Hello,
> 
> Is there a way to setup a preferred node for a service? I know how to
> create constrain that will make it possible to run a service ONLY on
> certain node, or constrain that will make it impossible to run 2
> services on same node, but I don't want any of that, as in
> catastrophical scenarios when services would have to be located 
> together
> on same node, this would instead disable it.
> 
> Essentially what I want is for service to be always started on 
> preferred
> node when it is possible, but if it's not possible (eg. node is down) 
> it
> would freely run on any other node, with no restrictions and when node
> is back up, it would migrate back.
> 
> How can I do that?

I do precisely this for an active/passive NFS/ZFS storage appliance 
pair.
One of the VSA has more memory and is less used, so I have it set to 
prefer
that host.

https://clusterlabs.org/pacemaker/doc/en-US/Pacemaker/1.1/html/Clusters_from_Scratch/_prefer_one_node_over_another.html

I believe I used the value infinity, so it will prefer the 2nd host over 
the 1st if at all possible.  My 'pcs constraint':

[root@centos-vsa2 ~]# pcs constraint
Location Constraints:
  Resource: group-zfs
    Enabled on: centos-vsa2 (score:INFINITY)
Ordering Constraints:
Colocation Constraints:
Ticket Constraints:

___
Manage your subscription:
https://lists.clusterlabs.org/mailman/listinfo/users

ClusterLabs home: https://www.clusterlabs.org/
___
Manage your subscription:
https://lists.clusterlabs.org/mailman/listinfo/users

ClusterLabs home: https://www.clusterlabs.org/


Re: [ClusterLabs] Question on restart of resource during fail over

2020-12-02 Thread Reid Wahl
How did you resolve the issue? I see a problem in the CIB, and it may
be related to the issue you encountered. Even if not, it may cause
other issues later.

You have the following resource group:

  








  

You have the following colocation constraint set:

  

  
  
  
  

  

The group says "place ClusterIP, then place halvmd, then place clxfs,
then place db2inst".
The constraint set says "place db2inst, then place halvmd, then place
clxfs, then place ClusterIP"[1].

A resource group is already an implicit set of ordering and colocation
constraints[2]. If you're happy with the order configured in the
resource group, then you should remove the colocation_set_dthdcs
constraint.

[1] Example 5.15. Equivalent colocation chain expressed using
resource_set 
(https://clusterlabs.org/pacemaker/doc/en-US/Pacemaker/2.0/html-single/Pacemaker_Explained/index.html#idm46061107170640)
[2] ⁠10.1. Groups - A Syntactic Shortcut
(https://clusterlabs.org/pacemaker/doc/en-US/Pacemaker/2.0/html-single/Pacemaker_Explained/index.html#group-resources)

On Wed, Dec 2, 2020 at 4:01 AM Harishkumar Pathangay
 wrote:
>
> Hi,
>
> I realized it can be used in standard mode only after you pointing to that.
>
> Anyways, writing custom agent always gives me a good understanding of the 
> resources start/stop/monitor etc…
>
> My custom agent still has lot of “hard coded” values, but it is meant for 
> studying and understanding purposes rather than to put in a production 
> machine.
>
>
>
> Please find attachments.
>
>
>
> Thanks,
>
> Harish P
>
>
>
> Sent from Mail for Windows 10
>
>
>
> From: Reid Wahl
> Sent: 02 December 2020 15:55
> To: Cluster Labs - All topics related to open-source clustering welcomed
> Subject: Re: [ClusterLabs] Question on restart of resource during fail over
>
>
>
> On Wed, Dec 2, 2020 at 2:16 AM Harishkumar Pathangay
>  wrote:
> >
> > Just got the issue resolved.
>
> Nice work!
>
> > Any case I will send the cib.xml and my custom db2 resource agent.
> >
> > The existing resource agent is for HADR database, where there are two 
> > databases one running as Primary and other as standby.
>
> HADR is only one option. There's also a standard mode:
>   - 
> https://github.com/oalbrigt/resource-agents/blob/master/heartbeat/db2#L64-L69
>
> I don't know much about DB2, so I'm not sure whether that would meet
> your needs. Based on the metadata, standard mode appears to manage a
> single instance (with the databases you select) on one node at a time.
>
> > I have created a script which will start/stop db2 instances with a single 
> > database on shared logical volume [HA-LVM] exclusively activated on one 
> > node.
> >
> >
> >
> > Will mail you shortly.
> >
> >
> >
> > Thanks,
> >
> > Harish P
> >
> >
> >
> > Sent from Mail for Windows 10
> >
> >
> >
> > From: Reid Wahl
> > Sent: 02 December 2020 12:46
> > To: Cluster Labs - All topics related to open-source clustering welcomed
> > Subject: Re: [ClusterLabs] Question on restart of resource during fail over
> >
> >
> >
> > Can you share your pacemaker configuration (i.e.,
> > /var/lib/pacemaker/cib/cib.xml)? If you're concerned about quorum,
> > then also share your /etc/corosync/corosync.conf just in case.
> >
> > Also there's a db2 resource agent already written, if you're interested:
> > - https://github.com/oalbrigt/resource-agents/blob/master/heartbeat/db2
> >
> > On Tue, Dec 1, 2020 at 9:50 AM Harishkumar Pathangay
> >  wrote:
> > >
> > > Hi,
> > >
> > > I have DB2 resource agent scripted by myself.
> > >
> > > It is working fine with a small glitch.
> > >
> > >
> > >
> > > I have node1 and node2 in the cluster. No stonith enabled as I don't need 
> > > one. The environment is for learning purpose only.
> > >
> > >
> > >
> > > If node one is down [power off], it is starting the resource on other 
> > > node which is good. My custom resource agent doing its job. Let us say 
> > > DB2 is running with pid 4567.
> > >
> > >
> > >
> > > Now, the original node which went down is back again.  I issue “pcs 
> > > cluster start” on the node. Node is online. The resource also stays in 
> > > the other node, which is again good. That way unnecessary movement of 
> > > resources is avoided, exactly what I want. Good but there is a issue.
> > >
> > > On the other node it is restarting the DB2 resource. So my pid of db2 
> > > changes to 3452.
> > >
> > > This is unnecessary restart of resource which I want to avoid.
> > >
> > > How to I get this working.
> > >
> > >
> > >
> > > I am very new to cluster pacemaker.
> > >
> > > Please help me so that I can create a working DB2 cluster for my learning 
> > > purpose.
> > >
> > > Also I will be blogging in my youtube channel DB2LUWACADEMY.
> > >
> > > Please any help is of great significance to me.
> > >
> > >
> > >
> > > I think it could be quorum issue. But don't know for sure, because there 
> > > 

Re: [ClusterLabs] Question on restart of resource during fail over

2020-12-02 Thread Guy Przytula
if node is restarted, db2 is coming up, probably by autostart

that is what you want to keep the standby in sync ?

you can turn the node offline if maintenance is needed..

On Tue, 1 Dec 2020 at 18:51, Harishkumar Pathangay <
harishpathan...@outlook.com> wrote:

> Hi,
>
> I have DB2 resource agent scripted by myself.
>
> It is working fine with a small glitch.
>
>
>
> I have node1 and node2 in the cluster. No stonith enabled as I don't need
> one. The environment is for learning purpose only.
>
>
>
> If node one is down [power off], it is starting the resource on other node
> which is good. My custom resource agent doing its job. Let us say DB2 is
> running with pid 4567.
>
>
>
> Now, the original node which went down is back again.  I issue “pcs
> cluster start” on the node. Node is online. The resource also stays in the
> other node, which is again good. That way unnecessary movement of resources
> is avoided, exactly what I want. Good but there is a issue.
>
> On the other node it is restarting the DB2 resource. So my pid of db2
> changes to 3452.
>
> This is unnecessary restart of resource which I want to avoid.
>
> How to I get this working.
>
>
>
> I am very new to cluster pacemaker.
>
> Please help me so that I can create a working DB2 cluster for my learning
> purpose.
>
> Also I will be blogging in my youtube channel DB2LUWACADEMY.
>
> Please any help is of great significance to me.
>
>
>
> I think it could be quorum issue. But don't know for sure, because there
> is only two nodes and DB2 resource needs to be active only in one node.
>
>
>
> How do I get this configured.
>
>
>
> Thanks.
>
> Harish P
>
>
>
>
>
> Sent from Mail  for
> Windows 10
>
>
> ___
> Manage your subscription:
> https://lists.clusterlabs.org/mailman/listinfo/users
>
> ClusterLabs home: https://www.clusterlabs.org/
>


-- 
Best Regards , Guy Przytula

Tel : +32 475 33 8186
mail : przytula@gmail.com
___
Manage your subscription:
https://lists.clusterlabs.org/mailman/listinfo/users

ClusterLabs home: https://www.clusterlabs.org/


[ClusterLabs] sbd v1.4.2

2020-12-02 Thread Klaus Wenninger
Hi sbd - developers & users!

Thanks to everybody for contributing to tests and
further development.

Improvements in build/CI-friendlyness and
added robustness against misconfiguration
justify labeling the repo v1.4.2.

I tried to quickly summarize the changes in the
repo since it was labeled v1.4.1:

- improve build/CI-friendlyness

  * travis: switch to F32 as build-host
switch to F32 & leap-15.2
changes for mock-2.0
turn off loop-devices & device-mapper on x86_64 targets because
of changes in GCE
  * regressions.sh: get timeouts from disk-header to go with proper defaults
for architecture
  * use configure for watchdog-default-timeout & others
  * ship sbd.pc with basic sbd build information for downstream packages
to use
  * add number of commits since version-tag to build-counter

- add robustness against misconfiguration / improve documentation

  * add environment section to man-page previously just available in
template-config
  * inform the user to restart the sbd service after disk-initialization
  * refuse to start if any of the configured device names is invalid
  * add handshake to sync startup/shutdown with pacemakerd
Previously sbd just waited for the cib-connnection to show up/go away
which isn't robust at all.
The new feature needs new pacemakerd-api as counterpart.
Thus build checks for presence of pacemakerd-api.
To simplify downstream adoption behavior is configurable at runtime
via configure-file with a build-time-configurable default.
  * refuse to start if qdevice-sync_timeout doesn't match watchdog-timeout
Needed in particular as qdevice-sync_timeout delays quorum-state-update
and has a default of 30s that doesn't match the 5s watchdog-timeout
default.

- Fix: sbd-pacemaker: handle new no_quorum_demote + robustness against new
  policies added
- Fix: agent: correctly compare string values when calculating timeout
- Fix: scheduling: overhaul the whole thing
  * prevent possible lockup when format in proc changes
  * properly get and handle scheduler policy & prio
  * on SCHED_RR failing push to the max with SCHED_OTHER

Regards,
Klaus

___
Manage your subscription:
https://lists.clusterlabs.org/mailman/listinfo/users

ClusterLabs home: https://www.clusterlabs.org/


[ClusterLabs] Final Pacemaker 2.0.5 release now available

2020-12-02 Thread Christopher Lumens
Hi all,

The final release of Pacemaker version 2.0.5 is now available at:

https://github.com/ClusterLabs/pacemaker/releases/tag/Pacemaker-2.0.5

Highlights include:

* A fix for the ACL bypassing bug previously mentioned on this mailing
  list and described in CVE-2020-25654.

* The CIB now supports both number and integer types on rule elements,
  allowing support for floats and 64-bit integers.  This brings the CIB
  in line with long-standing documentation of integer support.

* Better integration with SBD around pacemaker startup and shutdown.

* New rsc_expression and op_expression rules can be used to set defaults
  on either a single resource or on a block of resources,  Refer to
  Pacemaker Explained for details.

* New "demote" policy for on-fail and no-quorum-policy.

* crm_mon additionally supports a --resource= option for resource-based
  filtering, similar to the --node= option introduced in a previous release.

As usual, there were bug fixes and log message improvements as well.
Several regressions from past releases were also fixed.  crm_mon
includes node names in bundle output again.  stonith_admin --list-targets
has been fixed.  HTTP headers have been added back to crm_mon's daemon
mode.  pre- and post-start notifications are properly required again.

For more details about changes in this release, see:

https://github.com/ClusterLabs/pacemaker/blob/2.0/ChangeLog

Many thanks to all contributors of source code to this release,
including Christine Caulfield, Ferenc Wágner, Gao,Yan, Hideo Yamauchi,
Jan Pokorný, Kazunori INOUE, Ken Gaillot, Klaus Wenninger, Liao Pingfang,
Oyvind Albrigtsen, Reid Wahl, and sanjaymsh.

- Chris Lumens

___
Manage your subscription:
https://lists.clusterlabs.org/mailman/listinfo/users

ClusterLabs home: https://www.clusterlabs.org/


Re: [ClusterLabs] Preferred node for a service (not constrained)

2020-12-02 Thread Dan Swartzendruber

On 2020-11-30 23:21, Petr Bena wrote:

Hello,

Is there a way to setup a preferred node for a service? I know how to
create constrain that will make it possible to run a service ONLY on
certain node, or constrain that will make it impossible to run 2
services on same node, but I don't want any of that, as in
catastrophical scenarios when services would have to be located 
together

on same node, this would instead disable it.

Essentially what I want is for service to be always started on 
preferred
node when it is possible, but if it's not possible (eg. node is down) 
it

would freely run on any other node, with no restrictions and when node
is back up, it would migrate back.

How can I do that?


I do precisely this for an active/passive NFS/ZFS storage appliance 
pair.
One of the VSA has more memory and is less used, so I have it set to 
prefer

that host.

https://clusterlabs.org/pacemaker/doc/en-US/Pacemaker/1.1/html/Clusters_from_Scratch/_prefer_one_node_over_another.html

I believe I used the value infinity, so it will prefer the 2nd host over 
the 1st if at all possible.  My 'pcs constraint':


[root@centos-vsa2 ~]# pcs constraint
Location Constraints:
  Resource: group-zfs
Enabled on: centos-vsa2 (score:INFINITY)
Ordering Constraints:
Colocation Constraints:
Ticket Constraints:
___
Manage your subscription:
https://lists.clusterlabs.org/mailman/listinfo/users

ClusterLabs home: https://www.clusterlabs.org/


[ClusterLabs] Preferred node for a service (not constrained)

2020-12-02 Thread Petr Bena
Hello,

Is there a way to setup a preferred node for a service? I know how to
create constrain that will make it possible to run a service ONLY on
certain node, or constrain that will make it impossible to run 2
services on same node, but I don't want any of that, as in
catastrophical scenarios when services would have to be located together
on same node, this would instead disable it.

Essentially what I want is for service to be always started on preferred
node when it is possible, but if it's not possible (eg. node is down) it
would freely run on any other node, with no restrictions and when node
is back up, it would migrate back.

How can I do that?

___
Manage your subscription:
https://lists.clusterlabs.org/mailman/listinfo/users

ClusterLabs home: https://www.clusterlabs.org/


Re: [ClusterLabs] Question on restart of resource during fail over

2020-12-02 Thread Harishkumar Pathangay
Hi,
I realized it can be used in standard mode only after you pointing to that.
Anyways, writing custom agent always gives me a good understanding of the 
resources start/stop/monitor etc…
My custom agent still has lot of “hard coded” values, but it is meant for 
studying and understanding purposes rather than to put in a production machine.

Please find attachments.

Thanks,
Harish P

Sent from Mail for Windows 10

From: Reid Wahl
Sent: 02 December 2020 15:55
To: Cluster Labs - All topics related to open-source clustering 
welcomed
Subject: Re: [ClusterLabs] Question on restart of resource during fail over

On Wed, Dec 2, 2020 at 2:16 AM Harishkumar Pathangay
 wrote:
>
> Just got the issue resolved.

Nice work!

> Any case I will send the cib.xml and my custom db2 resource agent.
>
> The existing resource agent is for HADR database, where there are two 
> databases one running as Primary and other as standby.

HADR is only one option. There's also a standard mode:
  - 
https://github.com/oalbrigt/resource-agents/blob/master/heartbeat/db2#L64-L69

I don't know much about DB2, so I'm not sure whether that would meet
your needs. Based on the metadata, standard mode appears to manage a
single instance (with the databases you select) on one node at a time.

> I have created a script which will start/stop db2 instances with a single 
> database on shared logical volume [HA-LVM] exclusively activated on one node.
>
>
>
> Will mail you shortly.
>
>
>
> Thanks,
>
> Harish P
>
>
>
> Sent from Mail for Windows 10
>
>
>
> From: Reid Wahl
> Sent: 02 December 2020 12:46
> To: Cluster Labs - All topics related to open-source clustering welcomed
> Subject: Re: [ClusterLabs] Question on restart of resource during fail over
>
>
>
> Can you share your pacemaker configuration (i.e.,
> /var/lib/pacemaker/cib/cib.xml)? If you're concerned about quorum,
> then also share your /etc/corosync/corosync.conf just in case.
>
> Also there's a db2 resource agent already written, if you're interested:
> - https://github.com/oalbrigt/resource-agents/blob/master/heartbeat/db2
>
> On Tue, Dec 1, 2020 at 9:50 AM Harishkumar Pathangay
>  wrote:
> >
> > Hi,
> >
> > I have DB2 resource agent scripted by myself.
> >
> > It is working fine with a small glitch.
> >
> >
> >
> > I have node1 and node2 in the cluster. No stonith enabled as I don't need 
> > one. The environment is for learning purpose only.
> >
> >
> >
> > If node one is down [power off], it is starting the resource on other node 
> > which is good. My custom resource agent doing its job. Let us say DB2 is 
> > running with pid 4567.
> >
> >
> >
> > Now, the original node which went down is back again.  I issue “pcs cluster 
> > start” on the node. Node is online. The resource also stays in the other 
> > node, which is again good. That way unnecessary movement of resources is 
> > avoided, exactly what I want. Good but there is a issue.
> >
> > On the other node it is restarting the DB2 resource. So my pid of db2 
> > changes to 3452.
> >
> > This is unnecessary restart of resource which I want to avoid.
> >
> > How to I get this working.
> >
> >
> >
> > I am very new to cluster pacemaker.
> >
> > Please help me so that I can create a working DB2 cluster for my learning 
> > purpose.
> >
> > Also I will be blogging in my youtube channel DB2LUWACADEMY.
> >
> > Please any help is of great significance to me.
> >
> >
> >
> > I think it could be quorum issue. But don't know for sure, because there is 
> > only two nodes and DB2 resource needs to be active only in one node.
> >
> >
> >
> > How do I get this configured.
> >
> >
> >
> > Thanks.
> >
> > Harish P
> >
> >
> >
> >
> >
> > Sent from Mail for Windows 10
> >
> >
> >
> > ___
> > Manage your subscription:
> > https://lists.clusterlabs.org/mailman/listinfo/users
> >
> > ClusterLabs home: https://www.clusterlabs.org/
>
>
>
> --
> Regards,
>
> Reid Wahl, RHCA
> Senior Software Maintenance Engineer, Red Hat
> CEE - Platform Support Delivery - ClusterHA
>
> ___
> Manage your subscription:
> https://lists.clusterlabs.org/mailman/listinfo/users
>
> ClusterLabs home: https://www.clusterlabs.org/
>
>
>
> ___
> Manage your subscription:
> https://lists.clusterlabs.org/mailman/listinfo/users
>
> ClusterLabs home: https://www.clusterlabs.org/



--
Regards,

Reid Wahl, RHCA
Senior Software Maintenance Engineer, Red Hat
CEE - Platform Support Delivery - ClusterHA

___
Manage your subscription:
https://lists.clusterlabs.org/mailman/listinfo/users

ClusterLabs home: https://www.clusterlabs.org/


  

  






  


  

  
  

  


  

  
 

Re: [ClusterLabs] Question on restart of resource during fail over

2020-12-02 Thread Reid Wahl
On Wed, Dec 2, 2020 at 2:16 AM Harishkumar Pathangay
 wrote:
>
> Just got the issue resolved.

Nice work!

> Any case I will send the cib.xml and my custom db2 resource agent.
>
> The existing resource agent is for HADR database, where there are two 
> databases one running as Primary and other as standby.

HADR is only one option. There's also a standard mode:
  - 
https://github.com/oalbrigt/resource-agents/blob/master/heartbeat/db2#L64-L69

I don't know much about DB2, so I'm not sure whether that would meet
your needs. Based on the metadata, standard mode appears to manage a
single instance (with the databases you select) on one node at a time.

> I have created a script which will start/stop db2 instances with a single 
> database on shared logical volume [HA-LVM] exclusively activated on one node.
>
>
>
> Will mail you shortly.
>
>
>
> Thanks,
>
> Harish P
>
>
>
> Sent from Mail for Windows 10
>
>
>
> From: Reid Wahl
> Sent: 02 December 2020 12:46
> To: Cluster Labs - All topics related to open-source clustering welcomed
> Subject: Re: [ClusterLabs] Question on restart of resource during fail over
>
>
>
> Can you share your pacemaker configuration (i.e.,
> /var/lib/pacemaker/cib/cib.xml)? If you're concerned about quorum,
> then also share your /etc/corosync/corosync.conf just in case.
>
> Also there's a db2 resource agent already written, if you're interested:
> - https://github.com/oalbrigt/resource-agents/blob/master/heartbeat/db2
>
> On Tue, Dec 1, 2020 at 9:50 AM Harishkumar Pathangay
>  wrote:
> >
> > Hi,
> >
> > I have DB2 resource agent scripted by myself.
> >
> > It is working fine with a small glitch.
> >
> >
> >
> > I have node1 and node2 in the cluster. No stonith enabled as I don't need 
> > one. The environment is for learning purpose only.
> >
> >
> >
> > If node one is down [power off], it is starting the resource on other node 
> > which is good. My custom resource agent doing its job. Let us say DB2 is 
> > running with pid 4567.
> >
> >
> >
> > Now, the original node which went down is back again.  I issue “pcs cluster 
> > start” on the node. Node is online. The resource also stays in the other 
> > node, which is again good. That way unnecessary movement of resources is 
> > avoided, exactly what I want. Good but there is a issue.
> >
> > On the other node it is restarting the DB2 resource. So my pid of db2 
> > changes to 3452.
> >
> > This is unnecessary restart of resource which I want to avoid.
> >
> > How to I get this working.
> >
> >
> >
> > I am very new to cluster pacemaker.
> >
> > Please help me so that I can create a working DB2 cluster for my learning 
> > purpose.
> >
> > Also I will be blogging in my youtube channel DB2LUWACADEMY.
> >
> > Please any help is of great significance to me.
> >
> >
> >
> > I think it could be quorum issue. But don't know for sure, because there is 
> > only two nodes and DB2 resource needs to be active only in one node.
> >
> >
> >
> > How do I get this configured.
> >
> >
> >
> > Thanks.
> >
> > Harish P
> >
> >
> >
> >
> >
> > Sent from Mail for Windows 10
> >
> >
> >
> > ___
> > Manage your subscription:
> > https://lists.clusterlabs.org/mailman/listinfo/users
> >
> > ClusterLabs home: https://www.clusterlabs.org/
>
>
>
> --
> Regards,
>
> Reid Wahl, RHCA
> Senior Software Maintenance Engineer, Red Hat
> CEE - Platform Support Delivery - ClusterHA
>
> ___
> Manage your subscription:
> https://lists.clusterlabs.org/mailman/listinfo/users
>
> ClusterLabs home: https://www.clusterlabs.org/
>
>
>
> ___
> Manage your subscription:
> https://lists.clusterlabs.org/mailman/listinfo/users
>
> ClusterLabs home: https://www.clusterlabs.org/



-- 
Regards,

Reid Wahl, RHCA
Senior Software Maintenance Engineer, Red Hat
CEE - Platform Support Delivery - ClusterHA

___
Manage your subscription:
https://lists.clusterlabs.org/mailman/listinfo/users

ClusterLabs home: https://www.clusterlabs.org/


Re: [ClusterLabs] Question on restart of resource during fail over

2020-12-02 Thread Harishkumar Pathangay
Just got the issue resolved.
Any case I will send the cib.xml and my custom db2 resource agent.
The existing resource agent is for HADR database, where there are two databases 
one running as Primary and other as standby.
I have created a script which will start/stop db2 instances with a single 
database on shared logical volume [HA-LVM] exclusively activated on one node.

Will mail you shortly.

Thanks,
Harish P

Sent from Mail for Windows 10

From: Reid Wahl
Sent: 02 December 2020 12:46
To: Cluster Labs - All topics related to open-source clustering 
welcomed
Subject: Re: [ClusterLabs] Question on restart of resource during fail over

Can you share your pacemaker configuration (i.e.,
/var/lib/pacemaker/cib/cib.xml)? If you're concerned about quorum,
then also share your /etc/corosync/corosync.conf just in case.

Also there's a db2 resource agent already written, if you're interested:
- https://github.com/oalbrigt/resource-agents/blob/master/heartbeat/db2

On Tue, Dec 1, 2020 at 9:50 AM Harishkumar Pathangay
 wrote:
>
> Hi,
>
> I have DB2 resource agent scripted by myself.
>
> It is working fine with a small glitch.
>
>
>
> I have node1 and node2 in the cluster. No stonith enabled as I don't need 
> one. The environment is for learning purpose only.
>
>
>
> If node one is down [power off], it is starting the resource on other node 
> which is good. My custom resource agent doing its job. Let us say DB2 is 
> running with pid 4567.
>
>
>
> Now, the original node which went down is back again.  I issue “pcs cluster 
> start” on the node. Node is online. The resource also stays in the other 
> node, which is again good. That way unnecessary movement of resources is 
> avoided, exactly what I want. Good but there is a issue.
>
> On the other node it is restarting the DB2 resource. So my pid of db2 changes 
> to 3452.
>
> This is unnecessary restart of resource which I want to avoid.
>
> How to I get this working.
>
>
>
> I am very new to cluster pacemaker.
>
> Please help me so that I can create a working DB2 cluster for my learning 
> purpose.
>
> Also I will be blogging in my youtube channel DB2LUWACADEMY.
>
> Please any help is of great significance to me.
>
>
>
> I think it could be quorum issue. But don't know for sure, because there is 
> only two nodes and DB2 resource needs to be active only in one node.
>
>
>
> How do I get this configured.
>
>
>
> Thanks.
>
> Harish P
>
>
>
>
>
> Sent from Mail for Windows 10
>
>
>
> ___
> Manage your subscription:
> https://lists.clusterlabs.org/mailman/listinfo/users
>
> ClusterLabs home: https://www.clusterlabs.org/



--
Regards,

Reid Wahl, RHCA
Senior Software Maintenance Engineer, Red Hat
CEE - Platform Support Delivery - ClusterHA

___
Manage your subscription:
https://lists.clusterlabs.org/mailman/listinfo/users

ClusterLabs home: https://www.clusterlabs.org/

___
Manage your subscription:
https://lists.clusterlabs.org/mailman/listinfo/users

ClusterLabs home: https://www.clusterlabs.org/


[ClusterLabs] resource-agents v4.7.0 rc1

2020-12-02 Thread Oyvind Albrigtsen

ClusterLabs is happy to announce resource-agents v4.7.0 rc1.

Source code is available at:
https://github.com/ClusterLabs/resource-agents/releases/tag/v4.7.0rc1

The most significant enhancements in this release are:
- bugfixes and enhancements:
 - Build: fix systemd paths when using non standard prefix
 - Configure: default to build heartbeat agents only
 - Configure: use pkg-config to detect systemd-paths to make CI able to define 
them the same way for all CL-projects
 - CI: add pkg-config file
 - AWS agents: add support for IMDSv2
 - Filesystem: Default fast_stop to no for RHEL 9+ and for other distros
 - Filesystem: POSIX-compliant syntax for portability
 - Filesystem: make mmap search not match partial matches
 - Filesystem: support whitespace in device or directory name
 - LVM-activate: use systemd drop-in to stop before blk-availability.service
 - SAPInstance: introduce MINIMAL_PROBE resource parameter (#1564)
 - asterisk: chown directory if not writable by user (#1583)
 - aws-vpc-move-ip: add "region" parameter
 - aws-vpc-move-ip: added optional eni lookup (defaults to instance id)
 - aws-vpc-move-ip: don't warn for expected scenarios
 - aws-vpc-move-ip: use "region" parameter for all commands
 - azure-events: import URLError and encode postData when necessary
 - azure-events: only decode() when exec() output not of type str
 - azure-events: report error if jsondata not received
 - azure-lb: don't redirect nc listener output to pidfile
 - crypt: allow encrypted_dev to be symlink to support using devices in 
/dev/disk/... or by UUID
 - crypt: avoid failing for LVM exclusive volumes by not running full sanity 
check during probes
 - crypt: fix missing && to set exit_reason
 - crypt: make key_file and crypt_type parameters not unique
 - docker-compose: use "docker ps" to improve status accuracy (#1523)
 - ethmonitor: make regex also match vlan interfaces
 - galera/redis: support RHEL 8.1 pacemaker
 - galera/redis: use --output-as for crm_mon w/newer Pacemaker, and prepare for 
Promoted role
 - galera: fix automatic recovery when a cluster was not gracefully stopped
 - galera: fix check_user configuration with clustercheck
 - galera: recover after network split in a 2-node cluster
 - galera: recover from joining a non existing cluster
 - galera: set bootstrap attribute before promote
 - gcp-pd-move: fixes to not match partial disk_name and make regional PD's work
 - gcp-vpc-move-vip: add support for multiple alias IP ranges on one node
 - gcp-vpc-move-vip: fix sort for list of dicts in Python3
 - gcp-vpc-move-vip: improve metadata and log messages
 - iSCSILogicalUnit: lio-t: add pscsi LIO-T backing store
 - iSCSITarget: add support for LIO-T incoming CHAP auth for TPG
 - iface-vlan: vlan_{interface,id} does not have to be unique
 - kamailio: use correct pkill parameters
 - man: use OCF_CHECK_LEVEL for depth parameters in pcs examples
 - man: use promotable keyword in manpage examples
 - mdraid: fix bashism
 - nfsnotify/nfsserver: fix SELinux issue due to newer ls versions giving 
additional output
 - nfsserver: stop nfsdcld if present during stop-action
 - ocf-distro: improve robustness and specificity (#1558)
 - ocf.py: fix problem when OCF_RESKEY_CRM_meta_interval is not set
 - ocf.py: fix usage for py2 when self param is involved
 - ocf_version_cmp(): enable comparing versions containing git hashes and more
 - pgsql: support RHEL 8.1 pacemaker
 - podman: recover from killed conmon side process
 - podman: recover from podman's storage being out of sync
 - send_arp (libnet): use sigaction() instead of deprecated siginterrupt()
 - send_ua/IPv6addr: use sigaction() instead of deprecated siginterrupt()
 - spec: fix lsb_release dependency
 - spec: ldirectord: added perl-IO-Socket-INET6 dependency on Fedora
 - spec: make Samba/CIFS dependency weak for Fedora 32 and RHEL/CentOS 8 and 
remove the
   dependency for later Fedora/RHEL/CentOS versions
 - spec: dont use Recommends for RHEL/CentOS 7 or older (where it's not 
supported)
 - sybaseASE: add logfile parameter
 - sybaseASE: run verify_all() for start operation only

The full list of changes for resource-agents is available at:
https://github.com/ClusterLabs/resource-agents/blob/v4.7.0rc1/ChangeLog

Everyone is encouraged to download and test the new release candidate.
We do many regression tests and simulations, but we can't cover all
possible use cases, so your feedback is important and appreciated.

Many thanks to all the contributors to this release.


Best,
The resource-agents maintainers

___
Manage your subscription:
https://lists.clusterlabs.org/mailman/listinfo/users

ClusterLabs home: https://www.clusterlabs.org/