Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changes to support bcmsh and swss logs on multi npu platforms #4783

Closed
wants to merge 30 commits into from
Closed
Show file tree
Hide file tree
Changes from 4 commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
6a4d512
Changes to support bcmsh and swss logs on multi npu platforms
arlakshm Jun 16, 2020
ea3607f
minor fix
arlakshm Jun 16, 2020
8db1174
minor fix and bcmsh changes
arlakshm Jun 17, 2020
c660fc9
minor fixes
arlakshm Jun 17, 2020
5f16e96
Add the test signing certificates for secure boot (#4866)
xumia Jun 29, 2020
ef994a1
syslog changes Multi ASIC platforms (#4738)
arlakshm Jun 30, 2020
22bf545
[sonic-platform-common] Update submodule (#4871)
vboykox Jun 30, 2020
ba234ab
[mellanox]: Update SAI to 1.16.5 (#4873)
keboliu Jun 30, 2020
6e1ae35
Support for connecting to DB in namespace via TCP port in multi-asic …
judyjoseph Jun 30, 2020
ed7fafc
[sonic-sairedis] sonic-sairedis submodule update (#4847)
smaheshm Jun 30, 2020
2187144
[docker-nat]: Updated the NAT iptables patch for 4.19 buster (#4843)
AkhileshSamineni Jul 1, 2020
243268f
Fix in libsaibcm for high CPU utilization of syncd (#4874)
smaheshm Jul 1, 2020
e66cb47
[sonic-buildimage] Changes to make network specific sysctl common for…
abdosi Jul 1, 2020
2e0aa4f
[pfx_filter]: Add a prefix mask by default in pfx_filter, when there …
pavel-shirshov Jul 2, 2020
b72fed7
Tests of FRR templates which rendered by sonic-cfggen (#4875)
pavel-shirshov Jul 2, 2020
cae65a4
[config]: Loopback Interface changes for multi ASIC devices (#4825)
arlakshm Jul 2, 2020
a4253af
Added new pip packages, required by kube.py (kubernetes CLI). (#4884)
renukamanavalan Jul 2, 2020
5f31842
Revert "[config]: Loopback Interface changes for multi ASIC devices (…
lguohan Jul 3, 2020
c4b5b00
[docker-orchagent]: make build depends only on sairedis package (#4880)
lguohan Jul 3, 2020
eebca91
[Dell]: DellEMC S6100 disable pericom/xlinx chipset (#4868)
Jul 3, 2020
4240c8c
[sonic-platform-daemons] Update submodule (#4887)
jleveque Jul 3, 2020
0a260b7
[docker-orchagent]: upgrade docker-orchagent to buster (#4889)
lguohan Jul 3, 2020
90dcbe1
[barefoot][SAI v1.6.3] Update SAI and platform packages to 20200701 (…
vboykox Jul 3, 2020
405033b
Fix dpkg cache hash value relative to file path issue (#4894)
xumia Jul 4, 2020
20698aa
Skip thermalctld for arista platforms (#4893)
zzhiyuan Jul 5, 2020
e62b5f6
Merge remote-tracking branch 'arlakshm/master' into mnpu_bcmsh_fix
arlakshm Jul 5, 2020
969a914
Address review comments.
arlakshm Jul 6, 2020
eb90fa0
address review comment
arlakshm Jul 6, 2020
afa4f1a
address review comment
arlakshm Jul 6, 2020
32a34f9
address review comment
arlakshm Jul 6, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions files/build_templates/docker_image_ctl.j2
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,14 @@ start() {
--tmpfs /tmp \
{%- endif %}
{%- endif %}
{%- if sonic_asic_platform == "broadcom" %}
{%- if docker_container_name == "syncd" %}
-v /var/run/docker-syncd$DEV:/var/run/sswsyncd \
{%- endif %}
{%- endif %}
{%- if docker_container_name == "swss" %}
-v /var/log/swss$DEV:/var/log/swss:rw \
Copy link
Collaborator

Choose a reason for hiding this comment

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

do we know if logrotate works if changed the place?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added changes for logrotation in the latest commit

{%- endif %}
{%- if docker_container_name == "bgp" %}
-v /etc/sonic/frr/$DEV:/etc/frr:rw \
{%- endif %}
Expand Down
1 change: 0 additions & 1 deletion platform/broadcom/docker-syncd-brcm.mk
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ $(DOCKER_SYNCD_BASE)_DBG_DEPENDS += $(SYNCD_DBG) \
$(LIBSAIREDIS_DBG)

$(DOCKER_SYNCD_BASE)_RUN_OPT += -v /host/warmboot:/var/warmboot
$(DOCKER_SYNCD_BASE)_RUN_OPT += -v /var/run/docker-syncd:/var/run/sswsyncd

$(DOCKER_SYNCD_BASE)_BASE_IMAGE_FILES += bcmcmd:/usr/bin/bcmcmd
$(DOCKER_SYNCD_BASE)_BASE_IMAGE_FILES += bcmsh:/usr/bin/bcmsh
Expand Down
28 changes: 27 additions & 1 deletion platform/broadcom/docker-syncd-brcm/base_image_files/bcmcmd
Original file line number Diff line number Diff line change
@@ -1,3 +1,29 @@
#!/bin/bash
function print_error() {
Copy link
Collaborator

Choose a reason for hiding this comment

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

are we duplicating the file here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed in the latest commit

echo "No such container $NS"
echo "usage bcmcmd <container name> <command>"
Copy link
Collaborator

Choose a reason for hiding this comment

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

what do you mean by ?

should we just say bcmcmd -n [asicid] "cmd"?

add an option seems better.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changed to bcmcmd -n [asicid] "cmd" in the latest commit

exit
}
PLATFORM=`sonic-cfggen -H -v DEVICE_METADATA.localhost.platform`

# Parse the device specific asic conf file, if it exists
ASIC_CONF=/usr/share/sonic/device/$PLATFORM/asic.conf
if [ -f "$ASIC_CONF" ]; then
source $ASIC_CONF
fi
NS_PREFIX="syncd"
if [[ ($NUM_ASIC -gt 1) ]]; then
NS=$1
shift
if [[ $NS == $NS_PREFIX* ]]; then
DEV=${NS#"$NS_PREFIX"}
if [ "$DEV" -ge $NUM_ASIC ] || [ "$DEV" -lt 0 ]; then
print_error
fi
else
print_error
fi
fi

docker exec -i syncd$DEV bcmcmd "$@"

docker exec -i syncd bcmcmd "$@"
27 changes: 26 additions & 1 deletion platform/broadcom/docker-syncd-brcm/base_image_files/bcmsh
Original file line number Diff line number Diff line change
@@ -1,3 +1,28 @@
#!/bin/bash
function print_error() {
echo "No such container $NS"
echo "usage bcmsh <container name>"
exit
}
PLATFORM=`sonic-cfggen -H -v DEVICE_METADATA.localhost.platform`

docker exec -it syncd bcmsh "$@"
# Parse the device specific asic conf file, if it exists
ASIC_CONF=/usr/share/sonic/device/$PLATFORM/asic.conf
if [ -f "$ASIC_CONF" ]; then
source $ASIC_CONF
fi
NS_PREFIX="syncd"
if [[ ($NUM_ASIC -gt 1) ]]; then
NS=$1
shift
if [[ $NS == $NS_PREFIX* ]]; then
DEV=${NS#"$NS_PREFIX"}
if [ "$DEV" -ge $NUM_ASIC ] || [ "$DEV" -lt 0 ]; then
print_error
fi
else
print_error
fi
fi

docker exec -it syncd$DEV bcmsh "$@"
1 change: 0 additions & 1 deletion rules/docker-orchagent.mk
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ $(DOCKER_ORCHAGENT)_RUN_OPT += -v /etc/network/interfaces:/etc/network/interface
$(DOCKER_ORCHAGENT)_RUN_OPT += -v /etc/network/interfaces.d/:/etc/network/interfaces.d/:ro
$(DOCKER_ORCHAGENT)_RUN_OPT += -v /host/machine.conf:/host/machine.conf:ro
$(DOCKER_ORCHAGENT)_RUN_OPT += -v /etc/sonic:/etc/sonic:ro
$(DOCKER_ORCHAGENT)_RUN_OPT += -v /var/log/swss:/var/log/swss:rw

$(DOCKER_ORCHAGENT)_BASE_IMAGE_FILES += swssloglevel:/usr/bin/swssloglevel
$(DOCKER_ORCHAGENT)_BASE_IMAGE_FILES += monit_swss:/etc/monit/conf.d
Expand Down