[pfcwd]: add flag to enable pfc wd on start (#1429)
This commit is contained in:
parent
b2518c8310
commit
7639cc1b53
3
Makefile
3
Makefile
@ -8,6 +8,8 @@
|
|||||||
# * ENABLE_DHCP_GRAPH_SERVICE: Enables get-graph service to fetch minigraph files
|
# * ENABLE_DHCP_GRAPH_SERVICE: Enables get-graph service to fetch minigraph files
|
||||||
# through http.
|
# through http.
|
||||||
# * SHUTDOWN_BGP_ON_START: Sets admin-down state for all bgp peerings after restart.
|
# * SHUTDOWN_BGP_ON_START: Sets admin-down state for all bgp peerings after restart.
|
||||||
|
# * ENABLE_PFCWD_ON_START: Enable PFC Watchdog (PFCWD) on server-facing ports
|
||||||
|
# * by default for TOR switch.
|
||||||
# * SONIC_ENABLE_SYNCD_RPC: Enables rpc-based syncd builds.
|
# * SONIC_ENABLE_SYNCD_RPC: Enables rpc-based syncd builds.
|
||||||
# * USERNAME: Desired username -- default at rules/config
|
# * USERNAME: Desired username -- default at rules/config
|
||||||
# * PASSWORD: Desired password -- default at rules/config
|
# * PASSWORD: Desired password -- default at rules/config
|
||||||
@ -62,6 +64,7 @@ SONIC_BUILD_INSTRUCTION := make \
|
|||||||
BUILD_NUMBER=$(BUILD_NUMBER) \
|
BUILD_NUMBER=$(BUILD_NUMBER) \
|
||||||
ENABLE_DHCP_GRAPH_SERVICE=$(ENABLE_DHCP_GRAPH_SERVICE) \
|
ENABLE_DHCP_GRAPH_SERVICE=$(ENABLE_DHCP_GRAPH_SERVICE) \
|
||||||
SHUTDOWN_BGP_ON_START=$(SHUTDOWN_BGP_ON_START) \
|
SHUTDOWN_BGP_ON_START=$(SHUTDOWN_BGP_ON_START) \
|
||||||
|
SONIC_ENABLE_PFCWD_ON_START=$(ENABLE_PFCWD_ON_START) \
|
||||||
ENABLE_SYNCD_RPC=$(ENABLE_SYNCD_RPC) \
|
ENABLE_SYNCD_RPC=$(ENABLE_SYNCD_RPC) \
|
||||||
PASSWORD=$(PASSWORD) \
|
PASSWORD=$(PASSWORD) \
|
||||||
USERNAME=$(USERNAME) \
|
USERNAME=$(USERNAME) \
|
||||||
|
@ -168,6 +168,10 @@ sudo bash -c "echo enabled=false > $FILESYSTEM_ROOT/etc/sonic/updategraph.conf"
|
|||||||
{% if shutdown_bgp_on_start == "y" %}
|
{% if shutdown_bgp_on_start == "y" %}
|
||||||
sudo bash -c "echo '{ \"DEVICE_METADATA\": { \"localhost\": { \"default_bgp_status\": \"down\" } } }' >> $FILESYSTEM_ROOT/etc/sonic/init_cfg.json"
|
sudo bash -c "echo '{ \"DEVICE_METADATA\": { \"localhost\": { \"default_bgp_status\": \"down\" } } }' >> $FILESYSTEM_ROOT/etc/sonic/init_cfg.json"
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% if enable_pfcwd_on_start == "y" %}
|
||||||
|
sudo bash -c "echo '{ \"DEVICE_METADATA\": { \"localhost\": { \"default_pfcwd_status\": \"enable\" } } }' >> $FILESYSTEM_ROOT/etc/sonic/init_cfg.json"
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
# Copy SNMP configuration files
|
# Copy SNMP configuration files
|
||||||
sudo cp $IMAGE_CONFIGS/snmp/snmp.yml $FILESYSTEM_ROOT/etc/sonic/
|
sudo cp $IMAGE_CONFIGS/snmp/snmp.yml $FILESYSTEM_ROOT/etc/sonic/
|
||||||
|
|
||||||
|
@ -36,6 +36,10 @@ DEFAULT_PASSWORD = YourPaSsWoRd
|
|||||||
# bgp service starts.
|
# bgp service starts.
|
||||||
# SHUTDOWN_BGP_ON_START = y
|
# SHUTDOWN_BGP_ON_START = y
|
||||||
|
|
||||||
|
# ENABLE_PFCWD_ON_START - if set to y PFC Watchdog (PFCWD) will be enabled all server-facing ports
|
||||||
|
# by default for TOR switch
|
||||||
|
# ENABLE_PFCWD_ON_START = y
|
||||||
|
|
||||||
# SONIC_CONFIG_DEBUG - install debug packages
|
# SONIC_CONFIG_DEBUG - install debug packages
|
||||||
# Uncomment next line to enable:
|
# Uncomment next line to enable:
|
||||||
# SONIC_CONFIG_DEBUG = y
|
# SONIC_CONFIG_DEBUG = y
|
||||||
|
6
slave.mk
6
slave.mk
@ -59,6 +59,10 @@ list :
|
|||||||
## Include other rules
|
## Include other rules
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
|
ifeq ($(SONIC_ENABLE_PFCWD_ON_START),y)
|
||||||
|
ENABLE_PFCWD_ON_START = y
|
||||||
|
endif
|
||||||
|
|
||||||
include $(RULES_PATH)/config
|
include $(RULES_PATH)/config
|
||||||
include $(RULES_PATH)/functions
|
include $(RULES_PATH)/functions
|
||||||
include $(RULES_PATH)/*.mk
|
include $(RULES_PATH)/*.mk
|
||||||
@ -96,6 +100,7 @@ $(info "DEFAULT_USERNAME" : "$(DEFAULT_USERNAME)")
|
|||||||
$(info "DEFAULT_PASSWORD" : "$(DEFAULT_PASSWORD)")
|
$(info "DEFAULT_PASSWORD" : "$(DEFAULT_PASSWORD)")
|
||||||
$(info "ENABLE_DHCP_GRAPH_SERVICE" : "$(ENABLE_DHCP_GRAPH_SERVICE)")
|
$(info "ENABLE_DHCP_GRAPH_SERVICE" : "$(ENABLE_DHCP_GRAPH_SERVICE)")
|
||||||
$(info "SHUTDOWN_BGP_ON_START" : "$(SHUTDOWN_BGP_ON_START)")
|
$(info "SHUTDOWN_BGP_ON_START" : "$(SHUTDOWN_BGP_ON_START)")
|
||||||
|
$(info "ENABLE_PFCWD_ON_START" : "$(ENABLE_PFCWD_ON_START)")
|
||||||
$(info "SONIC_CONFIG_DEBUG" : "$(SONIC_CONFIG_DEBUG)")
|
$(info "SONIC_CONFIG_DEBUG" : "$(SONIC_CONFIG_DEBUG)")
|
||||||
$(info "ROUTING_STACK" : "$(SONIC_ROUTING_STACK)")
|
$(info "ROUTING_STACK" : "$(SONIC_ROUTING_STACK)")
|
||||||
$(info "ENABLE_SYNCD_RPC" : "$(ENABLE_SYNCD_RPC)")
|
$(info "ENABLE_SYNCD_RPC" : "$(ENABLE_SYNCD_RPC)")
|
||||||
@ -439,6 +444,7 @@ $(addprefix $(TARGET_PATH)/, $(SONIC_INSTALLERS)) : $(TARGET_PATH)/% : \
|
|||||||
export enable_organization_extensions="$(ENABLE_ORGANIZATION_EXTENSIONS)"
|
export enable_organization_extensions="$(ENABLE_ORGANIZATION_EXTENSIONS)"
|
||||||
export enable_dhcp_graph_service="$(ENABLE_DHCP_GRAPH_SERVICE)"
|
export enable_dhcp_graph_service="$(ENABLE_DHCP_GRAPH_SERVICE)"
|
||||||
export shutdown_bgp_on_start="$(SHUTDOWN_BGP_ON_START)"
|
export shutdown_bgp_on_start="$(SHUTDOWN_BGP_ON_START)"
|
||||||
|
export enable_pfcwd_on_start="$(ENABLE_PFCWD_ON_START)"
|
||||||
export installer_debs="$(addprefix $(DEBS_PATH)/,$($*_INSTALLS))"
|
export installer_debs="$(addprefix $(DEBS_PATH)/,$($*_INSTALLS))"
|
||||||
export lazy_installer_debs="$(foreach deb, $($*_LAZY_INSTALLS),$(foreach device, $($(deb)_PLATFORM),$(addprefix $(device)@, $(DEBS_PATH)/$(deb))))"
|
export lazy_installer_debs="$(foreach deb, $($*_LAZY_INSTALLS),$(foreach device, $($(deb)_PLATFORM),$(addprefix $(device)@, $(DEBS_PATH)/$(deb))))"
|
||||||
export installer_images="$(addprefix $(TARGET_PATH)/,$($*_DOCKERS))"
|
export installer_images="$(addprefix $(TARGET_PATH)/,$($*_DOCKERS))"
|
||||||
|
Loading…
Reference in New Issue
Block a user