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

When configure route by frr mgmt-frmework, there is a error log output of frrcfgd.py when init switch #13109

Open
AlanYoush opened this issue Dec 19, 2022 · 5 comments
Assignees
Labels

Comments

@AlanYoush
Copy link
Contributor

Description

def listen(self):
    """Start listen Redis keyspace events and will trigger corresponding handlers when content of a table changes.
    """
    self.pubsub = self.get_redis_client(self.db_name).pubsub()
    self.pubsub.psubscribe(**{"__keyspace@{}__:*".format(self.get_dbid(self.db_name)): self.sub_msg_handler})
    self.sub_thread = self.pubsub.run_in_thread(sleep_time = 0.01)

I find that function "self.pubsub.psubscribe()" return error of getting unexpected arguments. Because pubsub.psubscribe() is defined in swsscommon.swsscommon rather than swsssdk. The argument of pubsub.psubscribe() in swsscommon.swsscommon is "string &pattern"

Steps to reproduce the issue:

  1. init switch when device is running image

Describe the results you received:

  1. Failed to configure route by frr mgmt-framework

Describe the results you expected:

  1. Configure route by frr mgmt-framework successfully

Output of show version:

Master Version

(paste your output here)

Output of show techsupport:

(paste your output here or download and attach the file here )

Additional information you deem important (e.g. issue happens only occasionally):

@gechiang gechiang added Triaged this issue has been triaged BRCM labels Jan 4, 2023
@adyeung
Copy link
Collaborator

adyeung commented Jan 20, 2023

Reassign to DELL team as discussed offline

@adyeung adyeung added DELL and removed BRCM labels Jan 20, 2023
@adyeung adyeung assigned jeff-yin and unassigned adyeung Jan 20, 2023
@mhampasagar
Copy link

looks like this issue came from this commit, @liuh-80 can you please check it.
#11215

@liuh-80
Copy link
Contributor

liuh-80 commented Jan 30, 2023

@mhampasagar , swsssdk been deprecated. This issue caused by a API gap between swss-common and redis-py:
In swss-common:
https://github.com/sonic-net/sonic-swss-common/blob/2247dbea47f968411b28b5c04d4be89d72d08cbf/common/pubsub.h
void psubscribe(const std::string &pattern);

In redis-py:
https://github.com/redis/redis-py/blob/a94772848db87bfc2c3cee20d8ca8b257fc37466/redis/asyncio/client.py
async def psubscribe(self, *args: ChannelT, **kwargs: PubSubHandler):

I will create a PR to fix this and similar issue ASAP.

@liuh-80
Copy link
Contributor

liuh-80 commented Feb 23, 2023

Fix PR created: #13836

@liuh-80
Copy link
Contributor

liuh-80 commented Feb 27, 2023

@jeff-yin, could you please review the fix for this issue? #13836

qiluo-msft pushed a commit that referenced this issue Mar 1, 2023
Fix swsscommon psubscribe code break in frrcfgd

#### Why I did it
Fix frrcfgd psubscribe code break: #13109
The code issue caused by API change when migrate from swsssdk to swsscommon

#### How I did it
Fix frrcfgd code to use swsscommon psubscribe API.

#### How to verify it
Pass all UT.
Manually check fixed code work correctly.
xumia pushed a commit to xumia/sonic-buildimage-1 that referenced this issue Mar 10, 2023
Fix swsscommon psubscribe code break in frrcfgd

#### Why I did it
Fix frrcfgd psubscribe code break: sonic-net#13109
The code issue caused by API change when migrate from swsssdk to swsscommon

#### How I did it
Fix frrcfgd code to use swsscommon psubscribe API.

#### How to verify it
Pass all UT.
Manually check fixed code work correctly.
bradh352 pushed a commit to bradh352/sonic-buildimage that referenced this issue Dec 3, 2024
Fix swsscommon psubscribe code break in frrcfgd

#### Why I did it
Fix frrcfgd psubscribe code break: sonic-net#13109
The code issue caused by API change when migrate from swsssdk to swsscommon

#### How I did it
Fix frrcfgd code to use swsscommon psubscribe API.

#### How to verify it
Pass all UT.
Manually check fixed code work correctly.
bradh352 pushed a commit to bradh352/sonic-buildimage that referenced this issue Dec 3, 2024
Fix swsscommon psubscribe code break in frrcfgd

#### Why I did it
Fix frrcfgd psubscribe code break: sonic-net#13109
The code issue caused by API change when migrate from swsssdk to swsscommon

#### How I did it
Fix frrcfgd code to use swsscommon psubscribe API.

#### How to verify it
Pass all UT.
Manually check fixed code work correctly.
bradh352 pushed a commit to bradh352/sonic-buildimage that referenced this issue Dec 3, 2024
Fix swsscommon psubscribe code break in frrcfgd

#### Why I did it
Fix frrcfgd psubscribe code break: sonic-net#13109
The code issue caused by API change when migrate from swsssdk to swsscommon

#### How I did it
Fix frrcfgd code to use swsscommon psubscribe API.

#### How to verify it
Pass all UT.
Manually check fixed code work correctly.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants