Skip to content

Commit

Permalink
Update paths to reflect new sonic-utilities install location, /usr/lo…
Browse files Browse the repository at this point in the history
…cal/bin/ (#2247)

As of sonic-net/sonic-buildimage#5409, sonic-utilities is now being installed as a Python wheel package. As such, the installation path for scripts/entrypoints has changed from /usr/bin/ to /usr/local/bin. This PR aligns sonic-mgmt code with those changes by updating all references to sonic-utilities scripts/entrypoints to either reference the new /usr/local/bin/ location or remove absolute path entirely where applicable.
  • Loading branch information
jleveque committed Sep 22, 2020
1 parent 507c41c commit 30faf0c
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 5 deletions.
4 changes: 2 additions & 2 deletions ansible/vars/configlet/t1-64-lag-clet/apply_clet.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@

# Sleep to let all BGP sessions go up & running before adding a T0
sleep 1m
/usr/bin/configlet -j /etc/sonic/clet-to_clear.json -d
/usr/bin/configlet -j /etc/sonic/clet-add.json -u
configlet -j /etc/sonic/clet-to_clear.json -d
configlet -j /etc/sonic/clet-add.json -u
21 changes: 18 additions & 3 deletions tests/scripts/fast-reboot
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,14 @@ FORCE=no
STRICT=no
REBOOT_METHOD="/sbin/kexec -e"
ASSISTANT_IP_LIST=""
ASSISTANT_SCRIPT="/usr/bin/neighbor_advertiser"
ASSISTANT_SCRIPT="/usr/local/bin/neighbor_advertiser"

# To maintain backward-compatibility with 201911 branch, when sonic-utilities
# was intalled as a Debian package, not a Python wheel.
# TODO: Remove this check once no longer necessary
if [[ ! -f ${ASSISTANT_SCRIPT} ]]; then
ASSISTANT_SCRIPT="/usr/bin/neighbor_advertiser"
fi

# Require 100M available on the hard drive for warm reboot temp files,
# Size is in 1K blocks:
Expand Down Expand Up @@ -263,7 +270,15 @@ function reboot_pre_check()
fi
# Make sure ASIC configuration has not changed between images
ASIC_CONFIG_CHECK_SCRIPT="/usr/bin/asic_config_check"
ASIC_CONFIG_CHECK_SCRIPT="/usr/local/bin/asic_config_check"
# To maintain backward-compatibility with 201911 branch, when sonic-utilities
# was intalled as a Debian package, not a Python wheel.
# TODO: Remove this check once no longer necessary
if [[ ! -f ${ASIC_CONFIG_CHECK_SCRIPT} ]]; then
ASIC_CONFIG_CHECK_SCRIPT="/usr/bin/asic_config_check"
fi
ASIC_CONFIG_CHECK_SUCCESS=0
if [[ "$REBOOT_TYPE" = "warm-reboot" || "$REBOOT_TYPE" = "fastfast-reboot" ]]; then
ASIC_CONFIG_CHECK_EXIT_CODE=0
Expand Down Expand Up @@ -382,7 +397,7 @@ if [[ "$REBOOT_TYPE" = "fast-reboot" ]]; then
# into /host/fast-reboot
mkdir -p /host/fast-reboot
FAST_REBOOT_DUMP_RC=0
/usr/bin/fast-reboot-dump.py -t /host/fast-reboot || FAST_REBOOT_DUMP_RC=$?
fast-reboot-dump.py -t /host/fast-reboot || FAST_REBOOT_DUMP_RC=$?
if [[ FAST_REBOOT_DUMP_RC -ne 0 ]]; then
error "Failed to run fast-reboot-dump.py. Exit code: $FAST_REBOOT_DUMP_RC"
unload_kernel
Expand Down

0 comments on commit 30faf0c

Please sign in to comment.