CouchDB RA - added replication more then one database, please review RA. #23

Closed
wants to merge 8 commits into
from

Conversation

Projects
None yet
4 participants
@fghaas

This comment has been minimized.

Show comment
Hide comment
@fghaas

fghaas Jun 16, 2011

Before getting into this: this agent should live in heartbeat/. Don't invent your own testing directory.

fghaas commented on e817e5a Jun 16, 2011

Before getting into this: this agent should live in heartbeat/. Don't invent your own testing directory.

@fghaas

This comment has been minimized.

Show comment
Hide comment
@fghaas

fghaas Jun 16, 2011

This is no longer in line with current upstream. Check how the other RAs in heartbeat/ are doing this.

This is no longer in line with current upstream. Check how the other RAs in heartbeat/ are doing this.

This comment has been minimized.

Show comment
Hide comment
@rnz

rnz Jun 16, 2011

Owner

I know, but in Ubuntu Server 11.04 use old line, and i use testing dir for my convenience... It fix later...

Owner

rnz replied Jun 16, 2011

I know, but in Ubuntu Server 11.04 use old line, and i use testing dir for my convenience... It fix later...

This comment has been minimized.

Show comment
Hide comment
@fghaas

fghaas Jun 16, 2011

To make this clear from the start: since you are submitting this for review for upstream inclusion, then this has to be fixed before the review can continue. If you can't spare time for this now, then let us know, but the review will not proceed until you can.

To make this clear from the start: since you are submitting this for review for upstream inclusion, then this has to be fixed before the review can continue. If you can't spare time for this now, then let us know, but the review will not proceed until you can.

@fghaas

This comment has been minimized.

Show comment
Hide comment
@fghaas

fghaas Jun 16, 2011

how about [ -z "$OCF_RESKEY_username" ] ?

how about [ -z "$OCF_RESKEY_username" ] ?

@fghaas

This comment has been minimized.

Show comment
Hide comment
@fghaas

fghaas Jun 16, 2011

This log message is likely to be confusing.

This log message is likely to be confusing.

@fghaas

This comment has been minimized.

Show comment
Hide comment
@fghaas

fghaas Jun 16, 2011

The binary is named couchdb, the RA name is couchdbctrl. They should agree.

The binary is named couchdb, the RA name is couchdbctrl. They should agree.

@fghaas

This comment has been minimized.

Show comment
Hide comment
@fghaas

fghaas Jun 16, 2011

Use HA_RSCTMP, not HA_VARRUN.

Use HA_RSCTMP, not HA_VARRUN.

@fghaas

This comment has been minimized.

Show comment
Hide comment
@fghaas

fghaas Jun 16, 2011

Duplicate parameter.

Duplicate parameter.

@fghaas

This comment has been minimized.

Show comment
Hide comment
@fghaas

fghaas Jun 16, 2011

Should be boolean.

Should be boolean.

This comment has been minimized.

Show comment
Hide comment
@rnz

rnz Jun 16, 2011

Owner

I did not think to lay out the parameters of replication, because they are transmitted CURL as JSON argument to the server:
{"source":"http://admin:pass@remoteserver:port/dbname", "target":"http://admin:pass@127.0.0.1:port/dbname", "continuous":true}

Owner

rnz replied Jun 16, 2011

I did not think to lay out the parameters of replication, because they are transmitted CURL as JSON argument to the server:
{"source":"http://admin:pass@remoteserver:port/dbname", "target":"http://admin:pass@127.0.0.1:port/dbname", "continuous":true}

@fghaas

This comment has been minimized.

Show comment
Hide comment
@fghaas

fghaas Jun 16, 2011

Should be integer.

Should be integer.

@fghaas

This comment has been minimized.

Show comment
Hide comment
@fghaas

fghaas Jun 16, 2011

Following precedent set by other RAs, it's OK to name this just "pid".

Following precedent set by other RAs, it's OK to name this just "pid".

@fghaas

This comment has been minimized.

Show comment
Hide comment
@fghaas

fghaas Jun 16, 2011

Bad idea. What you want to do instead is set timeouts on the stop operations, which the RA can then access via the OCF_RESKEY_CRM_meta_timeout envar during stop.

Bad idea. What you want to do instead is set timeouts on the stop operations, which the RA can then access via the OCF_RESKEY_CRM_meta_timeout envar during stop.

@fghaas

This comment has been minimized.

Show comment
Hide comment
@fghaas

fghaas Jun 16, 2011

You probably want to make cmd a local variable.

