cluster_series_upgrading always true even if it's false

Bug #1807807 reported by Xav Paice
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
percona-cluster (Juju Charms Collection)
Invalid
Undecided
Unassigned

Bug Description

With the 18.11 release, the introduction of the following code causes the condition to always be true:

    cluster_series_upgrading = leader_get("cluster_series_upgrading")
    if cluster_series_upgrading:
        leader = (leader_get('cluster_series_upgrade_leader') ==
                  get_relation_ip('cluster'))
        leader_ip = leader_get('cluster_series_upgrade_leader')
    else:
        leader = is_leader()
        leader_ip = leader_get('leader-ip')

I couldn't find anything in the post-series-upgrade hook which un-sets cluster_series_upgrading so set that using 'leader-set' but unfortunately that can only set strings.

(Pdb) leader_get("cluster_series_upgrading")
u'False'

Because that's a string, cluster_series_upgrading is in fact true. In my particular bizarre case:

(Pdb) leader_get('cluster_series_upgrade_leader')
u'10.28.2.194'
(Pdb) leader_get('leader-ip')
u'10.28.2.45'

So the leader ends up thinking it's not the leader and bad things happen.

Xav Paice (xavpaice)
description: updated
Revision history for this message
David Ames (thedac) wrote :

For both percona-cluster [0] and rabbitmq-server there is a complete-cluster-series-upgrade action which clears this value. It is mentioned in the documentation [1] but it is easy to miss.

We will consider ways to make this more efficient. But for now this is addressed in the action on purpose.

[0] https://github.com/openstack/charm-percona-cluster/blob/master/actions.yaml#L20
[1] https://docs.openstack.org/project-deploy-guide/charm-deployment-guide/latest/app-series-upgrade.html

Changed in percona-cluster (Juju Charms Collection):
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.