We're not having any issues with the VIP moving when it's supposed to. I
don't really understand what the command you suggested does, but it's not
really relevant to our problem. As you say, the problem is that the xml is
missing the node attributes right after the deployment.

Jason

On Wed, Oct 21, 2020 at 7:50 AM Lucas Kanashiro <[email protected]>
wrote:

> Thank you for providing the data Jason! I took a look at it and when you
> ran the following command to move the 'res_pgsql_vip' resource to the
> 'budew' node:
>
> $ sudo crm_resource -M -r res_pgsql_vip -H budew
>
> The resource did not move to the target node (and therefore the master
> pgsql resource was not moved as well). Maybe something related to how
> you deployed it.
>
> Since the operation I proposed did not work (the status of the cluster
> before and after are the same) I am going to consider your xml output is
> missing the attributes you mentioned right after you deploy your cluster
> (using the config you shared in #12). Please correct me if I am wrong
> here.
>
> --
> You received this bug notification because you are a member of Canonical
> Field High, which is subscribed to the bug report.
> https://bugs.launchpad.net/bugs/1900016
>
> Title:
>   pgsql resource agent uses regexes for old crm_mon format, breaks
>   pgsql-status and pgsql-data-status attributes
>
> Status in resource-agents package in Ubuntu:
>   Fix Released
> Status in resource-agents source package in Focal:
>   In Progress
> Status in resource-agents source package in Groovy:
>   Fix Released
>
> Bug description:
>   [Impact]
>
>   resource-agent uses crm_mon to determine node state, however crm_mon's
>   output format differs on bionic and focal which results in invalid
>   status reporting for focal hosts.  This has resulted in, for example,
>   failure when migrating a bionic pgsql node to focal.
>
>
>   [Test Case]
>   TBD
>
>
>   [Regression Potential]
>
>   Since this changes the node status reporting for resource-agents,
>   watch for anything depending on the status information for managing
>   nodes such as issues upgrading software or migrating to new ubuntu
>   releases, or such as web dashboards, etc.
>
>
>   [Fix]
>
>   Upstream appears to have encountered and fixed the issue by adjusting
>   the regex to cover the new line format.  This corresponds to the
>   following upstream commit:
>
>   https://github.com/ClusterLabs/resource-agents/commit/2a56d5b2
>
>
>   [Discussion]
>
>   In groovy's 4.6.1, the issue is fixed a bit differently, by switching
>   to use of crm_mon1200 XML format
>
>
>   [Original Report]
>
>   There is a bug in the resource agent's node_exist function. It looks
>   at crm_mon output, which has changed between bionic and focal.
>
>   The result is that the 'pgsql-status' and 'pgsql-data-status'
>   attributes are missing from crm status --as-xml output on focal.
>
>   Here is the focal output:
>   http://paste.ubuntu.com/p/RrFnPJHWCS/
>
>   Here is the bionic output:
>   http://paste.ubuntu.com/p/NrvqtjJD5r/
>
>   This is the node_exist function:
>
>   node_exist() {
>       print_crm_mon | tr '[A-Z]' '[a-z]' | grep -q "^node $1"
>   }
>
>   It's looking for a line starting with "Node <nodename>".
>
>   That works in bionic, but in focal, it's " * Node <nodename>".
>
>   is_online has the same problem:
>
>   is_node_online() {
>       print_crm_mon | tr '[A-Z]' '[a-z]' | grep -e "^node $1 " -e "^node
> $1:" | grep -q -v "offline"
>   }
>
>   It looks like this is the upstream:
>
> https://github.com/ClusterLabs/resource-agents/blob/master/heartbeat/pgsql
>
>   It's fixed there; they look at crm_mon xml output instead.
>
>   I tested with changing the regex to "node $1:" and it works fine. that
>   could be tightened up a bit to just match "node <nodename>" or "  *
>   node <nodename>", but I'm not sure if we shouldn't just pull in
>   something from upstream so I haven't spent time refining that.
>
>   this is on focal with resource-agents 1:4.5.0-2ubuntu2
>
> To manage notifications about this bug go to:
>
> https://bugs.launchpad.net/ubuntu/+source/resource-agents/+bug/1900016/+subscriptions
>

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1900016

Title:
  pgsql resource agent uses regexes for old crm_mon format, breaks
  pgsql-status and pgsql-data-status attributes

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/resource-agents/+bug/1900016/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to