Ejemplo n.º 1
0
 def test_pause_unit_helper(self):
     with mock.patch.object(rabbit_utils, '_pause_resume_helper') as prh:
         rabbit_utils.pause_unit_helper('random-config')
         prh.assert_called_once_with(rabbit_utils.pause_unit,
                                     'random-config')
     with mock.patch.object(rabbit_utils, '_pause_resume_helper') as prh:
         rabbit_utils.resume_unit_helper('random-config')
         prh.assert_called_once_with(rabbit_utils.resume_unit,
                                     'random-config')
 def test_pause_unit_helper(self):
     with mock.patch.object(rabbit_utils, '_pause_resume_helper') as prh:
         rabbit_utils.pause_unit_helper('random-config')
         prh.assert_called_once_with(
             rabbit_utils.pause_unit,
             'random-config')
     with mock.patch.object(rabbit_utils, '_pause_resume_helper') as prh:
         rabbit_utils.resume_unit_helper('random-config')
         prh.assert_called_once_with(
             rabbit_utils.resume_unit,
             'random-config')
def series_upgrade_complete():
    log("Running complete series upgrade hook", "INFO")
    # NOTE(jamespage): If a newer RMQ version is
    # installed and the old style configuration file
    # is still on disk, remove before re-rendering
    # any new configuration.
    if (os.path.exists(rabbit.RABBITMQ_CONFIG)
            and cmp_pkgrevno('rabbitmq-server', '3.7') >= 0):
        os.remove(rabbit.RABBITMQ_CONFIG)
        rabbit.ConfigRenderer(rabbit.CONFIG_FILES()).write_all()
    clear_unit_paused()
    clear_unit_upgrading()
    rabbit.resume_unit_helper(rabbit.ConfigRenderer(rabbit.CONFIG_FILES()))
def series_upgrade_complete():
    log("Running complete series upgrade hook", "INFO")
    clear_unit_paused()
    clear_unit_upgrading()
    rabbit.resume_unit_helper(rabbit.ConfigRenderer(rabbit.CONFIG_FILES))
Ejemplo n.º 5
0
def resume(args):
    """Resume the RabbitMQ services.
    @raises Exception should the service fail to start."""
    resume_unit_helper(ConfigRenderer(CONFIG_FILES))
Ejemplo n.º 6
0
def series_upgrade_complete():
    log("Running complete series upgrade hook", "INFO")
    clear_unit_paused()
    clear_unit_upgrading()
    rabbit.resume_unit_helper(rabbit.ConfigRenderer(rabbit.CONFIG_FILES))