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

[Makefile]: variable ENABLE_SYNCD_RPC is always empty string #1201

Closed
cytsai0409 opened this issue Dec 1, 2017 · 3 comments
Closed

[Makefile]: variable ENABLE_SYNCD_RPC is always empty string #1201

cytsai0409 opened this issue Dec 1, 2017 · 3 comments
Assignees

Comments

@cytsai0409
Copy link
Contributor

Description

I can not build the test image by setting the "ENABLE_SYNCD_RPC = y" in rules/config

Steps to reproduce the issue:

  1. uncomment the line "ENABLE_SYNCD_RPC = y" in rules/config
  2. execute "make target/sonic-broadcom.bin"
  3. check the console output and the variable "ENABLE_SYNCD_RPC" is set to empty string

Build Configuration
"CONFIGURED_PLATFORM" : "broadcom"
"SONIC_CONFIG_PRINT_DEPENDENCIES" : ""
"SONIC_CONFIG_BUILD_JOBS" : "1"
"SONIC_CONFIG_MAKE_JOBS" : "4"
"DEFAULT_USERNAME" : "admin"
"DEFAULT_PASSWORD" : "YourPaSsWoRd"
"ENABLE_DHCP_GRAPH_SERVICE" : ""
"SHUTDOWN_BGP_ON_START" : ""
"SONIC_CONFIG_DEBUG" : ""
"ROUTING_STACK" : "quagga"
"ENABLE_SYNCD_RPC" : "" <------------------------ (always empty string)
"ENABLE_ORGANIZATION_EXTENSIONS" : "y"

Describe the results you received:

The variable "ENABLE_SYNCD_RPC" is always set to empty string and test image is not built

Describe the results you expected:

The variable "ENABLE_SYNCD_RPC" should be set to "y" and test image is built.

Root Cause

In Makefile, the variable ENABLE_SYNCD_RPC is not initialized and assigned as command argument to
SONIC_BUILD_INSTRUCTION as below:

SONIC_BUILD_INSTRUCTION := make
-f slave.mk
PLATFORM=$(PLATFORM)
BUILD_NUMBER=$(BUILD_NUMBER)
ENABLE_DHCP_GRAPH_SERVICE=$(ENABLE_DHCP_GRAPH_SERVICE)
SHUTDOWN_BGP_ON_START=$(SHUTDOWN_BGP_ON_START)
ENABLE_SYNCD_RPC=$(ENABLE_SYNCD_RPC) \ <----------- (not initialized)
PASSWORD=$(PASSWORD)
USERNAME=$(USERNAME)

The variable ENABLE_SYNCD_RPC in rules/config is ignored since command argument has higher precedence.

Suggestion

Remove the command argument ENABLE_SYNCD_RPC in Makefile to avoid variable overwriting as below:

SONIC_BUILD_INSTRUCTION := make
-f slave.mk
PLATFORM=$(PLATFORM)
BUILD_NUMBER=$(BUILD_NUMBER)
ENABLE_DHCP_GRAPH_SERVICE=$(ENABLE_DHCP_GRAPH_SERVICE)
SHUTDOWN_BGP_ON_START=$(SHUTDOWN_BGP_ON_START) \
PASSWORD=$(PASSWORD)
USERNAME=$(USERNAME)

@marian-pritsak
Copy link
Collaborator

#1032

This PR causes a problem. Variables had different names intentionally - to avoid overriding them with empty strings from entry point Makefile.

@cytsai0409 for now, as a workaround, I'd suggest to use following command:

make ENABLE_SYNCD_RPC=y target/sonic-broadcom.bin

@lguohan
Copy link
Collaborator

lguohan commented Dec 5, 2017

Can we revert #1032? @stcheng ?

@jleveque
Copy link
Contributor

jleveque commented Dec 5, 2017

If I'm understanding this issue correctly, ENABLE_SYNCD_RPC is an empty string in the main Makefile. It is then passed as a command line argument to slave.mk. slave.mk includes rules/config which then will try to set the variable if it is defined there. However, with GNU Make, variables set via a command line argument take precedence over those set in a file, so the variable is not overridden with the value from rules/config.

If this is the case, we could possibly use the "override" directive in rules/config (https://www.gnu.org/software/make/manual/html_node/Override-Directive.html#Override-Directive). However, I think we ultimately want command line parameters to take precedence, as is the GNU make default behavior.

Therefore, I believe this can be resolved in the main Makefile. When calling slave.mk, we should only pass variables on the command line if they are already set (i.e., they were set on the command line when invoking the main Makefile. It might be a little ugly due to the nature of GNU Make conditionals, but I believe it will work, and if so, it's probably the best solution.

@lguohan lguohan assigned lguohan and unassigned marian-pritsak Oct 12, 2018
@lguohan lguohan closed this as completed Oct 15, 2018
lguohan added a commit to lguohan/sonic-buildimage that referenced this issue Jul 19, 2020
* d2bab10 2020-07-19 | [vstest]: use BytesIO for file operations [lguohan]
* 982c9a3 2020-07-18 | [vstest]: fix vstest for python3 (sonic-net#1354) [lguohan]
* ffa0dc3 2020-07-16 | [vstest]: clean up processes in server namespace at start (sonic-net#1353) [lguohan]
* b16368c 2020-07-15 | [aclorch.cpp] Handle all the ACL redirect requests in AclRuleL3::validateAddAction()  (sonic-net#1278) [madhanmellanox]
* 310e0aa 2020-07-15 | [portsorch,intfsorch] add port, rif rates FC groups (sonic-net#1201) [Mykola F]
* 5ddea37 2020-07-09 |  [NAT]: Update NAT conntrack entries from natmgr instead of natorch (sonic-net#1274) [Akhilesh Samineni]
* 94c622f 2020-07-07 | [aclorch] Use IPv6 Next Header internally for protocol number on MLNX platform (sonic-net#1343) [Danny Allen]
*   82d36c4 2020-07-07 | support swss vstest in python3 [lguohan]
|\
| * ff04e6d 2020-06-27 | [doc]: update instruction to run vstest under python3 [Guohan Lu]
| * c90b281 2020-07-05 | [vstest]: reuse dvs setReadOnlyAttr in test_crm.py [Guohan Lu]
| * 8807b40 2020-07-05 | [vstest]: fix string format compatibility issue for python2 and swig [Guohan Lu]
| * 26efbcf 2020-07-04 | [vstest]: change float division to integer division [Guohan Lu]
| * 6adaf2e 2020-07-04 | [vstest]: change time.clock() to time.time() [Guohan Lu]
| * 9c71203 2020-07-04 | [vstest]: let redis decodes the response to be string instead of bytes [Guohan Lu]
| * c7c63ee 2020-06-27 | [vstest]: change from platform to distro [Guohan Lu]
| * d7ff1ad 2020-06-27 | [vstest]: upgrade swss vs tests to python3 [Guohan Lu]
* | 2ebd44e 2020-07-03 | [sonic-swss] ARMHF warning fixes (sonic-net#1325) [[email protected]]
* | 10ad70c 2020-07-02 | [swss] Add support for gearbox phys (sonic-net#1321) [Syd Logan]

Signed-off-by: Guohan Lu <[email protected]>
lguohan added a commit that referenced this issue Jul 20, 2020
* d2bab10 2020-07-19 | [vstest]: use BytesIO for file operations [lguohan]
* 982c9a3 2020-07-18 | [vstest]: fix vstest for python3 (#1354) [lguohan]
* ffa0dc3 2020-07-16 | [vstest]: clean up processes in server namespace at start (#1353) [lguohan]
* b16368c 2020-07-15 | [aclorch.cpp] Handle all the ACL redirect requests in AclRuleL3::validateAddAction()  (#1278) [madhanmellanox]
* 310e0aa 2020-07-15 | [portsorch,intfsorch] add port, rif rates FC groups (#1201) [Mykola F]
* 5ddea37 2020-07-09 |  [NAT]: Update NAT conntrack entries from natmgr instead of natorch (#1274) [Akhilesh Samineni]
* 94c622f 2020-07-07 | [aclorch] Use IPv6 Next Header internally for protocol number on MLNX platform (#1343) [Danny Allen]
*   82d36c4 2020-07-07 | support swss vstest in python3 [lguohan]
|\
| * ff04e6d 2020-06-27 | [doc]: update instruction to run vstest under python3 [Guohan Lu]
| * c90b281 2020-07-05 | [vstest]: reuse dvs setReadOnlyAttr in test_crm.py [Guohan Lu]
| * 8807b40 2020-07-05 | [vstest]: fix string format compatibility issue for python2 and swig [Guohan Lu]
| * 26efbcf 2020-07-04 | [vstest]: change float division to integer division [Guohan Lu]
| * 6adaf2e 2020-07-04 | [vstest]: change time.clock() to time.time() [Guohan Lu]
| * 9c71203 2020-07-04 | [vstest]: let redis decodes the response to be string instead of bytes [Guohan Lu]
| * c7c63ee 2020-06-27 | [vstest]: change from platform to distro [Guohan Lu]
| * d7ff1ad 2020-06-27 | [vstest]: upgrade swss vs tests to python3 [Guohan Lu]
* | 2ebd44e 2020-07-03 | [sonic-swss] ARMHF warning fixes (#1325) [[email protected]]
* | 10ad70c 2020-07-02 | [swss] Add support for gearbox phys (#1321) [Syd Logan]

Signed-off-by: Guohan Lu <[email protected]>
jleveque added a commit that referenced this issue Nov 25, 2020
…heel (#5926)

Submodule updates include the following commits:

* src/sonic-utilities 9dc58ea...f9eb739 (18):
  > Remove unnecessary calls to str.encode() now that the package is Python 3; Fix deprecation warning (#1260)
  > [generate_dump] Ignoring file/directory not found Errors (#1201)
  > Fixed porstat rate and util issues (#1140)
  > fix error: interface counters is mismatch after warm-reboot (#1099)
  > Remove unnecessary calls to str.decode() now that the package is Python 3 (#1255)
  > [acl-loader] Make list sorting compliant with Python 3 (#1257)
  > Replace hard-coded fast-reboot with variable. And some typo corrections (#1254)
  > [configlet][portconfig] Remove calls to dict.has_key() which is not available in Python 3 (#1247)
  > Remove unnecessary conversions to list() and calls to dict.keys() (#1243)
  > Clean up LGTM alerts (#1239)
  > Add 'requests' as install dependency in setup.py (#1240)
  > Convert to Python 3 (#1128)
  > Fix mock SonicV2Connector in python3: use decode_responses mode so caller code will be the same as python2 (#1238)
  > [tests] Do not trim from PATH if we did not append to it; Clean up/fix shebangs in scripts (#1233)
  > Updates to bgp config and show commands with BGP_INTERNAL_NEIGHBOR table (#1224)
  > [cli]: NAT show commands newline issue after migrated to Python3 (#1204)
  > [doc]: Update Command-Reference.md (#1231)
  > Added 'import sys' in feature.py file (#1232)

* src/sonic-py-swsssdk 9d9f0c6...1664be9 (2):
  > Fix: no need to decode() after redis client scan, so it will work for both python2 and python3 (#96)
  > FieldValueMap `contains`(`in`)  will also work when migrated to libswsscommon(C++ with SWIG wrapper) (#94)

- Also fix Python 3-related issues:
    - Use integer (floor) division in config_samples.py (sonic-config-engine)
    - Replace print statement with print function in eeprom.py plugin for x86_64-kvm_x86_64-r0 platform
    - Update all platform plugins to be compatible with both Python 2 and Python 3
    - Remove shebangs from plugins files which are not intended to be executable
    - Replace tabs with spaces in Python plugin files and fix alignment, because Python 3 is more strict
    - Remove trailing whitespace from plugins files
santhosh-kt pushed a commit to santhosh-kt/sonic-buildimage that referenced this issue Feb 25, 2021
…heel (sonic-net#5926)

Submodule updates include the following commits:

* src/sonic-utilities 9dc58ea...f9eb739 (18):
  > Remove unnecessary calls to str.encode() now that the package is Python 3; Fix deprecation warning (sonic-net#1260)
  > [generate_dump] Ignoring file/directory not found Errors (sonic-net#1201)
  > Fixed porstat rate and util issues (sonic-net#1140)
  > fix error: interface counters is mismatch after warm-reboot (sonic-net#1099)
  > Remove unnecessary calls to str.decode() now that the package is Python 3 (sonic-net#1255)
  > [acl-loader] Make list sorting compliant with Python 3 (sonic-net#1257)
  > Replace hard-coded fast-reboot with variable. And some typo corrections (sonic-net#1254)
  > [configlet][portconfig] Remove calls to dict.has_key() which is not available in Python 3 (sonic-net#1247)
  > Remove unnecessary conversions to list() and calls to dict.keys() (sonic-net#1243)
  > Clean up LGTM alerts (sonic-net#1239)
  > Add 'requests' as install dependency in setup.py (sonic-net#1240)
  > Convert to Python 3 (sonic-net#1128)
  > Fix mock SonicV2Connector in python3: use decode_responses mode so caller code will be the same as python2 (sonic-net#1238)
  > [tests] Do not trim from PATH if we did not append to it; Clean up/fix shebangs in scripts (sonic-net#1233)
  > Updates to bgp config and show commands with BGP_INTERNAL_NEIGHBOR table (sonic-net#1224)
  > [cli]: NAT show commands newline issue after migrated to Python3 (sonic-net#1204)
  > [doc]: Update Command-Reference.md (sonic-net#1231)
  > Added 'import sys' in feature.py file (sonic-net#1232)

* src/sonic-py-swsssdk 9d9f0c6...1664be9 (2):
  > Fix: no need to decode() after redis client scan, so it will work for both python2 and python3 (sonic-net#96)
  > FieldValueMap `contains`(`in`)  will also work when migrated to libswsscommon(C++ with SWIG wrapper) (sonic-net#94)

- Also fix Python 3-related issues:
    - Use integer (floor) division in config_samples.py (sonic-config-engine)
    - Replace print statement with print function in eeprom.py plugin for x86_64-kvm_x86_64-r0 platform
    - Update all platform plugins to be compatible with both Python 2 and Python 3
    - Remove shebangs from plugins files which are not intended to be executable
    - Replace tabs with spaces in Python plugin files and fix alignment, because Python 3 is more strict
    - Remove trailing whitespace from plugins files
stepanblyschak pushed a commit to stepanblyschak/sonic-buildimage that referenced this issue May 10, 2021
)

Added checks to ignore files/directories that are not present while generating the dump.

Signed-off-by: Sabareesh Kumar Anandan <[email protected]>
theasianpianist pushed a commit to theasianpianist/sonic-buildimage that referenced this issue Feb 5, 2022
* [portsorch,intfsorch] add port, rif rates FC groups
* fix comments
* remove speed calc from lua scripts
* trigger lgtm
yxieca added a commit to yxieca/sonic-buildimage that referenced this issue Mar 1, 2023
…ance submodule head

utilities:
* a4f141f1 2023-01-10 | [sfputil] Firmware download/upgrade CLI support for QSFP-DD (sonic-net#1947) (sonic-net#2349) (HEAD -> 202205) [CliveNi]

swss-common:
* 41fcad8 2023-01-30 | Increase the netlink buffer size from 3MB to 16MB. (sonic-net#739) (HEAD -> 202205) [KISHORE KUNAL]

sairedis:
* 5ce9990 2023-02-27 | [Dual-ToR] update sai.profile with SAI_ADDITIONAL_MAC_ENABLED attribute if corresponding arg passed to syncd (sonic-net#1201) (HEAD -> 202205) [Andriy Yurkiv]
* 3c2e0c5 2023-02-23 | Use new value of STATE_DB FAST_REBOOT entry (sonic-net#1196) [Aryeh Feigin]
* fe7756f 2023-02-28 | [submodule][SAI]Advance SAI head (sonic-net#1210) (github/202205) [Richard.Yu]

platform-common:
* 321a8e7 2022-09-23 | Cdb fw upgrade (sonic-net#308) (HEAD -> 202205) [CliveNi]

swss:
* ceea558 2023-02-28 | [orchagent]: Get bridge port ID from orchagent cache instead of SAI API (sonic-net#2657) (HEAD -> 202205) [Lawrence Lee]
* bd04e24 2023-03-01 | [dualtor] Fix neighbor miss when mux is not ready (sonic-net#2676) (HEAD -> 202205) [Longxiang Lyu]
* 7d87a90 2023-02-28 | [ci] Fix pipeline error about team5 not found. (sonic-net#2684) [Liu Shilong]
* 93a924c 2023-02-27 | [aclorch] Fixed issue sonic-net#2204.Support IN_PORTS qualifer in MIRRORV6 table. (sonic-net#2668) [Rajkumar-Marvell]
* 9d87ec4 2023-02-23 | swss: Fix Invalid port oid messages generated because of voq counters. (sonic-net#2653) [Sambath Kumar Balasubramanian]

Signed-off-by: Ying Xie <[email protected]>
yxieca added a commit that referenced this issue Mar 1, 2023
…ance submodule head (#14029)

utilities:
* a4f141f1 2023-01-10 | [sfputil] Firmware download/upgrade CLI support for QSFP-DD (#1947) (#2349) (HEAD -> 202205) [CliveNi]

swss-common:
* 41fcad8 2023-01-30 | Increase the netlink buffer size from 3MB to 16MB. (#739) (HEAD -> 202205) [KISHORE KUNAL]

sairedis:
* 5ce9990 2023-02-27 | [Dual-ToR] update sai.profile with SAI_ADDITIONAL_MAC_ENABLED attribute if corresponding arg passed to syncd (#1201) (HEAD -> 202205) [Andriy Yurkiv]
* 3c2e0c5 2023-02-23 | Use new value of STATE_DB FAST_REBOOT entry (#1196) [Aryeh Feigin]
* fe7756f 2023-02-28 | [submodule][SAI]Advance SAI head (#1210) (github/202205) [Richard.Yu]

platform-common:
* 321a8e7 2022-09-23 | Cdb fw upgrade (#308) (HEAD -> 202205) [CliveNi]

swss:
* ceea558 2023-02-28 | [orchagent]: Get bridge port ID from orchagent cache instead of SAI API (#2657) (HEAD -> 202205) [Lawrence Lee]
* bd04e24 2023-03-01 | [dualtor] Fix neighbor miss when mux is not ready (#2676) (HEAD -> 202205) [Longxiang Lyu]
* 7d87a90 2023-02-28 | [ci] Fix pipeline error about team5 not found. (#2684) [Liu Shilong]
* 93a924c 2023-02-27 | [aclorch] Fixed issue #2204.Support IN_PORTS qualifer in MIRRORV6 table. (#2668) [Rajkumar-Marvell]
* 9d87ec4 2023-02-23 | swss: Fix Invalid port oid messages generated because of voq counters. (#2653) [Sambath Kumar Balasubramanian]

Signed-off-by: Ying Xie <[email protected]>
StormLiangMS added a commit that referenced this issue Mar 7, 2023
Why I did it
cf9a66b - Fix issue: bulk counter feature is disabled ([Broadcom]: Update Broadcom SDK/SAI package #1205) (4 hours ago) [Lior Avramov]
8b1583b - [Dual-ToR] update sai.profile with SAI_ADDITIONAL_MAC_ENABLED attribute if corresponding arg passed to syncd ([Makefile]: variable ENABLE_SYNCD_RPC is always empty string #1201) (4 hours ago) [Andriy Yurkiv]
50d8e21 - [syncd]: Enable port bulk API ([platform] Accton AS7712-32X. Update for sensors and sfputil. #1197) (4 hours ago) [Nazarii Hnydyn]
a72438a - Use new value of STATE_DB FAST_REBOOT entry ([device/accton]: Update Accton-AS5712_54X #1196) (4 hours ago) [Aryeh Feigin]
d78ce86 - validation support for SAI_ATTR_VALUE_TYPE_JSON ([installer] FIX. ONIE installer error issue: #1152) (4 hours ago) [svshah-intel]
How I did it
How to verify it
AntonHryshchuk added a commit to AntonHryshchuk/sonic-buildimage that referenced this issue Mar 8, 2023
Update sonic-sairedis submodule pointer to include the following:
* 749b393 [ci] Fix apt-get install unable locate package issue. ([sonic-net#1212](sonic-net/sonic-sairedis#1212))
* 886875b [Dual-ToR] update sai.profile with SAI_ADDITIONAL_MAC_ENABLED attribute if corresponding arg passed to syncd ([sonic-net#1201](sonic-net/sonic-sairedis#1201))
* c58d259 Use new value of STATE_DB FAST_REBOOT entry ([sonic-net#1196](sonic-net/sonic-sairedis#1196))
* 3808e4c Fix issue: bulk counter feature is disabled ([sonic-net#1205](sonic-net/sonic-sairedis#1205))

Signed-off-by: AntonHryshchuk <[email protected]>
dprital added a commit to dprital/sonic-buildimage that referenced this issue Mar 10, 2023
Update sonic-sairedis submodule pointer to include the following:
* 4bd1dc5 Fast reboot finalizer ([sonic-net#1213](sonic-net/sonic-sairedis#1213))
* 749b393 [ci] Fix apt-get install unable locate package issue. ([sonic-net#1212](sonic-net/sonic-sairedis#1212))
* 886875b [Dual-ToR] update sai.profile with SAI_ADDITIONAL_MAC_ENABLED attribute if corresponding arg passed to syncd ([sonic-net#1201](sonic-net/sonic-sairedis#1201))
* c58d259 Use new value of STATE_DB FAST_REBOOT entry ([sonic-net#1196](sonic-net/sonic-sairedis#1196))
* 3808e4c Fix issue: bulk counter feature is disabled ([sonic-net#1205](sonic-net/sonic-sairedis#1205))

Signed-off-by: dprital <[email protected]>
liat-grozovik pushed a commit that referenced this issue Mar 12, 2023
Update sonic-sairedis submodule pointer to include the following:
* 4bd1dc5 Fast reboot finalizer ([#1213](sonic-net/sonic-sairedis#1213))
* 749b393 [ci] Fix apt-get install unable locate package issue. ([#1212](sonic-net/sonic-sairedis#1212))
* 886875b [Dual-ToR] update sai.profile with SAI_ADDITIONAL_MAC_ENABLED attribute if corresponding arg passed to syncd ([#1201](sonic-net/sonic-sairedis#1201))
* c58d259 Use new value of STATE_DB FAST_REBOOT entry ([#1196](sonic-net/sonic-sairedis#1196))
* 3808e4c Fix issue: bulk counter feature is disabled ([#1205](sonic-net/sonic-sairedis#1205))

Signed-off-by: dprital <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants