From d0f80914a088e5081547db291d16900ab10ca740 Mon Sep 17 00:00:00 2001 From: lguohan Date: Sun, 22 Mar 2020 10:19:39 -0700 Subject: [PATCH] Revert "add support for MCLAG (#453)" (#849) This reverts commit 8aea564f53d4a78bae7b6481ecb3167b541e8885. --- config/main.py | 41 ----------------------------------------- scripts/fast-reboot | 18 ------------------ 2 files changed, 59 deletions(-) diff --git a/config/main.py b/config/main.py index 820d4085e690..94ca98741fc7 100755 --- a/config/main.py +++ b/config/main.py @@ -409,14 +409,6 @@ def _abort_if_false(ctx, param, value): if not value: ctx.abort() -def _get_optional_services(): - config_db = ConfigDBConnector() - config_db.connect() - optional_services_dict = config_db.get_table('FEATURE') - if not optional_services_dict: - return None - return optional_services_dict.keys() - def _stop_services(): # on Mellanox platform pmon is stopped by syncd services_to_stop = [ @@ -447,17 +439,6 @@ def _stop_services(): log_error("Stopping {} failed with error {}".format(service, e)) raise - # For optional services they don't start by default - for service in _get_optional_services(): - (out, err) = run_command("systemctl status {}".format(service), return_output = True) - if not err and 'Active: active (running)' in out: - try: - click.echo("Stopping service {} ...".format(service)) - run_command("systemctl stop {}".format(service)) - except SystemExit as e: - log_error("Stopping {} failed with error {}".format(service, e)) - raise - def _reset_failed_services(): services_to_reset = [ 'bgp', @@ -493,17 +474,6 @@ def _reset_failed_services(): log_error("Failed to reset failed status for service {}".format(service)) raise - # For optional services they don't start by default - for service in _get_optional_services(): - (out, err) = run_command("systemctl is-enabled {}".format(service), return_output = True) - if not err and 'enabled' in out: - try: - click.echo("Resetting failed status for service {} ...".format(service)) - run_command("systemctl reset-failed {}".format(service)) - except SystemExit as e: - log_error("Failed to reset failed status for service {}".format(service)) - raise - def _restart_services(): # on Mellanox platform pmon is started by syncd services_to_restart = [ @@ -538,17 +508,6 @@ def _restart_services(): log_error("Restart {} failed with error {}".format(service, e)) raise - # For optional services they don't start by default - for service in _get_optional_services(): - (out, err) = run_command("systemctl is-enabled {}".format(service), return_output = True) - if not err and 'enabled' in out: - try: - click.echo("Restarting service {} ...".format(service)) - run_command("systemctl restart {}".format(service)) - except SystemExit as e: - log_error("Restart {} failed with error {}".format(service, e)) - raise - def is_ipaddress(val): """ Validate if an entry is a valid IP """ if not val: diff --git a/scripts/fast-reboot b/scripts/fast-reboot index 02c035001b64..faea099806cf 100755 --- a/scripts/fast-reboot +++ b/scripts/fast-reboot @@ -430,24 +430,6 @@ debug "Stopped bgp ..." docker kill lldp &> /dev/null || debug "Docker lldp is not running ($?) ..." systemctl stop lldp -if [[ "$REBOOT_TYPE" = "fast-reboot" ]]; then - if echo $(docker ps) | grep -q iccpd; then - docker kill iccpd > /dev/null || [ $? == 1 ] - fi -fi - -# Stop iccpd gracefully -if [[ "$REBOOT_TYPE" = "warm-reboot" || "$REBOOT_TYPE" = "fastfast-reboot" ]]; then - if echo $(docker ps) | grep -q iccpd; then - debug "Stopping iccpd ..." - # Send USR1 signal to iccpd to stop it - # It will prepare iccpd for warm-reboot - # Note: We must send USR1 signal before syncd, or some state of iccpd maybe lost - docker exec -i iccpd pkill -USR1 iccpd || [ $? == 1 ] > /dev/null - debug "Stopped iccpd ..." - fi -fi - if [[ "$REBOOT_TYPE" = "fast-reboot" ]]; then # Kill teamd processes inside of teamd container with SIGUSR2 to allow them to send last LACP frames # We call `docker kill teamd` to ensure the container stops as quickly as possible,