def downgrade_node(upd, with_testing, exception, *args, **kwargs): # 00084_update.py helpers.install_package('kernel-'+old_version, action='upgrade') helpers.install_package('kernel-tools-'+old_version, action='upgrade') helpers.install_package('kernel-tools-libs-'+old_version, action='upgrade') helpers.install_package('kernel-headers-'+old_version, action='upgrade') helpers.install_package('kernel-devel-'+old_version, action='upgrade') helpers.reboot_node(upd)
def downgrade_node(upd, with_testing, exception, *args, **kwargs): # === 00132_update.py === install_package('kernel-' + u132_old_version, action='upgrade') install_package('kernel-tools-' + u132_old_version, action='upgrade') install_package('kernel-tools-libs-' + u132_old_version, action='upgrade') install_package('kernel-headers-' + u132_old_version, action='upgrade') install_package('kernel-devel-' + u132_old_version, action='upgrade') reboot_node(upd)
def _master_k8s_node(): helpers.install_package(CONNTRACK_PACKAGE) helpers.local('systemctl reenable kube-proxy') helpers.restart_service('kube-proxy')
def _master_firewalld(): helpers.local('systemctl stop firewalld') helpers.local('systemctl disable firewalld') helpers.install_package('firewalld', action='remove') helpers.local('systemctl daemon-reload')
def _master_flannel(): for cmd in RM_FLANNEL_COMMANDS_MASTER: helpers.local(cmd) helpers.install_package('flannel', action='remove') helpers.local('systemctl daemon-reload')
def downgrade(cls, upd): upd.print_log('Downgrade influxdb...') helpers.install_package('influxdb', 'downgrade')
def upgrade(upd, with_testing, *args, **kwargs): helpers.install_package('kuberdock', with_testing) helpers.upgrade_db(revision='head')
ybase = prepare_repos(args.use_testing) new_kuberdocks = [] if res and not args.reinstall else [ args.local ] else: new_kuberdocks = get_kuberdocks_toinstall(args.use_testing) if new_kuberdocks: pkg = new_kuberdocks[0] if not args.reinstall: print( 'Newer kuberdock package is available: {}'.format(pkg)) if ask_upgrade(): if pre_upgrade(): sys.exit(3) err = helpers.install_package( pkg, args.use_testing, action='reinstall' if args.reinstall else 'install') if err: post_upgrade( for_successful=False, reason="Update package to {0} has failed.".format( pkg)) sys.exit(err) # Now, after successfully upgraded master package: open(settings.UPDATES_RELOAD_LOCK_FILE, 'a').close() print 'Restarting this script from new package...' os.execv(__file__, sys.argv + [CLI_COMMANDS.after_reload]) else: print 'Stop upgrading.' sys.exit(0) else:
def upgrade(upd, with_testing, *args, **kwargs): helpers.install_package('kubernetes-master-1.0.3', with_testing) helpers.restart_master_kubernetes()