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

'sonic_py_common.multi_asic' has no attribute 'ROLE'" error message #188

Open
SuvarnaMeenakshi opened this issue Dec 23, 2020 · 0 comments
Assignees

Comments

@SuvarnaMeenakshi
Copy link
Contributor

Description

Error message seen in syslog: "AttributeError: module 'sonic_py_common.multi_asic' has no attribute 'ROLE'" .

Steps to reproduce the issue:

  1. Load master or 201911 image with latest snmp docker.
  2. Load configuration so that there is a default route via one of the Ethernet interfaces:
    ex:
    show ip route 0.0.0.0/0
    Routing entry for 0.0.0.0/0
    Known via "bgp", distance 20, metric 0, best
    Last update 00:44:06 ago
  • 10.0.0.57, via Ethernet0
  1. Periodically the error message comes up in the log:
    "AttributeError: module 'sonic_py_common.multi_asic' has no attribute 'ROLE'"

Describe the results you received:
Error message: "AttributeError: module 'sonic_py_common.multi_asic' has no attribute 'ROLE'" |
SNMP walk or get of Route Table (1.3.6.1.2.1.4.24.4) fails

Describe the results you expected:
SNMP walk of 1.3.6.1.2.1.4.24.4 should be successful and error message should not be visible,

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

**Output of `show version`:**

```
(paste your output here)
```

**Attach debug file `sudo generate_dump`:**

```
(paste your output here)
```
@SuvarnaMeenakshi SuvarnaMeenakshi self-assigned this Dec 23, 2020
qiluo-msft pushed a commit that referenced this issue Dec 23, 2020
…_asic variable name (#186)

[RouteUpdater]: Fix multi_asic mock function implementation.
Update multi_asic mock function to return port_table from config_db
was returning empty dictionary due to which RouteUpdater class
was not completely unit-tested as one of the condition check was
never set to true.

**- What I did**
1. Fix multi_asic mock function implementation to get port_table information.  There was a mistake in mock_get_port_table function due to which port_table was always empty dictionary.
2. Use multi_asic.get_port_table_for_asic() function as we require port_table only of a specific namespace and do not require the entire port_table.
3. Fix the incorrect multi_asic variable name used in RouteUdpater.
Provides fix for #188

**- How I did it**
1. Update multi_asic mock_get_port_table_for_asic implementation.
3. Fix the incorrect multi_asic variable name used in RouteUdpater.

**- How to verify it**
Load updated docker and query 1.3.6.1.2.1.4.24 MIB. Verify the result.
"AttributeError: module 'sonic_py_common.multi_asic' has no attribute 'ROLE'" error message should not be seen in syslog .
abdosi pushed a commit that referenced this issue Dec 31, 2020
…_asic variable name (#186)

[RouteUpdater]: Fix multi_asic mock function implementation.
Update multi_asic mock function to return port_table from config_db
was returning empty dictionary due to which RouteUpdater class
was not completely unit-tested as one of the condition check was
never set to true.

**- What I did**
1. Fix multi_asic mock function implementation to get port_table information.  There was a mistake in mock_get_port_table function due to which port_table was always empty dictionary.
2. Use multi_asic.get_port_table_for_asic() function as we require port_table only of a specific namespace and do not require the entire port_table.
3. Fix the incorrect multi_asic variable name used in RouteUdpater.
Provides fix for #188

**- How I did it**
1. Update multi_asic mock_get_port_table_for_asic implementation.
3. Fix the incorrect multi_asic variable name used in RouteUdpater.

**- How to verify it**
Load updated docker and query 1.3.6.1.2.1.4.24 MIB. Verify the result.
"AttributeError: module 'sonic_py_common.multi_asic' has no attribute 'ROLE'" error message should not be seen in syslog .
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