~hloeung/ubuntu-repository-cache/i-really-am-the-leader

« back to all changes in this revision

Viewing changes to lib/ubuntu_repository_cache/mirror.py

  • Committer: Christopher Glass
  • Date: 2017-03-17 12:44:29 UTC
  • mfrom: (214.2.15 ubuntu-repository-cache)
  • Revision ID: christopher.glass@canonical.com-20170317124429-g6607u195kv09rkm
Merge changes from IS's repository.

Show diffs side-by-side

added added

removed removed

Lines of Context:
199
199
        LOG('Leader changed between peer_update_metadata and '
200
200
            '_nonleader_update_metadata', hookenv.WARNING)
201
201
 
 
202
    if leader_id not in rel:
 
203
        # Peers can join in any order and the leader may not have joined yet.
 
204
        # Log who we think is the leader and return until it joins
 
205
        LOG('Leader {} not yet related, can\'t complete '
 
206
            '_nonleader_update_metadata'.format(leader_id))
 
207
        return
 
208
 
202
209
    leader_rel = rel[leader_id]
203
210
 
204
211
    active_ver = util.get_active_metaver()