Mailing List Archive

Attribures was not changed via crm_attribute
Hi!

I have 3 nodes pgsql async cluster.
Now I want test it and reboot first node with pgsql master.
After reboot it migrate to secondarty node.

But after first node stay back - cluster is gone. Now I have this status:
Node Attributes:
* Node a.mydomain.com:
+ master-pgsql:0 : -INFINITY
+ pgsql-data-status : DISCONNECT
+ pgsql-status : STOP
* Node c.mydomain.com:
+ master-pgsql:2 : -INFINITY
+ pgsql-data-status : DISCONNECT
+ pgsql-master-baseline : 0000000028000090
+ pgsql-status : STOP
* Node b.mydomain.com:
+ master-pgsql:1 : -INFINITY
+ pgsql-data-status : LATEST
+ pgsql-status : STOP

Migration summary:
* Node a.mydomain.com:
pgsql:0: migration-threshold=1 fail-count=1
* Node b.mydomain.com:
pgsql:1: migration-threshold=1 fail-count=1
* Node c.mydomain.com:
pgsql:2: migration-threshold=1 fail-count=1

Failed actions:
pgsql:0_monitor_4000 (node=a.mydomain.com, call=27, rc=7,
status=complete): not running
pgsql:1_monitor_3000 (node=b.mydomain.com, call=165, rc=7,
status=complete): not running
pgsql:2_monitor_4000 (node=c.mydomain.com, call=44, rc=7,
status=complete): not running

So, I manual recovery repolicaton:
a node is master and b,c - slave.
But when I try change information via crm_attribute - nothing is changed:
crm_attribute -l forever -N a.mydomain.com -n "pgsql-data-status" -v
"LATEST"
crm_attribute -l forever -N b.mydomain.com -n "pgsql-data-status" -v "SYNC"
crm_attribute -l forever -N c.mydomain.com -n "pgsql-data-status" -v "SYNC"


How I can tell to cluster about a node is pgsql master?
_______________________________________________
Linux-HA mailing list
Linux-HA@lists.linux-ha.org
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems
Re: Attribures was not changed via crm_attribute [ In reply to ]
On Dec 23, 2013, at 9:47 PM, Andrey Rogovsky <a.rogovsky@gmail.com> wrote:

> crm_attribute -l forever -N a.mydomain.com -n "pgsql-data-status" -v
> "LATEST"
> crm_attribute -l forever -N b.mydomain.com -n "pgsql-data-status" -v "SYNC"
> crm_attribute -l forever -N c.mydomain.com -n "pgsql-data-status" -v "SYNC"


Try:

crm_attribute -l reboot

instead of -l forever

---
Jeff Frost <jeff@pgexperts.com>
CTO, PostgreSQL Experts, Inc.
Phone: 1-888-PG-EXPRT x506
FAX: 415-762-5122
http://www.pgexperts.com/
Re: Attribures was not changed via crm_attribute [ In reply to ]
Thanks a lot! It really help me!
Now I have this status:
Node Attributes:
* Node a.mydomain.com:
+ master-pgsql:0 : 1000
+ master-pgsql:1 : -INFINITY
+ pgsql-data-status : LATEST
+ pgsql-master-baseline : 000000002F000090
+ pgsql-status : PRI
* Node c.mydomain.com:
+ master-pgsql:0 : 1000
+ master-pgsql:2 : -INFINITY
+ pgsql-data-status : SYNC
+ pgsql-status : STOP
* Node b.mydomain.com:
+ master-pgsql:0 : 1000
+ master-pgsql:1 : -INFINITY
+ pgsql-data-status : SYNC
+ pgsql-status : STOP

I can begin start pgsql replication, but don't like this:
+ master-pgsql:1 : -INFINITY
+ master-pgsql:2 : -INFINITY
I want removie this attributes. I try run:
root@b:~# crm_attribute -N c.mydomain.com --name "master-pgsql:2" --delete
And got answer: Error performing operation: cib object missing

May be I miss something... How I can delete unwanted attribuies?




2013/12/24 Jeff Frost <jeff@pgexperts.com>

>
> On Dec 23, 2013, at 9:47 PM, Andrey Rogovsky <a.rogovsky@gmail.com> wrote:
>
> > crm_attribute -l forever -N a.mydomain.com -n "pgsql-data-status" -v
> > "LATEST"
> > crm_attribute -l forever -N b.mydomain.com -n "pgsql-data-status" -v
> "SYNC"
> > crm_attribute -l forever -N c.mydomain.com -n "pgsql-data-status" -v
> "SYNC"
>
>
> Try:
>
> crm_attribute -l reboot
>
> instead of -l forever
>
> ---
> Jeff Frost <jeff@pgexperts.com>
> CTO, PostgreSQL Experts, Inc.
> Phone: 1-888-PG-EXPRT x506
> FAX: 415-762-5122
> http://www.pgexperts.com/
>
>
>
>
>
>
>
> _______________________________________________
> Linux-HA mailing list
> Linux-HA@lists.linux-ha.org
> http://lists.linux-ha.org/mailman/listinfo/linux-ha
> See also: http://linux-ha.org/ReportingProblems
>
_______________________________________________
Linux-HA mailing list
Linux-HA@lists.linux-ha.org
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems
Re: Attribures was not changed via crm_attribute [ In reply to ]
I usually do something like this on the master I want to bring up:

#!/bin/bash

rm -f /var/lib/pgsql/9.2/data/recovery.conf
rm -f ~postgres/tmp/PGSQL.lock
crm_attribute -l reboot -N $(uname -n) -n "pgsql-data-status" -v "LATEST"
crm_attribute -l reboot -N $(uname -n) -n "master-pgsql" -v "1000"
crm resource cleanup msPostgresql
crm resource cleanup master-group


On Dec 24, 2013, at 11:45 PM, Andrey Rogovsky <a.rogovsky@gmail.com> wrote:

> Thanks a lot! It really help me!
> Now I have this status:
> Node Attributes:
> * Node a.mydomain.com:
> + master-pgsql:0 : 1000
> + master-pgsql:1 : -INFINITY
> + pgsql-data-status : LATEST
> + pgsql-master-baseline : 000000002F000090
> + pgsql-status : PRI
> * Node c.mydomain.com:
> + master-pgsql:0 : 1000
> + master-pgsql:2 : -INFINITY
> + pgsql-data-status : SYNC
> + pgsql-status : STOP
> * Node b.mydomain.com:
> + master-pgsql:0 : 1000
> + master-pgsql:1 : -INFINITY
> + pgsql-data-status : SYNC
> + pgsql-status : STOP
>
> I can begin start pgsql replication, but don't like this:
> + master-pgsql:1 : -INFINITY
> + master-pgsql:2 : -INFINITY
> I want removie this attributes. I try run:
> root@b:~# crm_attribute -N c.mydomain.com --name "master-pgsql:2" --delete
> And got answer: Error performing operation: cib object missing
>
> May be I miss something... How I can delete unwanted attribuies?
>
>
>
>
> 2013/12/24 Jeff Frost <jeff@pgexperts.com>
>
>>
>> On Dec 23, 2013, at 9:47 PM, Andrey Rogovsky <a.rogovsky@gmail.com> wrote:
>>
>>> crm_attribute -l forever -N a.mydomain.com -n "pgsql-data-status" -v
>>> "LATEST"
>>> crm_attribute -l forever -N b.mydomain.com -n "pgsql-data-status" -v
>> "SYNC"
>>> crm_attribute -l forever -N c.mydomain.com -n "pgsql-data-status" -v
>> "SYNC"
>>
>>
>> Try:
>>
>> crm_attribute -l reboot
>>
>> instead of -l forever
>>
>> ---
>> Jeff Frost <jeff@pgexperts.com>
>> CTO, PostgreSQL Experts, Inc.
>> Phone: 1-888-PG-EXPRT x506
>> FAX: 415-762-5122
>> http://www.pgexperts.com/
>>
>>
>>
>>
>>
>>
>>
>> _______________________________________________
>> Linux-HA mailing list
>> Linux-HA@lists.linux-ha.org
>> http://lists.linux-ha.org/mailman/listinfo/linux-ha
>> See also: http://linux-ha.org/ReportingProblems
>>
> _______________________________________________
> Linux-HA mailing list
> Linux-HA@lists.linux-ha.org
> http://lists.linux-ha.org/mailman/listinfo/linux-ha
> See also: http://linux-ha.org/ReportingProblems

