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

[MultiDB]except src and dockers : replace redis-cli with sonic-db-cli and use new DBConnector #3928

Merged
merged 2 commits into from
Jan 2, 2020

Conversation

dzhangalibaba
Copy link
Collaborator

this commit made changes in sonic-buildimage module directory except ./dockers/(this is done in another PR) amd ./src/(will do in next PR)

replace redis-cli with sonic-db-cli
replace old DBConnector with new DBConnector
vs tests passed, loaded on DUT, looks good, script works fine.

Signed-off-by: Dong Zhang d.zhang@alibaba-inc.com

@dzhangalibaba
Copy link
Collaborator Author

This will block until sonic-net/sonic-py-swsssdk#58 is merged

@dzhangalibaba
Copy link
Collaborator Author

retest vs

@dzhangalibaba
Copy link
Collaborator Author

retest vsimage please

@dzhangalibaba
Copy link
Collaborator Author

retest vs please

@dzhangalibaba
Copy link
Collaborator Author

@qiluo-msft looks the build docker environment didn't use the latest python swsscommon library, here is one failed case , which cannot find the new DBConnector() API , https://sonic-jenkins.westus2.cloudapp.azure.com/job/vs/job/buildimage-vs-all-pr/1898/consoleFull

Could you help confirm environment is good or not. Now the pytest at platform/vs/tests cannot find the correct new API.

[ building ] [ target/docker-sonic-vs.gz ] 
[ finished ] [ target/docker-sonic-vs.gz ] 
make[1]: Leaving directory '/data/johnar/workspace/vs/buildimage-vs-all-pr@2'
[Pipeline] }
[Pipeline] // stage
[Pipeline] stage
[Pipeline] { (Test)
[Pipeline] wrap
[Pipeline] {
[Pipeline] lock
Trying to acquire lock on [vstest_jenkins-worker-s6]
Lock acquired on [vstest_jenkins-worker-s6]
[Pipeline] {
[Pipeline] sh
+ docker load
The image docker-sonic-vs:latest already exists, renaming the old one with ID sha256:cd32cbd0be49cc546cab8e039918d845dff08cf18c53be17f9e3211ce3394cb7 to empty string
Loaded image: docker-sonic-vs:latest
+ cd platform/vs/tests
+ sudo py.test -v --junitxml=tr.xml
============================= test session starts ==============================
platform linux2 -- Python 2.7.15+, pytest-3.3.0, py-1.7.0, pluggy-0.6.0 -- /usr/bin/python
cachedir: .cache
rootdir: /data/johnar/workspace/vs/buildimage-vs-all-pr@2/platform/vs/tests, inifile:
collecting ... collected 4 items

bgp/test_gr_livelock.py::test_gr_livelock PASSED                         [ 25%]
bgp/test_invalid_nexthop.py::test_InvalidNexthop PASSED                  [ 50%]
bgp/test_no_export.py::test_bounce PASSED                                [ 75%]
teamd/test_portchannel.py::test_PortChannel FAILED                       [100%]

 generated xml file: /data/johnar/workspace/vs/buildimage-vs-all-pr@2/platform/vs/tests/tr.xml 
=================================== FAILURES ===================================
_______________________________ test_PortChannel _______________________________

dvs = <conftest.DockerVirtualSwitch object at 0x7f30ab982b10>
testlog = <function testlog at 0x7f30ad27d6e0>

    def test_PortChannel(dvs, testlog):
>       appldb = swsscommon.DBConnector("APPL_DB", 0)

teamd/test_portchannel.py:7: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <swsscommon.swsscommon.DBConnector;  >, args = ('APPL_DB', 0)

    def __init__(self, *args):
>       this = _swsscommon.new_DBConnector(*args)
E       NotImplementedError: Wrong number or type of arguments for overloaded function 'new_DBConnector'.
E         Possible C/C++ prototypes are:
E           swss::DBConnector::DBConnector(int,std::string const &,int,unsigned int)
E           swss::DBConnector::DBConnector(int,std::string const &,unsigned int)

/usr/lib/python2.7/dist-packages/swsscommon/swsscommon.py:607: NotImplementedError

@qiluo-msft
Copy link
Collaborator

Retest vs please

@qiluo-msft
Copy link
Collaborator

I fixed the Jenkins worker. Please check test result again.

@dzhangalibaba
Copy link
Collaborator Author

retest this please

@dzhangalibaba
Copy link
Collaborator Author

retest broadcom please

@dzhangalibaba
Copy link
Collaborator Author

retest vsimage please

2 similar comments
@dzhangalibaba
Copy link
Collaborator Author

retest vsimage please

@dzhangalibaba
Copy link
Collaborator Author

retest vsimage please

@dzhangalibaba
Copy link
Collaborator Author

retest this please

@dzhangalibaba
Copy link
Collaborator Author

retest vsimage please

@dzhangalibaba
Copy link
Collaborator Author

retest vs please

@dzhangalibaba
Copy link
Collaborator Author

retest vsimage please

lguohan pushed a commit that referenced this pull request Dec 27, 2019
update multiDB changes in sonic-py-swsssdk, including:

- read portchannel name from LAG_NAME_MAP_TABLE in COUNTERS_DB (#51)
- Revert "read portchannel name from LAG_NAME_MAP_TABLE in COUNTERS_DB (#51)" (#57)
- [MultiDB] sonic-db-cli should support EVAL operation, app script use … (#58)

PR #3928 needs this swsssdk-py changes to work

Signed-off-by: Dong Zhang d.zhang@alibaba-inc.com
@dzhangalibaba
Copy link
Collaborator Author

retest vs please

@dzhangalibaba
Copy link
Collaborator Author

retest vsimage please

@dzhangalibaba
Copy link
Collaborator Author

@qiluo-msft FYI . all tests passed

@qiluo-msft qiluo-msft merged commit 0dae59a into sonic-net:master Jan 2, 2020
lguohan added a commit that referenced this pull request Jan 10, 2020
…c-db-cli and use new DBConnector (#3928)"

This reverts commit 0dae59a.
lguohan added a commit that referenced this pull request Jan 10, 2020
…c-db-cli and use new DBConnector (#3928)" (#4002)

This reverts commit 0dae59a.
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

Successfully merging this pull request may close these issues.

2 participants