-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Create DaemonBase class for all daemons #2570
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
File "rules/sonic-platform-daemons.mk" should be renamed "rules/sonic-daemon-common.mk"
4b060e5
to
fe06eb6
Compare
Done. |
if this one is used by platform daemons, why cannot them be put into https://github.com/Azure/sonic-platform-daemons? |
@lguohan: It was my suggestion to add this to sonic-buildimage because these are functions I have written in many daemons both in the base image and in Docker containers. I think this library should be available system-wide to allow for code reuse. |
is this code here duplicated somewhere else? if yes, then we need also remove them. |
It is used in many daemons. Once this is merged, we can go through all the daemons and change them to import this library instead. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One further suggestion I have here is that this should probably become a base class that all daemons can extend. And in this class's constructor, it can set up the syslog, signal handlers, etc.
fe06eb6
to
d9c36ac
Compare
Done. Wrap the common functions to a base class named daemon_util. |
d9c36ac
to
0f11379
Compare
0f11379
to
18b2f87
Compare
18b2f87
to
d151daf
Compare
d151daf
to
6b675dc
Compare
DaemonBase is to wrap the common function of daemons, such as logging, signal handling, db connector, load specific platform plugins. Signed-off-by: Kevin Wang <kevinw@mellanox.com>
6b675dc
to
f351cb7
Compare
Update sonic-utilities submodule pointer to include the following: 3bc2bc6 [Mellanox][202205] Change severity to NOTICE in Mellanox buffer migrator when unable to fetch DEVICE_METADATA due to empty CONFIG_DB during initialization (#2570) e1c8243 [202205][generate_dump] Fix for a deletion flow for all secret files in the techsupport dump (#2572) 9f2984a [202205] Fix issue: unconfigured PGs are displayed in watermarkstat (#2568) f7988b0 [202205] [timer.unit.j2] use wanted-by in timer unit (#2561) f45dcfb [generate_dump] Optimize the execution time of 'show techsupport' CLI by paraller function execution (#2565) 67cbb15 [202205]Fixes 12170: Delete subinterface and recreate the subinterface in default-vrf (#2564) 93172c4 [202205] [generate_dump] Optimize the execution time of the 'show techsupport' script to 5-10% by reducing calls to the 'tar append' operation (#2562) Signed-off-by: dprital <drorp@nvidia.com>
This new python wheel is to wrap the common function of daemons,
such as logging, signal handling, load specific platform plugins.
Signed-off-by: Kevin Wang kevinw@mellanox.com
- What I did
Create a new python wheel named SONIC_DAEMON_COMMON_PY2 to wrap the common functions/macros for daemons.
- How I did it
- How to verify it
Change the daemons(ledd,xcvrd,psud) to import and use this common wheel. The daemons should work normally.
- Description for the changelog
- A picture of a cute animal (not mandatory but encouraged)