Re: [Pacemaker] racing crm commands... last write wins?

2013-04-14 Thread Andrew Beekhof
On 12/04/2013, at 11:35 PM, Brian J. Murrell br...@interlinx.bc.ca wrote: On 13-04-10 07:02 PM, Andrew Beekhof wrote: On 11/04/2013, at 6:33 AM, Brian J. Murrell brian-squohqy54cvwr29bmmi...@public.gmane.org wrote: Does crm_resource suffer from this problem no Excellent. I was

Re: [Pacemaker] racing crm commands... last write wins?

2013-04-12 Thread Brian J. Murrell
On 13-04-11 06:00 PM, Andrew Beekhof wrote: Actually, I think the semantics of -C are first-write-wins and any subsequent attempts fail with -EEXSIST Indeed, you are correct. I think my point though was that it didn't matter in my case which writer wins since they should all be trying to

Re: [Pacemaker] racing crm commands... last write wins?

2013-04-12 Thread Brian J. Murrell
On 13-04-10 07:02 PM, Andrew Beekhof wrote: On 11/04/2013, at 6:33 AM, Brian J. Murrell brian-squohqy54cvwr29bmmi...@public.gmane.org wrote: Does crm_resource suffer from this problem no Excellent. I was unable to find any comprehensive documentation on just how to implement a

Re: [Pacemaker] racing crm commands... last write wins?

2013-04-11 Thread Brian J. Murrell
On 13-04-10 04:33 PM, Brian J. Murrell wrote: Does crm_resource suffer from this problem or does it properly only send exactly the update to the CIB for the operation it's trying to achieve? In exploring all options, how about pcs? Does pcs' resource create ... for example have the same

Re: [Pacemaker] racing crm commands... last write wins?

2013-04-11 Thread Brian J. Murrell
On 13-04-11 07:37 AM, Brian J. Murrell wrote: In exploring all options, how about pcs? Does pcs' resource create ... for example have the same read+modify+replace problem as crm configure or does pcs resource create also only send proper fragments to update just the part of the CIB it's

Re: [Pacemaker] racing crm commands... last write wins?

2013-04-11 Thread Rasto Levrinc
On Thu, Apr 11, 2013 at 2:04 PM, Brian J. Murrell br...@interlinx.bc.ca wrote: On 13-04-11 07:37 AM, Brian J. Murrell wrote: In exploring all options, how about pcs? Does pcs' resource create ... for example have the same read+modify+replace problem as crm configure or does pcs resource

Re: [Pacemaker] racing crm commands... last write wins?

2013-04-11 Thread Andrew Beekhof
On 11/04/2013, at 10:04 PM, Brian J. Murrell br...@interlinx.bc.ca wrote: On 13-04-11 07:37 AM, Brian J. Murrell wrote: In exploring all options, how about pcs? Does pcs' resource create ... for example have the same read+modify+replace problem as crm configure or does pcs resource create

Re: [Pacemaker] racing crm commands... last write wins?

2013-04-11 Thread Andrew Beekhof
On 11/04/2013, at 10:46 PM, Rasto Levrinc rasto.levr...@gmail.com wrote: On Thu, Apr 11, 2013 at 2:04 PM, Brian J. Murrell br...@interlinx.bc.ca wrote: On 13-04-11 07:37 AM, Brian J. Murrell wrote: In exploring all options, how about pcs? Does pcs' resource create ... for example have

Re: [Pacemaker] racing crm commands... last write wins?

2013-04-10 Thread Brian J. Murrell
On 13-02-21 07:48 PM, Andrew Beekhof wrote: On Fri, Feb 22, 2013 at 5:18 AM, Brian J. Murrell brian-squohqy54cvwr29bmmi...@public.gmane.org wrote: I wonder what happens in the case of two racing crm commands that want to update the CIB (with non-overlapping/conflicting data). Is there any

Re: [Pacemaker] racing crm commands... last write wins?

2013-04-10 Thread Lars Marowsky-Bree
On 2013-04-10T16:33:48, Brian J. Murrell br...@interlinx.bc.ca wrote: crmsh uses a read+modify+replace cycle, if B reads after A has read but before the replace has happened, data will be lost. Does crm_resource suffer from this problem or does it properly only send exactly the update to

Re: [Pacemaker] racing crm commands... last write wins?

2013-04-10 Thread Andrew Beekhof
On 11/04/2013, at 6:33 AM, Brian J. Murrell br...@interlinx.bc.ca wrote: On 13-02-21 07:48 PM, Andrew Beekhof wrote: On Fri, Feb 22, 2013 at 5:18 AM, Brian J. Murrell brian-squohqy54cvwr29bmmi...@public.gmane.org wrote: I wonder what happens in the case of two racing crm commands that want

Re: [Pacemaker] racing crm commands... last write wins?

2013-03-25 Thread Dejan Muhamedagic
On Wed, Mar 20, 2013 at 10:40:10AM -0700, Bob Haxo wrote: Regarding the replace triggering a DC election ... which is causing issues with scripted installs ... how do I determine which crm commands will NOT trigger this election? It seems like every configure commit could possible result in

Re: [Pacemaker] racing crm commands... last write wins?

2013-03-20 Thread Bob Haxo
Regarding the replace triggering a DC election ... which is causing issues with scripted installs ... how do I determine which crm commands will NOT trigger this election? I need a way of avoiding this election while installing. I'm finding that when repeating the scripted install with the same

Re: [Pacemaker] racing crm commands... last write wins?

2013-03-04 Thread Dejan Muhamedagic
On Thu, Feb 28, 2013 at 07:34:41PM +0100, Lars Marowsky-Bree wrote: On 2013-02-28T17:51:03, Dejan Muhamedagic deja...@fastmail.fm wrote: crmsh used to make modifications in chunks, which was a bit complex due to element dependencies, but it worked if I can recall correctly. Then it got

Re: [Pacemaker] racing crm commands... last write wins?

2013-03-04 Thread Lars Marowsky-Bree
On 2013-03-04T17:14:28, Dejan Muhamedagic deja...@fastmail.fm wrote: Thought so at the time, yes. And I do think it cleaned up a few things, we just need to improve it. The full CIB replace also seems to trigger an election ... I think that used to happen in Heartbeat clusters but got

Re: [Pacemaker] racing crm commands... last write wins?

2013-02-28 Thread Dejan Muhamedagic
On Thu, Feb 28, 2013 at 11:03:02AM +0100, Lars Marowsky-Bree wrote: On 2013-02-25T12:20:13, Brian J. Murrell br...@interlinx.bc.ca wrote: Perhaps there's a way to improve this. Well, the CIB is shared resource. Shared resources need to be locked against these sort of racy updates.

Re: [Pacemaker] racing crm commands... last write wins?

2013-02-28 Thread Lars Marowsky-Bree
On 2013-02-28T17:51:03, Dejan Muhamedagic deja...@fastmail.fm wrote: crmsh used to make modifications in chunks, which was a bit complex due to element dependencies, but it worked if I can recall correctly. Then it got replaced by a full CIB replace (everybody claimed that it was the right

Re: [Pacemaker] racing crm commands... last write wins?

2013-02-27 Thread Dejan Muhamedagic
On Mon, Feb 25, 2013 at 12:20:13PM -0500, Brian J. Murrell wrote: On 13-02-25 10:30 AM, Dejan Muhamedagic wrote: Before doing replace, crmsh queries the CIB and checks if the epoch was modified in the meantime. But doesn't take out a lock of any sort to prevent an update in the

Re: [Pacemaker] racing crm commands... last write wins?

2013-02-25 Thread Dejan Muhamedagic
On Fri, Feb 22, 2013 at 11:48:58AM +1100, Andrew Beekhof wrote: On Fri, Feb 22, 2013 at 5:18 AM, Brian J. Murrell br...@interlinx.bc.ca wrote: I wonder what happens in the case of two racing crm commands that want to update the CIB (with non-overlapping/conflicting data). Is there any

Re: [Pacemaker] racing crm commands... last write wins?

2013-02-25 Thread Brian J. Murrell
On 13-02-25 10:30 AM, Dejan Muhamedagic wrote: Before doing replace, crmsh queries the CIB and checks if the epoch was modified in the meantime. But doesn't take out a lock of any sort to prevent an update in the meanwhile, right? Those operations are not atomic, though. Indeed. Perhaps

[Pacemaker] racing crm commands... last write wins?

2013-02-21 Thread Brian J. Murrell
I wonder what happens in the case of two racing crm commands that want to update the CIB (with non-overlapping/conflicting data). Is there any locking to ensure that one crm cannot overwrite the other's change? (i.e. second one to get there has to read in the new CIB before being able to apply

Re: [Pacemaker] racing crm commands... last write wins?

2013-02-21 Thread Andrew Beekhof
On Fri, Feb 22, 2013 at 5:18 AM, Brian J. Murrell br...@interlinx.bc.ca wrote: I wonder what happens in the case of two racing crm commands that want to update the CIB (with non-overlapping/conflicting data). Is there any locking to ensure that one crm cannot overwrite the other's change?