---
Jeff Frost <jeff@pgexperts.com>
CTO, PostgreSQL Experts, Inc.
Phone: 1-888-PG-EXPRT x506
FAX: 415-762-5122
http://www.pgexperts.com/
Re: Attribures was not changed via crm_attribute [ In reply to ]
I run similar commands. But I have unwanted attributes and want to delete
they.



2013/12/25 Jeff Frost <jeff@pgexperts.com>

> I usually do something like this on the master I want to bring up:
>
> #!/bin/bash
>
> rm -f /var/lib/pgsql/9.2/data/recovery.conf
> rm -f ~postgres/tmp/PGSQL.lock
> crm_attribute -l reboot -N $(uname -n) -n "pgsql-data-status" -v "LATEST"
> crm_attribute -l reboot -N $(uname -n) -n "master-pgsql" -v "1000"
> crm resource cleanup msPostgresql
> crm resource cleanup master-group
>
>
> On Dec 24, 2013, at 11:45 PM, Andrey Rogovsky <a.rogovsky@gmail.com>
> wrote:
>
> > Thanks a lot! It really help me!
> > Now I have this status:
> > Node Attributes:
> > * Node a.mydomain.com:
> > + master-pgsql:0 : 1000
> > + master-pgsql:1 : -INFINITY
> > + pgsql-data-status : LATEST
> > + pgsql-master-baseline : 000000002F000090
> > + pgsql-status : PRI
> > * Node c.mydomain.com:
> > + master-pgsql:0 : 1000
> > + master-pgsql:2 : -INFINITY
> > + pgsql-data-status : SYNC
> > + pgsql-status : STOP
> > * Node b.mydomain.com:
> > + master-pgsql:0 : 1000
> > + master-pgsql:1 : -INFINITY
> > + pgsql-data-status : SYNC
> > + pgsql-status : STOP
> >
> > I can begin start pgsql replication, but don't like this:
> > + master-pgsql:1 : -INFINITY
> > + master-pgsql:2 : -INFINITY
> > I want removie this attributes. I try run:
> > root@b:~# crm_attribute -N c.mydomain.com --name "master-pgsql:2"
> --delete
> > And got answer: Error performing operation: cib object missing
> >
> > May be I miss something... How I can delete unwanted attribuies?
> >
> >
> >
> >
> > 2013/12/24 Jeff Frost <jeff@pgexperts.com>
> >
> >>
> >> On Dec 23, 2013, at 9:47 PM, Andrey Rogovsky <a.rogovsky@gmail.com>
> wrote:
> >>
> >>> crm_attribute -l forever -N a.mydomain.com -n "pgsql-data-status" -v
> >>> "LATEST"
> >>> crm_attribute -l forever -N b.mydomain.com -n "pgsql-data-status" -v
> >> "SYNC"
> >>> crm_attribute -l forever -N c.mydomain.com -n "pgsql-data-status" -v
> >> "SYNC"
> >>
> >>
> >> Try:
> >>
> >> crm_attribute -l reboot
> >>
> >> instead of -l forever
> >>
> >> ---
> >> Jeff Frost <jeff@pgexperts.com>
> >> CTO, PostgreSQL Experts, Inc.
> >> Phone: 1-888-PG-EXPRT x506
> >> FAX: 415-762-5122
> >> http://www.pgexperts.com/
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >> _______________________________________________
> >> Linux-HA mailing list
> >> Linux-HA@lists.linux-ha.org
> >> http://lists.linux-ha.org/mailman/listinfo/linux-ha
> >> See also: http://linux-ha.org/ReportingProblems
> >>
> > _______________________________________________
> > Linux-HA mailing list
> > Linux-HA@lists.linux-ha.org
> > http://lists.linux-ha.org/mailman/listinfo/linux-ha
> > See also: http://linux-ha.org/ReportingProblems
>
> ---
> Jeff Frost <jeff@pgexperts.com>
> CTO, PostgreSQL Experts, Inc.
> Phone: 1-888-PG-EXPRT x506
> FAX: 415-762-5122
> http://www.pgexperts.com/
>
>
>
>
>
>
>
> _______________________________________________
> Linux-HA mailing list
> Linux-HA@lists.linux-ha.org
> http://lists.linux-ha.org/mailman/listinfo/linux-ha
> See also: http://linux-ha.org/ReportingProblems
>
_______________________________________________
Linux-HA mailing list
Linux-HA@lists.linux-ha.org
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems
Re: Attribures was not changed via crm_attribute [ In reply to ]
So, does this not work:

