Skip to content

Conversation

@khattori
Copy link

@khattori khattori commented Jul 2, 2021

In pacemaker-2.1.0, the --get-value option of the crm_master command now fails if no argument is passed.
This has caused the problem in issue #194.

In this PR, the problem is solved by using the --query option instead of the --get-value option.

@ioguix
Copy link
Member

ioguix commented Jul 16, 2021

Hi,

As reported in #194, this is not the (only?) root case of the issue. I'm waiting for some more investigation before we can settle an appropriate fix.

Thanks for your help, stay tuned!

Regards,

@ioguix
Copy link
Member

ioguix commented Jul 16, 2021

We discussed the --get-value issue on pacemaker IRC chan. The argument is deprecated, but it seems this behavior is a regression as well.

Upstream is taking care of both bugs (--get-value and negative scores).

I'll keep this PR open if you don't mind. I might push some commits on this branch before merging.

Thanks

$node_arg = sprintf '--node "%s"', $node if defined $node and $node ne '';

$score = qx{ $CRM_MASTER --quiet --get-value $node_arg 2> /dev/null };
$score = qx{ $CRM_MASTER --quiet --query $node_arg 2> /dev/null };
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, looks good

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants