Comment 2 for bug 1900016

Revision history for this message
Jason Hobbs (jason-hobbs) wrote : Re: pgsql resource agent uses regexes for old crm_mon format, breaks pgsql-status and pgsql-data-status attributes

Here they are with regex that accepts either version:

is_node_online() {
    print_crm_mon | tr '[A-Z]' '[a-z]' | grep -e "^\( \* \)\?node $1 " -e "^\( \* \)\?node $1:" | grep -q -v "offline"
}

node_exist() {
    print_crm_mon | tr '[A-Z]' '[a-z]' | grep -q "^\( \* \)\?node $1"
}