crm_attribute -l reboot -N c.mydomain.com --name "master-pgsql:2" --delete

?

On Dec 25, 2013, at 8:27 AM, Andrey Rogovsky <a.rogovsky@gmail.com> wrote:

> I run similar commands. But I have unwanted attributes and want to delete
> they.
>
>
>
> 2013/12/25 Jeff Frost <jeff@pgexperts.com>
>
>> I usually do something like this on the master I want to bring up:
>>
>> #!/bin/bash
>>
>> rm -f /var/lib/pgsql/9.2/data/recovery.conf
>> rm -f ~postgres/tmp/PGSQL.lock
>> crm_attribute -l reboot -N $(uname -n) -n "pgsql-data-status" -v "LATEST"
>> crm_attribute -l reboot -N $(uname -n) -n "master-pgsql" -v "1000"
>> crm resource cleanup msPostgresql
>> crm resource cleanup master-group
>>
>>
>> On Dec 24, 2013, at 11:45 PM, Andrey Rogovsky <a.rogovsky@gmail.com>
>> wrote:
>>
>>> Thanks a lot! It really help me!
>>> Now I have this status:
>>> Node Attributes:
>>> * Node a.mydomain.com:
>>> + master-pgsql:0 : 1000
>>> + master-pgsql:1 : -INFINITY
>>> + pgsql-data-status : LATEST
>>> + pgsql-master-baseline : 000000002F000090
>>> + pgsql-status : PRI
>>> * Node c.mydomain.com:
>>> + master-pgsql:0 : 1000
>>> + master-pgsql:2 : -INFINITY
>>> + pgsql-data-status : SYNC
>>> + pgsql-status : STOP
>>> * Node b.mydomain.com:
>>> + master-pgsql:0 : 1000
>>> + master-pgsql:1 : -INFINITY
>>> + pgsql-data-status : SYNC
>>> + pgsql-status : STOP
>>>
>>> I can begin start pgsql replication, but don't like this:
>>> + master-pgsql:1 : -INFINITY
>>> + master-pgsql:2 : -INFINITY
>>> I want removie this attributes. I try run:
>>> root@b:~# crm_attribute -N c.mydomain.com --name "master-pgsql:2"
>> --delete
>>> And got answer: Error performing operation: cib object missing
>>>
>>> May be I miss something... How I can delete unwanted attribuies?
>>>
>>>
>>>
>>>
>>> 2013/12/24 Jeff Frost <jeff@pgexperts.com>
>>>
>>>>
>>>> On Dec 23, 2013, at 9:47 PM, Andrey Rogovsky <a.rogovsky@gmail.com>
>> wrote:
>>>>
>>>>> crm_attribute -l forever -N a.mydomain.com -n "pgsql-data-status" -v
>>>>> "LATEST"
>>>>> crm_attribute -l forever -N b.mydomain.com -n "pgsql-data-status" -v
>>>> "SYNC"
>>>>> crm_attribute -l forever -N c.mydomain.com -n "pgsql-data-status" -v
>>>> "SYNC"
>>>>
>>>>
>>>> Try:
>>>>
>>>> crm_attribute -l reboot
>>>>
>>>> instead of -l forever
>>>>
>>>> ---
>>>> Jeff Frost <jeff@pgexperts.com>
>>>> CTO, PostgreSQL Experts, Inc.
>>>> Phone: 1-888-PG-EXPRT x506
>>>> FAX: 415-762-5122
>>>> http://www.pgexperts.com/
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> Linux-HA mailing list
>>>> Linux-HA@lists.linux-ha.org
>>>> http://lists.linux-ha.org/mailman/listinfo/linux-ha
>>>> See also: http://linux-ha.org/ReportingProblems
>>>>
>>> _______________________________________________
>>> Linux-HA mailing list
>>> Linux-HA@lists.linux-ha.org
>>> http://lists.linux-ha.org/mailman/listinfo/linux-ha
>>> See also: http://linux-ha.org/ReportingProblems
>>
>> ---
>> Jeff Frost <jeff@pgexperts.com>
>> CTO, PostgreSQL Experts, Inc.
>> Phone: 1-888-PG-EXPRT x506
>> FAX: 415-762-5122
>> http://www.pgexperts.com/
>>
>>
>>
>>
>>
>>
>>
>> _______________________________________________
>> Linux-HA mailing list
>> Linux-HA@lists.linux-ha.org
>> http://lists.linux-ha.org/mailman/listinfo/linux-ha
>> See also: http://linux-ha.org/ReportingProblems
>>
> _______________________________________________
> Linux-HA mailing list
> Linux-HA@lists.linux-ha.org
> http://lists.linux-ha.org/mailman/listinfo/linux-ha
> See also: http://linux-ha.org/ReportingProblems

