コード例 #1
0
ファイル: knox_gateway.py プロジェクト: tsingfu/bigdata
    def pre_upgrade_restart(self, env, upgrade_type=None):
        import params
        env.set_params(params)

        # backup the data directory to /tmp/knox-upgrade-backup/knox-data-backup.tar just in case
        # something happens; Knox is interesting in that they re-generate missing files like
        # keystores which can cause side effects if the upgrade goes wrong
        if params.upgrade_direction and params.upgrade_direction == Direction.UPGRADE:
            absolute_backup_dir = upgrade.backup_data()
            Logger.info("Knox data was successfully backed up to {0}".format(
                absolute_backup_dir))

        install_knox()
        # seed the new Knox data directory with the keystores of yesteryear
        if params.upgrade_direction == Direction.UPGRADE:
            upgrade.seed_current_data_directory()
コード例 #2
0
  def pre_upgrade_restart(self, env, upgrade_type=None):
    import params
    env.set_params(params)

    # backup the data directory to /tmp/knox-upgrade-backup/knox-data-backup.tar just in case
    # something happens; Knox is interesting in that they re-generate missing files like
    # keystores which can cause side effects if the upgrade goes wrong
    if params.upgrade_direction and params.upgrade_direction == Direction.UPGRADE:
      absolute_backup_dir = upgrade.backup_data()
      Logger.info("Knox data was successfully backed up to {0}".format(absolute_backup_dir))

    # <conf-selector-tool> will change the symlink to the conf folder.
    conf_select.select(params.stack_name, "knox", params.version)
    stack_select.select("knox-server", params.version)

    # seed the new Knox data directory with the keystores of yesteryear
    if params.upgrade_direction == Direction.UPGRADE:
      upgrade.seed_current_data_directory()