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

[BUG] unable update name outbound interconnection #146

Closed
Tracked by #123
hnimminh opened this issue Jan 4, 2024 · 1 comment
Closed
Tracked by #123

[BUG] unable update name outbound interconnection #146

hnimminh opened this issue Jan 4, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@hnimminh
Copy link
Owner

hnimminh commented Jan 4, 2024

2024-01-04T21:01:45.169848+00:00 devsbc libresbc 1177020 INFO  space=httpapi, action=request, requestid=3c0af260-0666-4370-ae7e-94699a16d84e, request_body={'name': 'ANYPEER', 'desc': 'testing purpose route to anywhere ipv4', 'sipprofile': 'extnat', 'distribution': 'weight_based', 'rtpaddrs': ['0.0.0.0/0'], 'media_c
lass': 'GSTAR', 'capacity_class': 'UNLIMITED', 'translation_classes': [], 'manipulation_classes': [], 'privacy': ['none'], 'cid_type': 'none', 'nodes': ['_ALL_'], 'enable': True, 'gateways': [{'name': 'ANYGW', 'weight': 1}], 'engagements': ['record:somewhere:lpm:27']}                                                
2024-01-04T21:01:45.175230+00:00 devsbc libresbc 1177020 ERR  space=libreapi, action=update_outbound_interconnection, requestid=3c0af260-0666-4370-ae7e-94699a16d84e, exception=WRONGTYPE Operation against a key holding the wrong kind of value, traceback=Traceback (most recent call last):#012  File "/opt/libresbc/v0.
7.1.b/liberator/libreapi.py", line 2018, in update_outbound_interconnection#012    _endpoints = fieldjsonify(rdbconn.hget(f'routing:{engagement}', 'endpoints'))#012  File "/usr/local/lib/python3.9/dist-packages/redis/commands/core.py", line 4846, in hget#012    return self.execute_command("HGET", name, key)#012  Fi
le "/usr/local/lib/python3.9/dist-packages/redis/client.py", line 1258, in execute_command#012    return conn.retry.call_with_retry(#012  File "/usr/local/lib/python3.9/dist-packages/redis/retry.py", line 46, in call_with_retry#012    return do()#012  File "/usr/local/lib/python3.9/dist-packages/redis/client.py", line 1259, in <lambda>#012    lambda: self._send_command_parse_response(#012  File "/usr/local/lib/python3.9/dist-packages/redis/client.py", line 1235, in _send_command_parse_response#012    return self.parse_response(conn, command_name, **options)#012  File "/usr/local/lib/python3.9/dist-packages/redis/client.py", line 1275, in parse_response#012    response = connection.read_response()#012  File "/usr/local/lib/python3.9/dist-packages/redis/connection.py", line 865, in read_response#012    raise response#012redis.exceptions.ResponseError: WRONGTYPE Operation against a key holding the wrong kind of value
2024-01-04T21:01:45.176589+00:00 devsbc libresbc 1177020 INFO  space=httpapi, action=middleware, processtime=0.008, requestid=3c0af260-0666-4370-ae7e-94699a16d84e, clientip=85.253.103.46, request=put:/libreapi/interconnection/outbound/IMPLY, status_code=500, response_body=null
                # hash type
                if engagement.startswith('table'):
                    _endpoints = fieldjsonify(rdbconn.hget(f'routing:{engagement}', 'endpoints'))
                    if _endpoints:
                        endpoints = [name if endpoint == identifier else endpoint for endpoint in _endpoints]
                        pipe.hset(f'routing:{engagement}', 'endpoints', fieldredisify(endpoints))
                # string type
                if engagement.startswith('record'):
                    _endpoints = fieldjsonify(rdbconn.hget(f'routing:{engagement}', 'endpoints'))
                    _action = rdbconn.hget(f'routing:{engagement}', 'action')
                    if _endpoints and _action==_ROUTE:
                        endpoints = [name if endpoint == identifier else endpoint for endpoint in _endpoints]
                        pipe.hset(f'routing:{engagement}', 'endpoints', fieldredisify(endpoints))
@hnimminh hnimminh added the bug Something isn't working label Jan 4, 2024
@hnimminh hnimminh self-assigned this Jan 4, 2024
@hnimminh hnimminh mentioned this issue Jan 12, 2024
34 tasks
hnimminh added a commit that referenced this issue Jan 13, 2024
@hnimminh
Copy link
Owner Author

fixed by fdb37a6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant