Comment 0 for bug 1807807

Revision history for this message
Xav Paice (xavpaice) wrote :

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')

(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.