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

[docker-teamd]: Manage teamd and teamsyncd processes with supervisor #1137

Merged
merged 4 commits into from
Nov 13, 2017
Merged

[docker-teamd]: Manage teamd and teamsyncd processes with supervisor #1137

merged 4 commits into from
Nov 13, 2017

Conversation

jleveque
Copy link
Contributor

- What I did

  • Ensure all teamd and teamsyncd processes inside docker-teamd are managed by supervisor to ensure we receive syslog messages if any of these processes exit unexpectedly.

- How I did it

  • Generate supervisor config file dynamically from a Jinja2 template using docker-teamd-init.sh to accommodate variances in LAG configuration.

- How to verify it

  • Start / stop teamd docker (via systemctl start/stop teamd) and ensure all processes start/stop properly, and that teamd processes clean up after themselves properly.
  • Kill teamd process(es) via signals and ensure supervisor writes appropriate syslog messages.

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

¸.·´¯`·.´¯`·.¸¸.·´¯`·.¸><(((º>

# the LAG and the path of the LAG config file. Then output this in
# JSON format, as we will pass it to sonic-cfggen as additional data
# below for generating the supervisord config file.
LAG_INFO_DICT=$(python -c "import json,os,sys; out_dict = {}; out_dict['lags'] = [{'name': os.path.basename(file).split('.')[0], 'file': os.path.join('${TEAMD_CONF_PATH}', file)} for file in os.listdir('${TEAMD_CONF_PATH}')]; sys.stdout.write(json.dumps(out_dict))")
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you also provide a sample output here?

@stcheng
Copy link
Contributor

stcheng commented Nov 10, 2017

can you also add corresponding j2 tests?

Copy link
Collaborator

@lguohan lguohan left a comment

Choose a reason for hiding this comment

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

suggest to add config gen unit test for the templates you have used.

@jleveque jleveque merged commit a6edef2 into sonic-net:master Nov 13, 2017
@jleveque jleveque deleted the supervise_teamd branch November 13, 2017 22:16
stcheng pushed a commit that referenced this pull request Nov 16, 2017
…ervisor (#1137)" (#1156)

This reverts commit a6edef2.

The reason to revert this commit is that it breaks the current nightly test as
no port channel interfaces are get created after boot. teamd failed to start and
complained about 'Cannot allocate memory' possibly due to nlmsg_alloc function
failure.

Will revert this commit to investigate it further before moving to supervisor.

Signed-off-by: Shu0T1an ChenG <shuche@microsoft.com>
abdosi added a commit that referenced this pull request Sep 29, 2020
[cli][bgp]use vtysh in the show ip bgp summary command (#1137)

Signed-off-by: Abhishek Dosi <abdosi@microsoft.com>
lguohan pushed a commit that referenced this pull request Oct 6, 2020
- [acl-loader] Revert fix for IP protocol == 0 (#1142)
- Show sflow interface to display all interfaces enabled for sflow (#1143)
- [sflow_test.py]: tests for config sflow commands. (#1112)
- [config/console] Support add/del console port setting commands (#1136)
- [cli][bgp]use vtysh in the show ip bgp summary command (#1137)
- [README.md] Describe new package creation schema (#1131)
- [consutil] Remove actual baud and refactor lib for future change (#1130)

Signed-off-by: Danny Allen <daall@microsoft.com>
santhosh-kt pushed a commit to santhosh-kt/sonic-buildimage that referenced this pull request Feb 25, 2021
…t#5545)

- [acl-loader] Revert fix for IP protocol == 0 (sonic-net#1142)
- Show sflow interface to display all interfaces enabled for sflow (sonic-net#1143)
- [sflow_test.py]: tests for config sflow commands. (sonic-net#1112)
- [config/console] Support add/del console port setting commands (sonic-net#1136)
- [cli][bgp]use vtysh in the show ip bgp summary command (sonic-net#1137)
- [README.md] Describe new package creation schema (sonic-net#1131)
- [consutil] Remove actual baud and refactor lib for future change (sonic-net#1130)

Signed-off-by: Danny Allen <daall@microsoft.com>
stepanblyschak pushed a commit to stepanblyschak/sonic-buildimage that referenced this pull request May 10, 2021
Signed-off-by: Arvindsrinivasan Lakshmi Narasimhan <arlakshm@microsoft.com>

Modify the run_bgp_command function to call vtysh with correct instance_id and vtysh cmd.
The vtysh script is modified to take the namespace id in this PR sonic-net#5479
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.

3 participants