Skip to content

[pfcwd]: add flag to enable pfc wd on start#1429

Merged
lguohan merged 4 commits intosonic-net:masterfrom
sihuihan88:dev/sihan/pfcwd
Mar 6, 2018
Merged

[pfcwd]: add flag to enable pfc wd on start#1429
lguohan merged 4 commits intosonic-net:masterfrom
sihuihan88:dev/sihan/pfcwd

Conversation

@sihuihan88
Copy link
Copy Markdown
Contributor

Signed-off-by: Sihui Han [email protected]

- What I did
Add flag to enable pfc wd on start
- How I did it
Add the option to enable pfc wd on start
- How to verify it

- Description for the changelog

- A picture of a cute animal (not mandatory but encouraged)

Makefile Outdated
# * ENABLE_DHCP_GRAPH_SERVICE: Enables get-graph service to fetch minigraph files
# through http.
# * SHUTDOWN_BGP_ON_START: Sets admin-down state for all bgp peerings after restart.
# * ENABLE_PFC_WD_ON_START: Enable PFCWD on server-facing ports when starts.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use PFCWD consistently throughout the CR?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Enable PFC WatchDog (PFCWD) on server-facing ports by default for TOR switch.

sudo bash -c "echo '{ \"DEVICE_METADATA\": { \"localhost\": { \"default_bgp_status\": \"down\" } } }' >> $FILESYSTEM_ROOT/etc/sonic/init_cfg.json"
{% endif %}
{% if enable_pfc_wd_on_start == "y" %}
sudo bash -c "echo '{ \"DEVICE_METADATA\": { \"localhost\": { \"default_pfc_wd_status\": \"enable\" } } }' >> $FILESYSTEM_ROOT/etc/sonic/init_cfg.json"
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

which agent is reading this DEVICE_METADATA default_pfc_wd_status, where is that code?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if the PR is related/depended to other PR, can you mark this information in the PR comments?

Makefile Outdated
# * ENABLE_DHCP_GRAPH_SERVICE: Enables get-graph service to fetch minigraph files
# through http.
# * SHUTDOWN_BGP_ON_START: Sets admin-down state for all bgp peerings after restart.
# * ENABLE_PFC_WD_ON_START: Enable PFCWD on server-facing ports when starts.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggest change to ENABLE_PFC_WD_ON_START: Enable PFC Watchdog on server-facing ports when SONiC starts. for clarity.

rules/config Outdated
# bgp service starts.
# SHUTDOWN_BGP_ON_START = y

# ENABLE_PFC_WD_ON_START - if set to y PFC WD will be enabled all server-facing ports when
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggest changing WD to Watchdog for clarity.

Signed-off-by: Sihui Han <[email protected]>
sudo bash -c "echo '{ \"DEVICE_METADATA\": { \"localhost\": { \"default_bgp_status\": \"down\" } } }' >> $FILESYSTEM_ROOT/etc/sonic/init_cfg.json"
{% endif %}
{% if enable_pfcwd_on_start == "y" %}
sudo bash -c "echo '{ \"DEVICE_METADATA\": { \"localhost\": { \"default_pfc_wd_status\": \"enable\" } } }' >> $FILESYSTEM_ROOT/etc/sonic/init_cfg.json"
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to be consistent, this should also be default_pfcwd_status

Signed-off-by: Sihui Han <[email protected]>
Makefile Outdated
ENABLE_DHCP_GRAPH_SERVICE=$(ENABLE_DHCP_GRAPH_SERVICE) \
SHUTDOWN_BGP_ON_START=$(SHUTDOWN_BGP_ON_START) \
ENABLE_PFC_WD_ON_START=$(ENABLE_PFC_WD_ON_START) \
ENABLE_PFCWD_ON_START=$(ENABLE_PFCWD_ON_START) \
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will always rewrite value in config file

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like this issue.

#1201

looks like joe has some suggestion to fix this problem.

@lguohan lguohan merged commit 7639cc1 into sonic-net:master Mar 6, 2018
stepanblyschak pushed a commit to stepanblyschak/sonic-buildimage that referenced this pull request May 10, 2021
Warn user while deleting VLAN if it has IP addresses.
Signed-off-by: d-dashkov <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants