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

The click CLI (config ..., show ...) are not VRF aware #8

Open
bluecmd opened this issue Aug 14, 2021 · 0 comments
Open

The click CLI (config ..., show ...) are not VRF aware #8

bluecmd opened this issue Aug 14, 2021 · 0 comments

Comments

@bluecmd
Copy link
Member

bluecmd commented Aug 14, 2021

The click CLI tools fail to connect to the API service if they are launched in another VRF than default or mgmt.

E.g:

(vrf:VrfMainframe)bluecmd@adele:~$ show ip
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/dist-packages/redis/connection.py", line 559, in connect
    sock = self._connect()
  File "/usr/local/lib/python3.7/dist-packages/redis/connection.py", line 615, in _connect
    raise err
  File "/usr/local/lib/python3.7/dist-packages/redis/connection.py", line 603, in _connect
    sock.connect(socket_address)
TimeoutError: [Errno 110] Connection timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/bin/show", line 5, in <module>
    from show.main import cli
  File "/usr/local/lib/python3.7/dist-packages/show/main.py", line 9, in <module>
    import utilities_common.cli as clicommon
  File "/usr/local/lib/python3.7/dist-packages/utilities_common/cli.py", line 183, in <module>
    iface_alias_converter = InterfaceAliasConverter()
  File "/usr/local/lib/python3.7/dist-packages/utilities_common/cli.py", line 121, in __init__
    self.port_dict = multi_asic.get_port_table()
  File "/usr/local/lib/python3.7/dist-packages/sonic_py_common/multi_asic.py", line 262, in get_port_table
    ports = get_port_table_for_asic(ns)
  File "/usr/local/lib/python3.7/dist-packages/sonic_py_common/multi_asic.py", line 276, in get_port_table_for_asic
    config_db = connect_config_db_for_ns(namespace)
  File "/usr/local/lib/python3.7/dist-packages/sonic_py_common/multi_asic.py", line 44, in connect_config_db_for_ns
    config_db.connect()
  File "/usr/local/lib/python3.7/dist-packages/swsssdk/configdb.py", line 79, in connect
    self.db_connect('CONFIG_DB', wait_for_init, retry_on)
  File "/usr/local/lib/python3.7/dist-packages/swsssdk/configdb.py", line 74, in db_connect
    SonicV2Connector.connect(self, self.db_name, retry_on)
  File "/usr/local/lib/python3.7/dist-packages/swsssdk/dbconnector.py", line 264, in connect
    self.dbintf.connect(db_id, db_name, retry_on)
  File "/usr/local/lib/python3.7/dist-packages/swsssdk/interface.py", line 175, in connect
    self._onetime_connect(db_id, db_name)
  File "/usr/local/lib/python3.7/dist-packages/swsssdk/interface.py", line 192, in _onetime_connect
    client.config_set('notify-keyspace-events', self.KEYSPACE_EVENTS)
  File "/usr/local/lib/python3.7/dist-packages/redis/client.py", line 1243, in config_set
    return self.execute_command('CONFIG SET', name, value)
  File "/usr/local/lib/python3.7/dist-packages/redis/client.py", line 898, in execute_command
    conn = self.connection or pool.get_connection(command_name, **options)
  File "/usr/local/lib/python3.7/dist-packages/redis/connection.py", line 1192, in get_connection
    connection.connect()
  File "/usr/local/lib/python3.7/dist-packages/redis/connection.py", line 563, in connect
    raise ConnectionError(self._error_message(e))
redis.exceptions.ConnectionError: Error 110 connecting to 127.0.0.1:6379. Connection timed out.
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

1 participant