Skip to content

Commit

Permalink
Update hint information for "peer services"
Browse files Browse the repository at this point in the history
  • Loading branch information
JunhongMao committed May 21, 2024
1 parent 76d0ada commit aa87e55
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions config/chassis_modules.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,13 @@ def fabric_module_set_admin_status(db, chassis_module_name, state):

if state == "down":
for asic in asic_list:
click.echo("Stop swss@{} and syncd@{} services".format(asic, asic))
click.echo("Stop swss@{} and peer services".format(asic))
clicommon.run_command('sudo systemctl stop swss@{}.service'.format(asic))

is_active = subprocess.call(["systemctl", "is-active", "--quiet", "swss@{}.service".format(asic)])

if is_active == 0: # zero active, non-zero, inactive
click.echo("stop swss@{} and syncd@{} services failed".format(asic, asic))
click.echo("Stop swss@{} and peer services failed".format(asic))
return

click.echo("Delete related CAHSSIS_FABRIC_ASIC_TABLE entries")
Expand All @@ -88,13 +88,13 @@ def fabric_module_set_admin_status(db, chassis_module_name, state):
# Start the services in case of the users just execute issue command "systemctl stop swss@/syncd@"
# without bring down the hardware
for asic in asic_list:
click.echo("Start swss@{} and syncd@{} services".format(asic, asic))
click.echo("Start swss@{} and peer services".format(asic))
# To address systemd service restart limit by resetting the count
clicommon.run_command('sudo systemctl reset-failed swss@{}.service'.format(asic))
clicommon.run_command('sudo systemctl start swss@{}.service'.format(asic))
elif state == "up":
for asic in asic_list:
click.echo("Start swss@{} and syncd@{} services".format(asic, asic))
click.echo("Start swss@{} and peer services".format(asic))
clicommon.run_command('sudo systemctl start swss@{}.service'.format(asic))

#
Expand Down

0 comments on commit aa87e55

Please sign in to comment.