[mux]: Call write_standby from host only
Signed-off-by: Lawrence Lee <lawlee@microsoft.com>
This commit is contained in:
parent
5232647b33
commit
fad5ec47b4
@ -27,15 +27,6 @@ stdout_logfile=syslog
|
||||
stderr_logfile=syslog
|
||||
dependent_startup=true
|
||||
|
||||
[program:standby_init]
|
||||
command=/opt/write_standby/bin/write_standby.py
|
||||
priority=2
|
||||
autostart=false
|
||||
autorestart=false
|
||||
startsecs=0
|
||||
dependent_startup=true
|
||||
dependent_startup_wait_for=rsyslogd:running
|
||||
|
||||
[program:linkmgrd]
|
||||
command=nice -n -20 /usr/sbin/linkmgrd -v warning
|
||||
priority=2
|
||||
|
@ -428,9 +428,6 @@ start() {
|
||||
-v /var/run/redis-chassis:/var/run/redis-chassis:ro \
|
||||
-v /usr/share/sonic/device/$PLATFORM/$HWSKU/$DEV:/usr/share/sonic/hwsku:ro \
|
||||
{%- endif %}
|
||||
{%- if docker_container_name == "mux" -%}
|
||||
-v /opt/write_standby/bin:/opt/write_standby/bin:ro \
|
||||
{%- endif -%}
|
||||
$REDIS_MNT \
|
||||
-v /usr/share/sonic/device/$PLATFORM:/usr/share/sonic/platform:ro \
|
||||
{%- if sonic_asic_platform != "mellanox" %}
|
||||
|
@ -9,10 +9,11 @@ StartLimitBurst=3
|
||||
|
||||
[Service]
|
||||
User={{ sonicadmin_user }}
|
||||
ExecStartPre=/usr/local/bin/write_standby.py
|
||||
ExecStartPre=/usr/bin/{{docker_container_name}}.sh start
|
||||
ExecStart=/usr/bin/{{docker_container_name}}.sh wait
|
||||
ExecStop=/usr/bin/{{docker_container_name}}.sh stop
|
||||
ExecStopPost=/opt/write_standby/bin/write_standby.py
|
||||
ExecStopPost=/usr/local/bin/write_standby.py
|
||||
Restart=always
|
||||
RestartSec=30
|
||||
|
||||
|
@ -53,7 +53,6 @@ FILESYSTEM_ROOT_USR_SHARE_SONIC_TEMPLATES="$FILESYSTEM_ROOT_USR_SHARE_SONIC/temp
|
||||
FILESYSTEM_ROOT_USR_SHARE_SONIC_FIRMWARE="$FILESYSTEM_ROOT_USR_SHARE_SONIC/firmware"
|
||||
FILESYSTEM_ROOT_ETC="$FILESYSTEM_ROOT/etc"
|
||||
FILESYSTEM_ROOT_ETC_SONIC="$FILESYSTEM_ROOT_ETC/sonic"
|
||||
FILESYSTEM_ROOT_OPT="$FILESYSTEM_ROOT/opt"
|
||||
|
||||
GENERATED_SERVICE_FILE="$FILESYSTEM_ROOT/etc/sonic/generated_services.conf"
|
||||
|
||||
@ -815,8 +814,7 @@ sudo LANG=C cp $SCRIPTS_DIR/asic_status.py $FILESYSTEM_ROOT/usr/local/bin/asic_s
|
||||
sudo LANG=C cp $SCRIPTS_DIR/sonic-netns-exec $FILESYSTEM_ROOT/usr/bin/sonic-netns-exec
|
||||
|
||||
# Copy write_standby script for mux state
|
||||
sudo LANG=C mkdir -p $FILESYSTEM_ROOT_OPT/write_standby/bin/
|
||||
sudo LANG=C cp $SCRIPTS_DIR/write_standby.py $FILESYSTEM_ROOT_OPT/write_standby/bin/write_standby.py
|
||||
sudo LANG=C cp $SCRIPTS_DIR/write_standby.py $FILESYSTEM_ROOT/usr/local/bin/write_standby.py
|
||||
|
||||
# Copy systemd timer configuration
|
||||
# It implements delayed start of services
|
||||
|
Loading…
Reference in New Issue
Block a user