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

Build infrastructure changes to support sflow docker and utilities #3251

Merged
merged 9 commits into from
Sep 15, 2019
Merged

Build infrastructure changes to support sflow docker and utilities #3251

merged 9 commits into from
Sep 15, 2019

Conversation

padmanarayana
Copy link
Contributor

- What I did

Add build infrastructure changes to support sflow.

- How I did it

Introduce a new "sflow" container (if ENABLE_SFLOW is set). The new docker will include:
hsflowd : host-sflow based daemon is the sFlow agent
psample : Built from libpsample repository. Useful in debugging sampled packets/groups.
sflowtool : Locally dump sflow samples (e.g. with a in-unit collector)

In case of SONiC-VS, enable psample & act_sample kernel modules.

VS' syncd needs iproute2=4.20.0-2~bpo9+1 & libcap2-bin=1:2.25-1 to support tc-sample

tc-syncd is provided as a convenience tool for debugging (e.g. tc-syncd filter show ...)

- How to verify it

  1. Build sonic-vs.img.gz with and without ENABLE_SFLOW set
  2. With sflow enabled, check the following in vs image:
    a. act_sample/psample
    b. docker exec -it sflow /bin/bash and inspect status
    c. docker stop/start sflow
    d. Verify sflowtool, psample and tc-syncd

- Description for the changelog

Add build infrastructure changes to support sflow.

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

src/sflow/hsflowd/Makefile Outdated Show resolved Hide resolved
rules/config Outdated Show resolved Hide resolved
rules/sflow.mk Outdated Show resolved Hide resolved
rules/sflow.mk Show resolved Hide resolved
rules/sflow.mk Outdated Show resolved Hide resolved
rules/sflow.mk Outdated Show resolved Hide resolved
rules/sflow.mk Outdated Show resolved Hide resolved
@padmanarayana
Copy link
Contributor Author

sFlow docker is enabled by default. The hsflowd daemon would be started/stopped based on "config sflow enable/disable" (this is thru sonic-net/sonic-swss@d45786b)

Revert tc-syncd. For debugging, user can issue commands from syncd docker.

sflow docker has "--pid=host". This is to facilitate CPU/mem/IO stats on the switch. Since this is a baseline feature in host-sflow, it needs to be enabled by default.

Update host-sflow to 2.0.21-6 (which has counter polling interval disable support and other fixes).

Revert dbus change since it's taken care in host-sflow repo

As per InMon sugggestion, enabled hsflowd.crash

src/sflow/psample/Makefile Outdated Show resolved Hide resolved
rules/docker-sflow.mk Outdated Show resolved Hide resolved
@lguohan lguohan self-assigned this Sep 3, 2019
@lguohan lguohan merged commit 75104bb into sonic-net:master Sep 15, 2019
seiferteric pushed a commit to project-arlo/sonic-buildimage that referenced this pull request Nov 18, 2019
…ow docker and utilities (sonic-net#3251)

Dev sanity: http://10.59.132.240:9009/projects/csg_sonic/sanity/logs/dev-sanity-th2-td3-03/sonic_dev_sanity_190923_0503_1739

Introduce a new "sflow" container (if ENABLE_SFLOW is set). The new docker will include:
hsflowd : host-sflow based daemon is the sFlow agent
psample : Built from libpsample repository. Useful in debugging sampled packets/groups.
sflowtool : Locally dump sflow samples (e.g. with a in-unit collector)

In case of SONiC-VS, enable psample & act_sample kernel modules.

VS' syncd needs iproute2=4.20.0-2~bpo9+1 & libcap2-bin=1:2.25-1 to support tc-sample

tc-syncd is provided as a convenience tool for debugging (e.g. tc-syncd filter show ...)

(cherry picked from commit 75104bb)
Change-Id: I6ed669e756f01f79462fc320b80b8a31dd448adf
seiferteric pushed a commit to project-arlo/sonic-buildimage that referenced this pull request Nov 18, 2019
…ort sflow docker and utilities (sonic-net#3251)" into buzznik_dev
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants