[Pacemaker] Order of resources in a group and crm_diff

2014-01-28 Thread Vladislav Bogdanov
Hi all,

Just discovered, that when I add resource to a middle of
(running) group, it is added to the end.

I mean, if I update following (crmsh syntax)

group dhcp-server vip-10-5-200-244 dhcpd

with

group dhcp-server vip-10-5-200-244 vip-10-5-201-244 dhcpd

with 'crm configure load update', actual definition becomes

group dhcp-server vip-10-5-200-244 dhcpd vip-10-5-201-244

Also, strange enough, if I get XML CIB with cibadmin -Q, then edit
order of primitives with text editor, crm_diff doesn't show any differences:

cib-orig.xml:
...
  

  



  
  



  


  



  
  

  


  



  
  



  

  
...

cib.xml:
...
 

  



  
  



  


  



  
  



  


  



  
  

  

  
...

# crm_diff --original cib-orig.xml --new cib.xml

shows nothing.

And, 'cibadmin --replace --xml-file cib.xml' does nothing:

Jan 28 11:01:21 booter-0 cib[2693]:   notice: cib:diff: Diff: --- 0.427.2
Jan 28 11:01:21 booter-0 cib[2693]:   notice: cib:diff: Diff: +++ 0.427.19 
df366a02885285cc95529f402bfdac12
Jan 28 11:01:21 booter-0 cib[2693]:   notice: cib:diff: --   
Jan 28 11:01:21 booter-0 cib[2693]:   notice: cib:diff: ++ 

But, after I do

# crm_shadow --create-empty myShadow
shadow[myShadow] # cibadmin -E --force
shadow[myShadow] # cibadmin --replace --xml-file cib.xml
shadow[myShadow] # crm_shadow --commit myShadow --force
Now type Ctrl-D to exit the crm_shadow shell
shadow[myShadow] # exit

group becomes defined in a proper order.

That's why the only suspect is xml-diff algorithm.

Andrew, David, could you please look?

Thank you,
Vladislav

___
Pacemaker mailing list: Pacemaker@oss.clusterlabs.org
http://oss.clusterlabs.org/mailman/listinfo/pacemaker

Project Home: http://www.clusterlabs.org
Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
Bugs: http://bugs.clusterlabs.org


Re: [Pacemaker] Restart of resources

2014-01-28 Thread Frank Brendel
No one with an idea?
Or can someone tell me if it is even possible?


Thanks
Frank


Am 23.01.2014 10:50, schrieb Frank Brendel:
> Hi list,
>
> I have some trouble configuring a resource that is allowed to fail 
> once in two minutes.
> The documentation states that I have to configure migration-threshold 
> and failure-timeout to achieve this.
> Here is the configuration for the resource.
>
> # pcs config
> Cluster Name: mycluster
> Corosync Nodes:
>
> Pacemaker Nodes:
>  Node1 Node2 Node3
>
> Resources:
>  Clone: resClamd-clone
>   Meta Attrs: clone-max=3 clone-node-max=1 interleave=true
>   Resource: resClamd (class=lsb type=clamd)
>Meta Attrs: failure-timeout=120s migration-threshold=2
>Operations: monitor on-fail=restart interval=60s 
> (resClamd-monitor-on-fail-restart)
>
> Stonith Devices:
> Fencing Levels:
>
> Location Constraints:
> Ordering Constraints:
> Colocation Constraints:
>
> Cluster Properties:
>  cluster-infrastructure: cman
>  dc-version: 1.1.10-14.el6_5.1-368c726
>  last-lrm-refresh: 1390468150
>  stonith-enabled: false
>
> # pcs resource defaults
> resource-stickiness: INFINITY
>
> # pcs status
> Cluster name: mycluster
> Last updated: Thu Jan 23 10:12:49 2014
> Last change: Thu Jan 23 10:11:40 2014 via cibadmin on Node2
> Stack: cman
> Current DC: Node2 - partition with quorum
> Version: 1.1.10-14.el6_5.1-368c726
> 3 Nodes configured
> 3 Resources configured
>
>
> Online: [ Node1 Node2 Node3 ]
>
> Full list of resources:
>
>  Clone Set: resClamd-clone [resClamd]
>  Started: [ Node1 Node2 Node3 ]
>
>
> Stopping the clamd daemon sets the failcount to 1 and the daemon is 
> started again. Ok.
>
>
> # service clamd stop
> Stopping Clam AntiVirus Daemon:[  OK ]
>
> /var/log/messages
> Jan 23 10:15:20 Node1 crmd[6075]:   notice: process_lrm_event: 
> Node1-resClamd_monitor_6:305 [ clamd is stopped\n ]
> Jan 23 10:15:20 Node1 attrd[6073]:   notice: attrd_cs_dispatch: Update 
> relayed from Node2
> Jan 23 10:15:20 Node1 attrd[6073]:   notice: attrd_trigger_update: 
> Sending flush op to all hosts for: fail-count-resClamd (1)
> Jan 23 10:15:20 Node1 attrd[6073]:   notice: attrd_perform_update: 
> Sent update 177: fail-count-resClamd=1
> Jan 23 10:15:20 Node1 attrd[6073]:   notice: attrd_cs_dispatch: Update 
> relayed from Node2
> Jan 23 10:15:20 Node1 attrd[6073]:   notice: attrd_trigger_update: 
> Sending flush op to all hosts for: last-failure-resClamd (1390468520)
> Jan 23 10:15:20 Node1 attrd[6073]:   notice: attrd_perform_update: 
> Sent update 179: last-failure-resClamd=1390468520
> Jan 23 10:15:20 Node1 crmd[6075]:   notice: process_lrm_event: 
> Node1-resClamd_monitor_6:305 [ clamd is stopped\n ]
> Jan 23 10:15:21 Node1 crmd[6075]:   notice: process_lrm_event: LRM 
> operation resClamd_stop_0 (call=310, rc=0, cib-update=110, 
> confirmed=true) ok
> Jan 23 10:15:30 elmailtst1 crmd[6075]:   notice: process_lrm_event: 
> LRM operation resClamd_start_0 (call=314, rc=0, cib-update=111, 
> confirmed=true) ok
> Jan 23 10:15:30 elmailtst1 crmd[6075]:   notice: process_lrm_event: 
> LRM operation resClamd_monitor_6 (call=317, rc=0, cib-update=112, 
> confirmed=false) ok
>
> # pcs status
> Cluster name: mycluster
> Last updated: Thu Jan 23 10:16:48 2014
> Last change: Thu Jan 23 10:11:40 2014 via cibadmin on Node1
> Stack: cman
> Current DC: Node2 - partition with quorum
> Version: 1.1.10-14.el6_5.1-368c726
> 3 Nodes configured
> 3 Resources configured
>
>
> Online: [ Node1 Node2 Node3 ]
>
> Full list of resources:
>
>  Clone Set: resClamd-clone [resClamd]
>  Started: [ Node1 Node2 Node3 ]
>
> Failed actions:
> resClamd_monitor_6 on Node1 'not running' (7): call=305, 
> status=complete, last-rc-change='Thu Jan 23 10:15:20 2014', 
> queued=0ms, exec=0ms
>
> # pcs resource failcount show resClamd
> Failcounts for resClamd
>  Node1: 1
>
>
> After 7 Minutes I let it fail again and as I understood it should be 
> started as well. But it doesn't.
>
>
> # service clamd stop
> Stopping Clam AntiVirus Daemon:[  OK ]
>
> Jan 23 10:22:30 Node1 crmd[6075]:   notice: process_lrm_event: LRM 
> operation resClamd_monitor_6 (call=317, rc=7, cib-update=113, 
> confirmed=false) not running
> Jan 23 10:22:30 Node1 crmd[6075]:   notice: process_lrm_event: 
> Node1-resClamd_monitor_6:317 [ clamd is stopped\n ]
> Jan 23 10:22:30 Node1 attrd[6073]:   notice: attrd_cs_dispatch: Update 
> relayed from Node2
> Jan 23 10:22:30 Node1 attrd[6073]:   notice: attrd_trigger_update: 
> Sending flush op to all hosts for: fail-count-resClamd (2)
> Jan 23 10:22:30 Node1 attrd[6073]:   notice: attrd_perform_update: 
> Sent update 181: fail-count-resClamd=2
> Jan 23 10:22:30 Node1 attrd[6073]:   notice: attrd_cs_dispatch: Update 
> relayed from Node2
> Jan 23 10:22:30 Node1 attrd[6073]:   notice: attrd_trigger_update: 
> Sending flush op to all hosts for: last-failure-resClamd (1390468950)
> Jan 23 10:22:30 Node1 attrd[6073]:   notic

[Pacemaker] New fence Agent for Proxmox VE

2014-01-28 Thread Frank Brendel
Hi list,

I've written a fence agent for the Proxmox Virtual Environment to fence 
virtual Pacemaker nodes, similar to fence_vmware.

I'd like to contribute it but I don't know who is responsible.


Thanks
Frank
___
Pacemaker mailing list: Pacemaker@oss.clusterlabs.org
http://oss.clusterlabs.org/mailman/listinfo/pacemaker

Project Home: http://www.clusterlabs.org
Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
Bugs: http://bugs.clusterlabs.org


Re: [Pacemaker] New fence Agent for Proxmox VE

2014-01-28 Thread Digimer

On 28/01/14 09:07 AM, Frank Brendel wrote:

Hi list,

I've written a fence agent for the Proxmox Virtual Environment to fence
virtual Pacemaker nodes, similar to fence_vmware.

I'd like to contribute it but I don't know who is responsible.


Thanks
Frank


Assuming you've released it under a GPL-like license, you can simply 
paste the link to the repo here. If there is no repo, then attach it here.


Cheers

--
Digimer
Papers and Projects: https://alteeve.ca/w/
What if the cure for cancer is trapped in the mind of a person without 
access to education?


___
Pacemaker mailing list: Pacemaker@oss.clusterlabs.org
http://oss.clusterlabs.org/mailman/listinfo/pacemaker

Project Home: http://www.clusterlabs.org
Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
Bugs: http://bugs.clusterlabs.org


Re: [Pacemaker] New fence Agent for Proxmox VE

2014-01-28 Thread Frank Brendel

Am 28.01.2014 15:45, schrieb Digimer:
> On 28/01/14 09:07 AM, Frank Brendel wrote:
>> Hi list,
>>
>> I've written a fence agent for the Proxmox Virtual Environment to fence
>> virtual Pacemaker nodes, similar to fence_vmware.
>>
>> I'd like to contribute it but I don't know who is responsible.
>>
>>
>> Thanks
>> Frank
>
> Assuming you've released it under a GPL-like license, you can simply 
> paste the link to the repo here. If there is no repo, then attach it 
> here.
>
> Cheers
>

What did you mean with 'here'?
Post it as attachment to the list?

Sorry, I have no experience with this.


Thanks
Frank

___
Pacemaker mailing list: Pacemaker@oss.clusterlabs.org
http://oss.clusterlabs.org/mailman/listinfo/pacemaker

Project Home: http://www.clusterlabs.org
Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
Bugs: http://bugs.clusterlabs.org


Re: [Pacemaker] New fence Agent for Proxmox VE

2014-01-28 Thread Digimer

On 28/01/14 11:21 AM, Frank Brendel wrote:


Am 28.01.2014 15:45, schrieb Digimer:

On 28/01/14 09:07 AM, Frank Brendel wrote:

Hi list,

I've written a fence agent for the Proxmox Virtual Environment to fence
virtual Pacemaker nodes, similar to fence_vmware.

I'd like to contribute it but I don't know who is responsible.


Thanks
Frank


Assuming you've released it under a GPL-like license, you can simply
paste the link to the repo here. If there is no repo, then attach it
here.

Cheers



What did you mean with 'here'?
Post it as attachment to the list?

Sorry, I have no experience with this.


Thanks
Frank

___
Pacemaker mailing list: Pacemaker@oss.clusterlabs.org
http://oss.clusterlabs.org/mailman/listinfo/pacemaker

Project Home: http://www.clusterlabs.org
Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
Bugs: http://bugs.clusterlabs.org



Yup, as an attachment to this list.

Cheers

--
Digimer
Papers and Projects: https://alteeve.ca/w/
What if the cure for cancer is trapped in the mind of a person without 
access to education?


___
Pacemaker mailing list: Pacemaker@oss.clusterlabs.org
http://oss.clusterlabs.org/mailman/listinfo/pacemaker

Project Home: http://www.clusterlabs.org
Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
Bugs: http://bugs.clusterlabs.org


Re: [Pacemaker] error with pcs resource group command

2014-01-28 Thread David Vossel
- Original Message -
> From: "Parveen Jain" 
> To: pacemaker@oss.clusterlabs.org
> Sent: Thursday, January 23, 2014 9:24:39 AM
> Subject: [Pacemaker] error with pcs resource group command
> 
> 
> 
> Hi Team,
> 
> I was trying to add a group while converting from my CRM commands to pcs
> commands:
> 
> following is the previous crm command:
> 
> group vip-group vip-prim \
> 
> meta target-role="Started"
> 
> 
> 
> the command which I am trying to use is:
> 
> pcs resource group add vip-group vip-prim meta target-role="Started"
> 
> but whenever I use this command, I get following output:
> 
> 
> 
> 
> " Unable to find resource: meta
> 
> Unable to find resource: target-role=Started "

pcs does not have a one to one mapping to crmsh commands. The 'pcs resource 
group add' command does not accept metadata.

use pcs resource meta  target-role=Started

or 

'pcs resource enable ' will do the same thing.

The pcs tool tells you what arguments the different commands take. You can view 
this for yourself. Use 'pcs resource help' to see resource options.  You can 
look at the man page as well 'man pcs' and it has a detailed list.

-- Vossel


> 
> 
> 
> I even consulted the documentation, but it also gives the syntax I am using:
> 
> https://access.redhat.com/site/documentation//en-US/Red_Hat_Enterprise_Linux/7-Beta/html/High_Availability_Add-On_Reference/s1-resourceopts-HAAR.html#tb-resource-options-HAAR
> 
> 
> 
> 
> Can anyone guide where I am doing wrong ?
> 
> 
> 
> 
> 
> 
> 
> Thanks,
> 
> Parveen
> 
> ___
> Pacemaker mailing list: Pacemaker@oss.clusterlabs.org
> http://oss.clusterlabs.org/mailman/listinfo/pacemaker
> 
> Project Home: http://www.clusterlabs.org
> Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
> Bugs: http://bugs.clusterlabs.org
> 

___
Pacemaker mailing list: Pacemaker@oss.clusterlabs.org
http://oss.clusterlabs.org/mailman/listinfo/pacemaker

Project Home: http://www.clusterlabs.org
Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
Bugs: http://bugs.clusterlabs.org


Re: [Pacemaker] Time to get ready for 1.1.11

2014-01-28 Thread Andrew Beekhof

On 24 Jan 2014, at 3:25 pm, Digimer  wrote:

> On 23/01/14 11:08 PM, David Vossel wrote:
>> You may have noticed the release did not happen. I'm investigating a bug in 
>> the service api involving systemd scripts.  I'm postponing the release until 
>> I understand what is going on.
>> 
>> -- Vossel
> 
> I just tried to compile pacemaker on rhel 7 and it failed to find some 
> dependencies:
> 
> [root@rhel7-builder pacemaker]# make rpm-dep
> ...
> Error: No Package found for asciidoc
> Error: No Package found for corosynclib-devel
> Error: No Package found for help2man
> Error: No Package found for libqb-devel > 0.11.0
> Error: No Package found for libtool-ltdl-devel
> Error: No Package found for publican
> make: *** [rpm-dep] Error 1
> 
> Have you tried building on RHEL 7?

Most days of the week.  Those packages might be in a different channel... 
missing corosynclib-devel is a bit of a give away

> I know I could probably go out and start finding these RPMs from F19/F20, but 
> I'm curious if there is a "right way" to do it.
> 
> Cheers!
> 
> -- 
> Digimer
> Papers and Projects: https://alteeve.ca/w/
> What if the cure for cancer is trapped in the mind of a person without access 
> to education?
> 
> ___
> Pacemaker mailing list: Pacemaker@oss.clusterlabs.org
> http://oss.clusterlabs.org/mailman/listinfo/pacemaker
> 
> Project Home: http://www.clusterlabs.org
> Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
> Bugs: http://bugs.clusterlabs.org



signature.asc
Description: Message signed with OpenPGP using GPGMail
___
Pacemaker mailing list: Pacemaker@oss.clusterlabs.org
http://oss.clusterlabs.org/mailman/listinfo/pacemaker

Project Home: http://www.clusterlabs.org
Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
Bugs: http://bugs.clusterlabs.org


Re: [Pacemaker] Order of resources in a group and crm_diff

2014-01-28 Thread Andrew Beekhof

On 28 Jan 2014, at 10:11 pm, Vladislav Bogdanov  wrote:

> Hi all,
> 
> Just discovered, that when I add resource to a middle of
> (running) group, it is added to the end.
> 
> I mean, if I update following (crmsh syntax)
> 
> group dhcp-server vip-10-5-200-244 dhcpd
> 
> with
> 
> group dhcp-server vip-10-5-200-244 vip-10-5-201-244 dhcpd
> 
> with 'crm configure load update', actual definition becomes
> 
> group dhcp-server vip-10-5-200-244 dhcpd vip-10-5-201-244
> 
> Also, strange enough, if I get XML CIB with cibadmin -Q, then edit
> order of primitives with text editor, crm_diff doesn't show any differences:
> 
> cib-orig.xml:
> ...
>  
> type="IPaddr2">
>  
> id="vip-10-5-200-244-instance_attributes-ip"/>
> id="vip-10-5-200-244-instance_attributes-cidr_netmask"/>
> id="vip-10-5-200-244-instance_attributes-nic"/>
>  
>  
> id="vip-10-5-200-244-start-0"/>
> id="vip-10-5-200-244-stop-0"/>
>
>  
>
>
>  
> id="dhcpd-monitor-10"/>
>
>
>  
>  
> value="Started"/>
>  
>
> type="IPaddr2">
>  
> id="vip-10-5-201-244-instance_attributes-ip"/>
> id="vip-10-5-201-244-instance_attributes-cidr_netmask"/>
> id="vip-10-5-201-244-instance_attributes-nic"/>
>  
>  
> id="vip-10-5-201-244-start-0"/>
> id="vip-10-5-201-244-stop-0"/>
>
>  
>
>  
> ...
> 
> cib.xml:
> ...
> 
> type="IPaddr2">
>  
> id="vip-10-5-200-244-instance_attributes-ip"/>
> id="vip-10-5-200-244-instance_attributes-cidr_netmask"/>
> id="vip-10-5-200-244-instance_attributes-nic"/>
>  
>  
> id="vip-10-5-200-244-start-0"/>
> id="vip-10-5-200-244-stop-0"/>
>
>  
>
> type="IPaddr2">
>  
> id="vip-10-5-201-244-instance_attributes-ip"/>
> id="vip-10-5-201-244-instance_attributes-cidr_netmask"/>
> id="vip-10-5-201-244-instance_attributes-nic"/>
>  
>  
> id="vip-10-5-201-244-start-0"/>
> id="vip-10-5-201-244-stop-0"/>
>
>  
>
>
>  
> id="dhcpd-monitor-10"/>
>
>
>  
>  
> value="Started"/>
>  
>
>  
> ...
> 
> # crm_diff --original cib-orig.xml --new cib.xml
> 
> shows nothing.
> 
> And, 'cibadmin --replace --xml-file cib.xml' does nothing:
> 
> Jan 28 11:01:21 booter-0 cib[2693]:   notice: cib:diff: Diff: --- 0.427.2
> Jan 28 11:01:21 booter-0 cib[2693]:   notice: cib:diff: Diff: +++ 0.427.19 
> df366a02885285cc95529f402bfdac12
> Jan 28 11:01:21 booter-0 cib[2693]:   notice: cib:diff: --id="status-2-shutdown" name="shutdown" value="0"/>
> Jan 28 11:01:21 booter-0 cib[2693]:   notice: cib:diff: ++  num_updates="19" admin_epoch="0" validate-with="pacemaker-1.2" 
> cib-last-written="Tue Jan 28 10:46:06 2014" update-origin="booter-0" 
> update-client="cibadmin" crm_feature_set="3.0.8" have-quorum="1" dc-uuid="1"/>

Thats a known deficiency in the v1 diff format (and why we need costly digests 
to detect ordering changes).
Happily .12 will have a new and improve diff format that will handle this 
correctly.

> 
> But, after I do
> 
> # crm_shadow --create-empty myShadow
> shadow[myShadow] # cibadmin -E --force
> shadow[myShadow] # cibadmin --replace --xml-file cib.xml
> shadow[myShadow] # crm_shadow --commit myShadow --force
> Now type Ctrl-D to exit the crm_shadow shell
> shadow[myShadow] # exit
> 
> group becomes defined in a proper order.
> 
> That's why the only suspect is xml-diff algorithm.
> 
> Andrew, David, could you please look?

Its also partly how crmsh is using diffs.
It could be verifying the diff produces the correct result by verifying the 
above mentioned digest.
Or it could do a replace for the group instead...

> 
> Thank you,
> Vladislav
> 
> ___
> Pacemaker mailing list: Pacemaker@oss.clusterlabs.org
> http://oss.clusterlabs.org/mailman/listinfo/pacemaker
> 
> Project Home: http://www.clusterlabs.org
> Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
> Bugs: http://bugs.clusterlabs.org



signature.asc
Description: Message signed with OpenPGP using GPGMail
___
Pacemaker mailing list: Pacemaker@oss.clusterlabs.org
http://oss.clusterlabs.org/mailman/listinfo/pacemaker

Project Home: http://www.clusterlabs.org
Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
Bugs: http://bugs.clusterlabs.org