---
Jeff Frost <jeff@pgexperts.com>
CTO, PostgreSQL Experts, Inc.
Phone: 1-888-PG-EXPRT x506
FAX: 415-762-5122
http://www.pgexperts.com/
Re: Attribures was not changed via crm_attribute [ In reply to ]
This command help me.
I return pg cluster in normal state. Thanks a lot.

Now I was reboot a node for test and got this state:

Resource Group: master
pgsql-master-ip (ocf::heartbeat:IPaddr2): Started b.mydomain.com
Master/Slave Set: msPostgresql [pgsql]
Masters: [ b.mydomain.com ]
Slaves: [ c.mydomain.com ]
Stopped: [ pgsql:2 ]
apache-master-ip (ocf::heartbeat:IPaddr2): Started c.mydomain.com
apache (ocf::heartbeat:apache): Started c.mydomain.com

Node Attributes:
* Node a.mydomain.com:
+ master-pgsql:2 : -INFINITY
+ pgsql-data-status : DISCONNECT
+ pgsql-status : STOP
* Node c.mydomain.com:
+ master-pgsql:0 : -INFINITY
+ master-pgsql:2 : -INFINITY
+ pgsql-data-status : SYNC
+ pgsql-status : HS:async
* Node b.mydomain.com:
+ master-pgsql:0 : 1000
+ master-pgsql:1 : 1000
+ pgsql-data-status : SYNC
+ pgsql-master-baseline : 0000000032000000
+ pgsql-status : PRI

I was maunal sync pgsql from a node to b node and
remove /var/lib/pgsql/tmp/PGSQL.lock &
/var/lib/postgresql/9.3/main/recovery.conf on a node.

Now, how to better way ask cluster about migrate master pgsql on a node?



2013/12/25 Jeff Frost <jeff@pgexperts.com>

> So, does this not work:
>
> crm_attribute -l reboot -N c.mydomain.com --name "master-pgsql:2"
> --delete
>
> ?
>
> On Dec 25, 2013, at 8:27 AM, Andrey Rogovsky <a.rogovsky@gmail.com> wrote:
>
> > I run similar commands. But I have unwanted attributes and want to delete
> > they.
> >
> >
> >
> > 2013/12/25 Jeff Frost <jeff@pgexperts.com>
> >
> >> I usually do something like this on the master I want to bring up:
> >>
> >> #!/bin/bash
> >>
> >> rm -f /var/lib/pgsql/9.2/data/recovery.conf
> >> rm -f ~postgres/tmp/PGSQL.lock
> >> crm_attribute -l reboot -N $(uname -n) -n "pgsql-data-status" -v
> "LATEST"
> >> crm_attribute -l reboot -N $(uname -n) -n "master-pgsql" -v "1000"
> >> crm resource cleanup msPostgresql
> >> crm resource cleanup master-group
> >>
> >>
> >> On Dec 24, 2013, at 11:45 PM, Andrey Rogovsky <a.rogovsky@gmail.com>
> >> wrote:
> >>
> >>> Thanks a lot! It really help me!
> >>> Now I have this status:
> >>> Node Attributes:
> >>> * Node a.mydomain.com:
> >>> + master-pgsql:0 : 1000
> >>> + master-pgsql:1 : -INFINITY
> >>> + pgsql-data-status : LATEST
> >>> + pgsql-master-baseline : 000000002F000090
> >>> + pgsql-status : PRI
> >>> * Node c.mydomain.com:
> >>> + master-pgsql:0 : 1000
> >>> + master-pgsql:2 : -INFINITY
> >>> + pgsql-data-status : SYNC
> >>> + pgsql-status : STOP
> >>> * Node b.mydomain.com:
> >>> + master-pgsql:0 : 1000
> >>> + master-pgsql:1 : -INFINITY
> >>> + pgsql-data-status : SYNC
> >>> + pgsql-status : STOP
> >>>
> >>> I can begin start pgsql replication, but don't like this:
> >>> + master-pgsql:1 : -INFINITY
> >>> + master-pgsql:2 : -INFINITY
> >>> I want removie this attributes. I try run:
> >>> root@b:~# crm_attribute -N c.mydomain.com --name "master-pgsql:2"
> >> --delete
> >>> And got answer: Error performing operation: cib object missing
> >>>
> >>> May be I miss something... How I can delete unwanted attribuies?
> >>>
> >>>
> >>>
> >>>
> >>> 2013/12/24 Jeff Frost <jeff@pgexperts.com>
> >>>
> >>>>
> >>>> On Dec 23, 2013, at 9:47 PM, Andrey Rogovsky <a.rogovsky@gmail.com>
> >> wrote:
> >>>>
> >>>>> crm_attribute -l forever -N a.mydomain.com -n "pgsql-data-status" -v
> >>>>> "LATEST"
> >>>>> crm_attribute -l forever -N b.mydomain.com -n "pgsql-data-status" -v
> >>>> "SYNC"
> >>>>> crm_attribute -l forever -N c.mydomain.com -n "pgsql-data-status" -v
> >>>> "SYNC"
> >>>>
> >>>>
> >>>> Try:
> >>>>
> >>>> crm_attribute -l reboot
> >>>>
> >>>> instead of -l forever
> >>>>
> >>>> ---
> >>>> Jeff Frost <jeff@pgexperts.com>
> >>>> CTO, PostgreSQL Experts, Inc.
> >>>> Phone: 1-888-PG-EXPRT x506
> >>>> FAX: 415-762-5122
> >>>> http://www.pgexperts.com/
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>> _______________________________________________
> >>>> Linux-HA mailing list
> >>>> Linux-HA@lists.linux-ha.org
> >>>> http://lists.linux-ha.org/mailman/listinfo/linux-ha
> >>>> See also: http://linux-ha.org/ReportingProblems
> >>>>
> >>> _______________________________________________
> >>> Linux-HA mailing list
> >>> Linux-HA@lists.linux-ha.org
> >>> http://lists.linux-ha.org/mailman/listinfo/linux-ha
> >>> See also: http://linux-ha.org/ReportingProblems
> >>
> >> ---
> >> Jeff Frost <jeff@pgexperts.com>
> >> CTO, PostgreSQL Experts, Inc.
> >> Phone: 1-888-PG-EXPRT x506
> >> FAX: 415-762-5122
> >> http://www.pgexperts.com/
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >> _______________________________________________
> >> Linux-HA mailing list
> >> Linux-HA@lists.linux-ha.org
> >> http://lists.linux-ha.org/mailman/listinfo/linux-ha
> >> See also: http://linux-ha.org/ReportingProblems
> >>
> > _______________________________________________
> > Linux-HA mailing list
> > Linux-HA@lists.linux-ha.org
> > http://lists.linux-ha.org/mailman/listinfo/linux-ha
> > See also: http://linux-ha.org/ReportingProblems
>
> ---
> Jeff Frost <jeff@pgexperts.com>
> CTO, PostgreSQL Experts, Inc.
> Phone: 1-888-PG-EXPRT x506
> FAX: 415-762-5122
> http://www.pgexperts.com/
>
>
>
>
>
>
>
> _______________________________________________
> Linux-HA mailing list
> Linux-HA@lists.linux-ha.org
> http://lists.linux-ha.org/mailman/listinfo/linux-ha
> See also: http://linux-ha.org/ReportingProblems
>
_______________________________________________
Linux-HA mailing list
Linux-HA@lists.linux-ha.org
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems
Re: Attribures was not changed via crm_attribute [ In reply to ]
On 27 Dec 2013, at 3:24 am, Andrey Rogovsky <a.rogovsky@gmail.com> wrote:

> This command help me.
> I return pg cluster in normal state. Thanks a lot.
>
> Now I was reboot a node for test and got this state:
>
> Resource Group: master
> pgsql-master-ip (ocf::heartbeat:IPaddr2): Started b.mydomain.com
> Master/Slave Set: msPostgresql [pgsql]
> Masters: [ b.mydomain.com ]
> Slaves: [ c.mydomain.com ]
> Stopped: [ pgsql:2 ]
> apache-master-ip (ocf::heartbeat:IPaddr2): Started c.mydomain.com
> apache (ocf::heartbeat:apache): Started c.mydomain.com
>
> Node Attributes:
> * Node a.mydomain.com:
> + master-pgsql:2 : -INFINITY
> + pgsql-data-status : DISCONNECT
> + pgsql-status : STOP
> * Node c.mydomain.com:
> + master-pgsql:0 : -INFINITY
> + master-pgsql:2 : -INFINITY
> + pgsql-data-status : SYNC
> + pgsql-status : HS:async
> * Node b.mydomain.com:
> + master-pgsql:0 : 1000
> + master-pgsql:1 : 1000
> + pgsql-data-status : SYNC
> + pgsql-master-baseline : 0000000032000000
> + pgsql-status : PRI
>
> I was maunal sync pgsql from a node to b node and
> remove /var/lib/pgsql/tmp/PGSQL.lock &
> /var/lib/postgresql/9.3/main/recovery.conf on a node.
>
> Now, how to better way ask cluster about migrate master pgsql on a node?


crm_resource --ban --resource msPostgresql --host c.mydomain.com


>
>
>
> 2013/12/25 Jeff Frost <jeff@pgexperts.com>
>
>> So, does this not work:
>>
>> crm_attribute -l reboot -N c.mydomain.com --name "master-pgsql:2"
>> --delete
>>
>> ?
>>
>> On Dec 25, 2013, at 8:27 AM, Andrey Rogovsky <a.rogovsky@gmail.com> wrote:
>>
>>> I run similar commands. But I have unwanted attributes and want to delete
>>> they.
>>>
>>>
>>>
>>> 2013/12/25 Jeff Frost <jeff@pgexperts.com>
>>>
>>>> I usually do something like this on the master I want to bring up:
>>>>
>>>> #!/bin/bash
>>>>
>>>> rm -f /var/lib/pgsql/9.2/data/recovery.conf
>>>> rm -f ~postgres/tmp/PGSQL.lock
>>>> crm_attribute -l reboot -N $(uname -n) -n "pgsql-data-status" -v
>> "LATEST"
>>>> crm_attribute -l reboot -N $(uname -n) -n "master-pgsql" -v "1000"
>>>> crm resource cleanup msPostgresql
>>>> crm resource cleanup master-group
>>>>
>>>>
>>>> On Dec 24, 2013, at 11:45 PM, Andrey Rogovsky <a.rogovsky@gmail.com>
>>>> wrote:
>>>>
>>>>> Thanks a lot! It really help me!
>>>>> Now I have this status:
>>>>> Node Attributes:
>>>>> * Node a.mydomain.com:
>>>>> + master-pgsql:0 : 1000
>>>>> + master-pgsql:1 : -INFINITY
>>>>> + pgsql-data-status : LATEST
>>>>> + pgsql-master-baseline : 000000002F000090
>>>>> + pgsql-status : PRI
>>>>> * Node c.mydomain.com:
>>>>> + master-pgsql:0 : 1000
>>>>> + master-pgsql:2 : -INFINITY
>>>>> + pgsql-data-status : SYNC
>>>>> + pgsql-status : STOP
>>>>> * Node b.mydomain.com:
>>>>> + master-pgsql:0 : 1000
>>>>> + master-pgsql:1 : -INFINITY
>>>>> + pgsql-data-status : SYNC
>>>>> + pgsql-status : STOP
>>>>>
>>>>> I can begin start pgsql replication, but don't like this:
>>>>> + master-pgsql:1 : -INFINITY
>>>>> + master-pgsql:2 : -INFINITY
>>>>> I want removie this attributes. I try run:
>>>>> root@b:~# crm_attribute -N c.mydomain.com --name "master-pgsql:2"
>>>> --delete
>>>>> And got answer: Error performing operation: cib object missing
>>>>>
>>>>> May be I miss something... How I can delete unwanted attribuies?
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> 2013/12/24 Jeff Frost <jeff@pgexperts.com>
>>>>>
>>>>>>
>>>>>> On Dec 23, 2013, at 9:47 PM, Andrey Rogovsky <a.rogovsky@gmail.com>
>>>> wrote:
>>>>>>
>>>>>>> crm_attribute -l forever -N a.mydomain.com -n "pgsql-data-status" -v
>>>>>>> "LATEST"
>>>>>>> crm_attribute -l forever -N b.mydomain.com -n "pgsql-data-status" -v
>>>>>> "SYNC"
>>>>>>> crm_attribute -l forever -N c.mydomain.com -n "pgsql-data-status" -v
>>>>>> "SYNC"
>>>>>>
>>>>>>
>>>>>> Try:
>>>>>>
>>>>>> crm_attribute -l reboot
>>>>>>
>>>>>> instead of -l forever
>>>>>>
>>>>>> ---
>>>>>> Jeff Frost <jeff@pgexperts.com>
>>>>>> CTO, PostgreSQL Experts, Inc.
>>>>>> Phone: 1-888-PG-EXPRT x506
>>>>>> FAX: 415-762-5122
>>>>>> http://www.pgexperts.com/
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>> Linux-HA mailing list
>>>>>> Linux-HA@lists.linux-ha.org
>>>>>> http://lists.linux-ha.org/mailman/listinfo/linux-ha
>>>>>> See also: http://linux-ha.org/ReportingProblems
>>>>>>
>>>>> _______________________________________________
>>>>> Linux-HA mailing list
>>>>> Linux-HA@lists.linux-ha.org
>>>>> http://lists.linux-ha.org/mailman/listinfo/linux-ha
>>>>> See also: http://linux-ha.org/ReportingProblems
>>>>
>>>> ---
>>>> Jeff Frost <jeff@pgexperts.com>
>>>> CTO, PostgreSQL Experts, Inc.
>>>> Phone: 1-888-PG-EXPRT x506
>>>> FAX: 415-762-5122
>>>> http://www.pgexperts.com/
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> Linux-HA mailing list
>>>> Linux-HA@lists.linux-ha.org
>>>> http://lists.linux-ha.org/mailman/listinfo/linux-ha
>>>> See also: http://linux-ha.org/ReportingProblems
>>>>
>>> _______________________________________________
>>> Linux-HA mailing list
>>> Linux-HA@lists.linux-ha.org
>>> http://lists.linux-ha.org/mailman/listinfo/linux-ha
>>> See also: http://linux-ha.org/ReportingProblems
>>
>> ---
>> Jeff Frost <jeff@pgexperts.com>
>> CTO, PostgreSQL Experts, Inc.
>> Phone: 1-888-PG-EXPRT x506
>> FAX: 415-762-5122
>> http://www.pgexperts.com/
>>
>>
>>
>>
>>
>>
>>
>> _______________________________________________
>> Linux-HA mailing list
>> Linux-HA@lists.linux-ha.org
>> http://lists.linux-ha.org/mailman/listinfo/linux-ha
>> See also: http://linux-ha.org/ReportingProblems
>>
> _______________________________________________
> Linux-HA mailing list
> Linux-HA@lists.linux-ha.org
> http://lists.linux-ha.org/mailman/listinfo/linux-ha
> See also: http://linux-ha.org/ReportingProblems