[docker-teamd]: Refactor cleanup procedure.#441
[docker-teamd]: Refactor cleanup procedure.#441marian-pritsak wants to merge 3 commits intosonic-net:masterfrom
Conversation
|
Depends on: |
|
Please update this PR when both PR are merged into sonic-swss |
lguohan
left a comment
There was a problem hiding this comment.
please update sonic-swss submodule
|
@stcheng Please help review |
dockers/docker-teamd/Dockerfile.j2
Outdated
There was a problem hiding this comment.
I think we could use /bin/bash as ENTRYPOINT and /usr/bin/start.sh as CMD. Thus even when the start.sh fails at some unknown point, the docker won't exit and dev could attach to the docker and debug. The Dockerfile could be similar to docker-orchagent/Dockerfile.j2.
dockers/docker-teamd/start.sh
Outdated
There was a problem hiding this comment.
So I believe this will successfully stop all the team instances without leaving anything that needs to be manually cleaned up after the next docker starts?
There was a problem hiding this comment.
-k option kills corresponding daemon and deletes LAG interface
dockers/docker-teamd/Dockerfile.j2
Outdated
There was a problem hiding this comment.
Is there any special reason that we need to merge config.sh and start.sh back into one file?
There was a problem hiding this comment.
Reason for that is to correctly handle signals sent to container.
See #435
stcheng
left a comment
There was a problem hiding this comment.
one issue needs to be addressed.
dockers/docker-teamd/start.sh
Outdated
There was a problem hiding this comment.
check if the folder is empty or not. if the folder is empty, the variable f will become /etc/teamd/*.
Signed-off-by: marian-pritsak <[email protected]>
Signed-off-by: marian-pritsak <[email protected]>
Signed-off-by: marian-pritsak <[email protected]>
|
Rebased and fixed merge conflicts |
|
Still pending issue #497 |
|
@marian-pritsak I have tried the patch. I notice that even with |
|
@stcheng which command did you execute? I did the following test: I added echo messages into each function for debug, and I can see cleanup is called: |
|
@marian-pritsak: I am currently working on a PR that will change all docker ENTRYPOINTs to run supervisord. This will fix issue #435. I say we hold off on merging this PR until after I submit my PR. |
|
@jleveque thanks. |
|
@marian-pritsak, thanks for signing the contribution license agreement. We will now validate the agreement and then the pull request. |
Includes sonic-swss-common commits: ``` 71dc350 2021-01-07 | Lower the log level for outdated key for SubscriberStateTable notification (sonic-net#441) [Qi Luo] 7e40582 2021-01-08 | Add boost dependencies (sonic-net#442) [Ze Gan] 30a8ddf 2021-01-05 | Change DBConnector::hgetall return type from map to unordered_map (sonic-net#440) [Qi Luo] 021108d 2021-01-02 | MCLAG Enhancements per HLD sonic-net/SONiC#596 (sonic-net#405) [Praveen-Brcm] 54996fc 2021-01-02 | Implement ConfigDBConnector and ConfigDBPipeConnector in C++ (sonic-net#437) [Qi Luo] 8286525 2020-12-27 | Simply refactor DBConnector hgetall() [Qi Luo] 6d1d33b 2020-12-27 | Fix RedisTransactioner: handle empty deque [Qi Luo] 624e0b8 2020-12-26 | Move complex class constructor as explicit, and fix several mistaken copy constructor usage [Qi Luo] 3b983f9 2020-12-30 | [ci]: add timeout to 180 minutes for arm build (sonic-net#439) [lguohan] f2e4210 2020-12-29 | Add utility for string and redis (sonic-net#434) [Ze Gan] 7a885fd 2020-12-29 | [build]: add build check for arm64 and armhf (sonic-net#436) [lguohan] 47bccc4 2020-12-24 | Add missed vector header to rediscommand.h (sonic-net#435) [Ze Gan] ```
Includes sonic-swss-common commits: ``` 71dc350 2021-01-07 | Lower the log level for outdated key for SubscriberStateTable notification (#441) [Qi Luo] 7e40582 2021-01-08 | Add boost dependencies (#442) [Ze Gan] 30a8ddf 2021-01-05 | Change DBConnector::hgetall return type from map to unordered_map (#440) [Qi Luo] 021108d 2021-01-02 | MCLAG Enhancements per HLD sonic-net/SONiC#596 (#405) [Praveen-Brcm] 54996fc 2021-01-02 | Implement ConfigDBConnector and ConfigDBPipeConnector in C++ (#437) [Qi Luo] 8286525 2020-12-27 | Simply refactor DBConnector hgetall() [Qi Luo] 6d1d33b 2020-12-27 | Fix RedisTransactioner: handle empty deque [Qi Luo] 624e0b8 2020-12-26 | Move complex class constructor as explicit, and fix several mistaken copy constructor usage [Qi Luo] 3b983f9 2020-12-30 | [ci]: add timeout to 180 minutes for arm build (#439) [lguohan] f2e4210 2020-12-29 | Add utility for string and redis (#434) [Ze Gan] 7a885fd 2020-12-29 | [build]: add build check for arm64 and armhf (#436) [lguohan] 47bccc4 2020-12-24 | Add missed vector header to rediscommand.h (#435) [Ze Gan] ```
Includes sonic-swss-common commits: ``` 71dc350 2021-01-07 | Lower the log level for outdated key for SubscriberStateTable notification (#441) [Qi Luo] 7e40582 2021-01-08 | Add boost dependencies (#442) [Ze Gan] 30a8ddf 2021-01-05 | Change DBConnector::hgetall return type from map to unordered_map (#440) [Qi Luo] 021108d 2021-01-02 | MCLAG Enhancements per HLD sonic-net/SONiC#596 (#405) [Praveen-Brcm] 54996fc 2021-01-02 | Implement ConfigDBConnector and ConfigDBPipeConnector in C++ (#437) [Qi Luo] 8286525 2020-12-27 | Simply refactor DBConnector hgetall() [Qi Luo] 6d1d33b 2020-12-27 | Fix RedisTransactioner: handle empty deque [Qi Luo] 624e0b8 2020-12-26 | Move complex class constructor as explicit, and fix several mistaken copy constructor usage [Qi Luo] 3b983f9 2020-12-30 | [ci]: add timeout to 180 minutes for arm build (#439) [lguohan] f2e4210 2020-12-29 | Add utility for string and redis (#434) [Ze Gan] 7a885fd 2020-12-29 | [build]: add build check for arm64 and armhf (#436) [lguohan] 47bccc4 2020-12-24 | Add missed vector header to rediscommand.h (#435) [Ze Gan] ```
Signed-off-by: marian-pritsak [email protected]