-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
[y_cable] Support for initialization of new daemon ycable to support ycables #9125
Changes from 2 commits
d4ba260
c687f2a
0590d47
abba79a
69edc59
31b11ed
c884264
18de1e0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -108,6 +108,25 @@ dependent_startup=true | |
dependent_startup_wait_for=rsyslogd:running | ||
{% endif %} | ||
|
||
{% if 'subtype' in DEVICE_METADATA['localhost'] and DEVICE_METADATA['localhost']['subtype'] == 'DualToR' %} | ||
{% if not skip_xcvrd %} | ||
[program:ycable] | ||
{% if delay_xcvrd %} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why delay start of ycable daemon based upon 'delay_xcvrd'? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we should have a separate flag for delay_ycabled |
||
command=bash -c "sleep 30 && {% if API_VERSION == 3 and 'ycable' not in python2_daemons %}nice -n -20 python3 {% else %} nice -n -20 python2 {% endif %}/usr/local/bin/ycable" | ||
{% else %} | ||
command=nice -n -20 {% if API_VERSION == 3 and 'ycable' not in python2_daemons %}python3 {% else %} python2 {% endif %}/usr/local/bin/ycable | ||
prgeor marked this conversation as resolved.
Show resolved
Hide resolved
|
||
{% endif %} | ||
priority=6 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. you seem to be reusing the 'priority' level of xcvrd. is this intentional? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I am thinking about it, all daemons have a priority from 1-10. Maybe need to have this as 7 ? |
||
autostart=false | ||
autorestart=unexpected | ||
stdout_logfile=syslog | ||
stderr_logfile=syslog | ||
startsecs=10 | ||
dependent_startup=true | ||
dependent_startup_wait_for=rsyslogd:running | ||
{% endif %} | ||
{% endif %} | ||
|
||
{% if not skip_psud %} | ||
[program:psud] | ||
command={% if API_VERSION == 3 and 'psud' not in python2_daemons %}python3 {% else %} python2 {% endif %}/usr/local/bin/psud | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
SPATH := $($(SONIC_YCABLE_PY2)_SRC_PATH) | ||
DEP_FILES := $(SONIC_COMMON_FILES_LIST) rules/sonic-ycable.mk rules/sonic-xcvrd.dep | ||
DEP_FILES += $(SONIC_COMMON_BASE_FILES_LIST) | ||
SMDEP_FILES := $(addprefix $(SPATH)/,$(shell cd $(SPATH) && git ls-files)) | ||
|
||
$(SONIC_YCABLE_PY2)_CACHE_MODE := GIT_CONTENT_SHA | ||
$(SONIC_YCABLE_PY2)_DEP_FLAGS := $(SONIC_COMMON_FLAGS_LIST) | ||
$(SONIC_YCABLE_PY2)_DEP_FILES := $(DEP_FILES) | ||
$(SONIC_YCABLE_PY2)_SMDEP_FILES := $(SMDEP_FILES) | ||
$(SONIC_YCABLE_PY2)_SMDEP_PATHS := $(SPATH) | ||
prgeor marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
$(SONIC_YCABLE_PY3)_CACHE_MODE := GIT_CONTENT_SHA | ||
$(SONIC_YCABLE_PY3)_DEP_FLAGS := $(SONIC_COMMON_FLAGS_LIST) | ||
$(SONIC_YCABLE_PY3)_DEP_FILES := $(DEP_FILES) | ||
$(SONIC_YCABLE_PY3)_SMDEP_FILES := $(SMDEP_FILES) | ||
$(SONIC_YCABLE_PY3)_SMDEP_PATHS := $(SPATH) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# sonic-ycable (SONiC Y-Cable daemon) Debian package | ||
|
||
# SONIC_YCABLE_PY2 package | ||
|
||
SONIC_YCABLE_PY2 = sonic_ycable-1.0-py2-none-any.whl | ||
$(SONIC_YCABLE_PY2)_SRC_PATH = $(SRC_PATH)/sonic-platform-daemons/sonic-ycable | ||
$(SONIC_YCABLE_PY2)_DEPENDS = $(SONIC_PY_COMMON_PY2) $(SONIC_PLATFORM_COMMON_PY2) | ||
$(SONIC_YCABLE_PY2)_DEBS_DEPENDS = $(LIBSWSSCOMMON) $(PYTHON_SWSSCOMMON) | ||
$(SONIC_YCABLE_PY2)_PYTHON_VERSION = 2 | ||
SONIC_PYTHON_WHEELS += $(SONIC_YCABLE_PY2) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We are moving to PY3 only, then why PY2 support? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. fixed |
||
|
||
# SONIC_YCABLE_PY3 package | ||
|
||
SONIC_YCABLE_PY3 = sonic_ycable-1.0-py3-none-any.whl | ||
$(SONIC_YCABLE_PY3)_SRC_PATH = $(SRC_PATH)/sonic-platform-daemons/sonic-ycable | ||
$(SONIC_YCABLE_PY3)_DEPENDS = $(SONIC_PY_COMMON_PY3) $(SONIC_YCABLE_PY2) $(SONIC_PLATFORM_COMMON_PY3) | ||
$(SONIC_YCABLE_PY3)_DEBS_DEPENDS = $(LIBSWSSCOMMON) $(PYTHON3_SWSSCOMMON) | ||
$(SONIC_YCABLE_PY3)_PYTHON_VERSION = 3 | ||
SONIC_PYTHON_WHEELS += $(SONIC_YCABLE_PY3) |
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.
why this check 'skip_xcvrd'? how is this new daemon dependent on xcvrd?
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.
I think we should have a separate flag for skip_ycabled, to keep homogeneous with other daemons