Conversation
- add support for promotable variables - dont fail during validate-all action if notify != true (to avoid error and future fails during `pcs resource create`) - report NOT_RUNNING during probe-action when no database has been created or postgresql is not installed
ioguix
left a comment
There was a problem hiding this comment.
Hi,
Thanks for your patch.
As requested, I need some explanations for some of your change. Not sure why you need to ignore various test during the probe operation. If you don't want Pacemaker to check for PostgreSQL instance on some node, you probably want a rule to forbid it with resource-discovery=never set.
I agree the agent should not check everything during all actions. This is a long overdue fix. It would have been easier to discuss and merge this if that would have been a separate patch and PR though.
Same for OCF_RESKEY_CRM_meta_promoted_max changes.
| # Pacemaker will give up before us and take decisions | ||
| my $timeout = ( _get_action_timeout() || 60*60*24 ) + 60; | ||
| my $rc = _runas( $PGISREADY, '-h', $pghost, '-p', $pgport, '-d', 'postgres', '-t', $timeout ); | ||
| my $rc = _runas( $PGISREADY, '-q', '-h', $pghost, '-p', $pgport, '-d', 'postgres', '-t', $timeout ); |
There was a problem hiding this comment.
What the point of making pg_isready quiet?
I like having messages in debug level and there's very few messages from this in notice level…
There was a problem hiding this comment.
I dont remember, but it might have been due to errors with if()'s expecting an int instead of a string.
|
|
||
| ocf_exit_reason( 'Could not read all datas from controldata file for "%s"', | ||
| $datadir ); | ||
| if ( ! ocf_is_probe() ) { |
There was a problem hiding this comment.
Could you explain or comment in code why you want to avoid to exit with an error during probe action?
There was a problem hiding this comment.
Because the probe-action is run to identify whether the resource is running or not e.g. when you create a resource, and should report not running and not errors, so the cluster doesnt start fencing nodes if you run e.g. pcs resource create --disabled ... to be able to run debug-* actions or similar, or if you ban the resource from a node where the database isnt setup or present.
pcs resource create)