You probably want to make cmd a local variable.

@fghaas

This comment has been minimized.

Show comment
Hide comment
@fghaas

fghaas Jun 16, 2011

Kill this if block. Use ocf_run instead.

Kill this if block. Use ocf_run instead.

@fghaas

This comment has been minimized.

Show comment
Hide comment
@fghaas

fghaas Jun 16, 2011

Pointless. Use ocf_run below instead and you'll get all the logging you need.

Pointless. Use ocf_run below instead and you'll get all the logging you need.

@fghaas

This comment has been minimized.

Show comment
Hide comment
@fghaas

fghaas Jun 16, 2011

Again, use ocf_run and you'll avoid this useless log message.

Again, use ocf_run and you'll avoid this useless log message.

@fghaas

This comment has been minimized.

Show comment
Hide comment
@fghaas

fghaas Jun 16, 2011

Pointless convenience function. Just open-code exit $OCF_ERR_<errcode> when you need it.

Pointless convenience function. Just open-code exit $OCF_ERR_<errcode> when you need it.

@fghaas

This comment has been minimized.

Show comment
Hide comment
@fghaas

fghaas Jun 16, 2011

Why are you jumping through hoops here? If you can't figure out the correct pid, it's better to fail rather than guessing what the correct pid is and potentially killing the wrong instance.

Why are you jumping through hoops here? If you can't figure out the correct pid, it's better to fail rather than guessing what the correct pid is and potentially killing the wrong instance.

@fghaas

This comment has been minimized.

Show comment
Hide comment
@fghaas

fghaas Jun 16, 2011

Commented-out code blocks make a review needlessly tedious. Just remove those when you submit for review.

Commented-out code blocks make a review needlessly tedious. Just remove those when you submit for review.

@fghaas

This comment has been minimized.

Show comment
Hide comment
@fghaas

fghaas Jun 16, 2011

Again, ocf_run.

Again, ocf_run.

@fghaas

This comment has been minimized.

Show comment
Hide comment
@fghaas

fghaas Jun 16, 2011

This stopgracetime thing is, as pointed out above, useless. Just loop on monitor after stop, and let the cluster manager time you out. Check OCF RA dev guide for examples.

This stopgracetime thing is, as pointed out above, useless. Just loop on monitor after stop, and let the cluster manager time you out. Check OCF RA dev guide for examples.

This comment has been minimized.

Show comment
Hide comment
@rnz

rnz Jun 16, 2011

Owner

"Check OCF RA dev guide for examples" - where is it? https://github.com/ClusterLabs/resource-agents/blob/master/heartbeat/Dummy ?

Owner

rnz replied Jun 16, 2011

"Check OCF RA dev guide for examples" - where is it? https://github.com/ClusterLabs/resource-agents/blob/master/heartbeat/Dummy ?

This comment has been minimized.

Show comment
Hide comment
Owner

rnz replied Jun 16, 2011

@fghaas

This comment has been minimized.

Show comment
Hide comment
@fghaas

fghaas Jun 16, 2011

suggest to use "ocf_run rm -vf" here

suggest to use "ocf_run rm -vf" here

@fghaas

This comment has been minimized.

Show comment
Hide comment
@fghaas

fghaas Jun 16, 2011

Here too.

Here too.

@fghaas

This comment has been minimized.

Show comment
Hide comment
@fghaas

fghaas Jun 16, 2011

Again, commented-out code block. Either fix this, or kill it.

Again, commented-out code block. Either fix this, or kill it.

@fghaas

This comment has been minimized.

Show comment
Hide comment
@fghaas

fghaas Jun 16, 2011

Use check_binary.

Use check_binary.

@fghaas

This comment has been minimized.

Show comment
Hide comment
@fghaas

fghaas Jun 16, 2011

Can you please rephrase your log messages so they're helpful for people other than you?

Can you please rephrase your log messages so they're helpful for people other than you?

@fghaas

This comment has been minimized.

Show comment
Hide comment
@fghaas

fghaas Jun 16, 2011

What? Explain please.

What? Explain please.

@fghaas

This comment has been minimized.

Show comment
Hide comment
@fghaas

fghaas Jun 16, 2011

That's assuming there will ever only be one instance of one couchdb resource running on any node. I doubt that that's a valid assumption.

That's assuming there will ever only be one instance of one couchdb resource running on any node. I doubt that that's a valid assumption.

This comment has been minimized.

Show comment
Hide comment
@rnz

rnz Jun 16, 2011

Owner

if respawntimeout > 0 : couchdb may autorestart and pid changing...

Owner

rnz replied Jun 16, 2011

if respawntimeout > 0 : couchdb may autorestart and pid changing...

This comment has been minimized.

Show comment
Hide comment
@fghaas

fghaas Jun 16, 2011

It is not a good idea to have anything outside the cluster manager restart the resource. Make sure couchdb does not automatically restart. It's Pacemaker's job to detect resource failure and recover from it.

It is not a good idea to have anything outside the cluster manager restart the resource. Make sure couchdb does not automatically restart. It's Pacemaker's job to detect resource failure and recover from it.

This comment has been minimized.

Show comment
Hide comment
@rnz

rnz Jun 16, 2011

Owner

ok: respawntimeout = 0 always

Owner

rnz replied Jun 16, 2011

ok: respawntimeout = 0 always

@fghaas

This comment has been minimized.

Show comment
Hide comment
@fghaas

fghaas Jun 16, 2011

As noted above, I think this should be a boolean, and if so it should be tested with ocf_is_true.

As noted above, I think this should be a boolean, and if so it should be tested with ocf_is_true.

@fghaas

This comment has been minimized.

Show comment
Hide comment
@fghaas

fghaas Jun 16, 2011

That's definitely an OCF_ERR_PERM.

That's definitely an OCF_ERR_PERM.

@fghaas

This comment has been minimized.

Show comment
Hide comment
@fghaas

fghaas Jun 16, 2011

ocf-shellfuncs already sets this default.

ocf-shellfuncs already sets this default.

@fghaas

This comment has been minimized.

Show comment
Hide comment
@fghaas

fghaas Jun 16, 2011

No no no no no! You're not reversing a built in default for a meta variable.

No no no no no! You're not reversing a built in default for a meta variable.

@fghaas

This comment has been minimized.

Show comment
Hide comment
@fghaas

fghaas Jun 16, 2011

What are you doing here? Have you understood the concept of anonymous and non-anonymous clones?

What are you doing here? Have you understood the concept of anonymous and non-anonymous clones?

@fghaas

This comment has been minimized.

Show comment
Hide comment
@fghaas

fghaas Jun 16, 2011

HA_RSCTMP again, and what if the user chooses to override the default?

HA_RSCTMP again, and what if the user chooses to override the default?

@dmuhamedagic

This comment has been minimized.

Show comment
Hide comment
@dmuhamedagic

dmuhamedagic May 8, 2012

Contributor

Nothing moving here for quite a while. Where did you get stuck?

Contributor

dmuhamedagic commented May 8, 2012

Nothing moving here for quite a while. Where did you get stuck?

@ghost ghost assigned fghaas Oct 30, 2012

@dmuhamedagic

This comment has been minimized.

Show comment
Hide comment
@dmuhamedagic

dmuhamedagic Oct 30, 2012

Contributor

Still stuck? Can somebody update status? @fghaas, can this RA be included?

Contributor

dmuhamedagic commented Oct 30, 2012

Still stuck? Can somebody update status? @fghaas, can this RA be included?

@fghaas

This comment has been minimized.

Show comment
Hide comment
@fghaas

fghaas Oct 30, 2012

Member

Not a clue. Specifically since 53f3ee9 seems to be a near-complete rewrite.

Member

fghaas commented Oct 30, 2012

Not a clue. Specifically since 53f3ee9 seems to be a near-complete rewrite.

@dmuhamedagic

This comment has been minimized.

Show comment
Hide comment
@dmuhamedagic

dmuhamedagic Jan 2, 2015

Contributor

@rnz any news here?

Contributor

dmuhamedagic commented Jan 2, 2015

@rnz any news here?

@dmuhamedagic

This comment has been minimized.

Show comment
Hide comment
@dmuhamedagic

dmuhamedagic Nov 24, 2015

Contributor

Seems like nobody cares about this one anymore. Will close next week if nobody comments.

Contributor

dmuhamedagic commented Nov 24, 2015

Seems like nobody cares about this one anymore. Will close next week if nobody comments.

@krig

This comment has been minimized.

Show comment
Hide comment
@krig

krig Feb 22, 2016

Member

Since there hasn't been any update since November, I am closing this.

Member

krig commented Feb 22, 2016

Since there hasn't been any update since November, I am closing this.

@krig krig closed this Feb 22, 2016

ytakeshita pushed a commit to ytakeshita/resource-agents that referenced this pull request Dec 8, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment