Exemplo n.º 1
0
def series_upgrade_prepare():
    set_unit_upgrading()
    # HA services are shutdown when the unit receives series upgrade
    # notifications from peers so cannot pause services.
    if not is_unit_paused_set() and not is_waiting_unit_series_upgrade_set():
        pause_unit()
    notify_peers_of_series_upgrade()
Exemplo n.º 2
0
 def test_notify_peers_of_series_upgrade(self, lsb_release, local_unit,
                                         relation_ids, relation_set):
     lsb_release.return_value = {'DISTRIB_CODENAME': 'trusty'}
     local_unit.return_value = 'nova-compute/2'
     relation_ids.return_value = ['rid1']
     utils.notify_peers_of_series_upgrade()
     relation_set.assert_called_once_with(
         relation_id='rid1',
         relation_settings={'series_upgrade_of_nova_compute_2': 'trusty'})
Exemplo n.º 3
0
def series_upgrade_prepare():
    set_unit_upgrading()
    # HA services are shutdown when the unit receives series upgrade
    # notifications from peers so cannot pause services.
    if not is_unit_paused_set() and not is_waiting_unit_series_upgrade_set():
        pause_unit()
    notify_peers_of_series_upgrade()
    # mark crmsh package as manually installed
    # so it does not get uninstalled on release upgrade
    # from xenial to bionic
    apt_mark('crmsh', 'manual')
Exemplo n.º 4
0
def series_upgrade_prepare():
    set_unit_upgrading()
    if not is_unit_paused_set():
        pause_unit()
    notify_peers_of_series_upgrade()