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

minigraph.xml is missing in /etc/sonic/ after sonic2sonic upgrade #2046

Closed
andriymoroz-mlnx opened this issue Sep 13, 2018 · 0 comments · Fixed by sonic-net/sonic-utilities#388
Assignees

Comments

@andriymoroz-mlnx
Copy link
Collaborator

Description

After sonic2sonic upgrade minigraph.xml will remain in /etc/sonic/old_config only but “config qos reload” will look for minigraph in /etc/sonic/

Steps to reproduce the issue:

  1. do sonic2sonic upgrade
  2. reboot
  3. execute config qos reload

Describe the results you received:

root@arc-switch1029:/home/admin# config qos reload
Running command: sonic-cfggen -m -t /usr/share/sonic/device/x86_64-mlnx_msn2100-r0/ACS-MSN2100/buffers.json.j2 >/tmp/buffers.json
Traceback (most recent call last):
  File "/usr/local/bin/sonic-cfggen", line 249, in <module>
    main()
  File "/usr/local/bin/sonic-cfggen", line 187, in main
    deep_update(data, parse_xml(minigraph, platform))
  File "/usr/local/lib/python2.7/dist-packages/minigraph.py", line 375, in parse_xml
    root = ET.parse(filename).getroot()
  File "lxml.etree.pyx", line 3299, in lxml.etree.parse (src/lxml/lxml.etree.c:72655)
  File "parser.pxi", line 1791, in lxml.etree._parseDocument (src/lxml/lxml.etree.c:106263)
  File "parser.pxi", line 1817, in lxml.etree._parseDocumentFromURL (src/lxml/lxml.etree.c:106564)
  File "parser.pxi", line 1721, in lxml.etree._parseDocFromFile (src/lxml/lxml.etree.c:105561)
  File "parser.pxi", line 1122, in lxml.etree._BaseParser._parseDocFromFile (src/lxml/lxml.etree.c:100456)
  File "parser.pxi", line 580, in lxml.etree._ParserContext._handleParseResultDoc (src/lxml/lxml.etree.c:94543)
  File "parser.pxi", line 690, in lxml.etree._handleParseResult (src/lxml/lxml.etree.c:96003)
  File "parser.pxi", line 618, in lxml.etree._raiseParseError (src/lxml/lxml.etree.c:95015)
IOError: Error reading file '/etc/sonic/minigraph.xml': failed to load external entity "/etc/sonic/minigraph.xml"

Describe the results you expected:
Successful qos config reload

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

root@arc-switch1029:/home/admin# systemctl status updategraph.service
● updategraph.service - Update minigraph and set configuration based on minigraph
   Loaded: loaded (/etc/systemd/system/updategraph.service; enabled)
   Active: active (exited) since Thu 2018-09-13 12:33:17 UTC; 11min ago
  Process: 941 ExecStart=/usr/bin/updategraph (code=exited, status=0/SUCCESS)
 Main PID: 941 (code=exited, status=0/SUCCESS)
   CGroup: /system.slice/updategraph.service

Sep 13 12:33:17 arc-switch1029 updategraph[941]: Use config_db.json from old system...
Sep 13 12:33:17 arc-switch1029 systemd[1]: Started Update minigraph and set configuration based on minigraph.
root@arc-switch1029:/home/admin#
**Output of `show version`:**

Upgrade SONiC.HEAD.6-6cf2d10 --> SONiC.HEAD.5-90257f5

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

```
(paste your output here)
```
wen587 added a commit that referenced this issue Mar 8, 2022
47c243e [show][muxcable] fix the sudo access error for show muxcable metrics (#2083)
f872516 [muxcable][show] enhance show mux status to show last switchover time (#2067)
d440df7 [warmboot] Migrate 10G ports during warm-reboot on s6100 (#2064)
494c6d7 [counterpoll] Display the correct default poll interval for watermark counters (#2082)
499988e [show][config] add muxcable command line support for retrieve / reset ICMP packet loss data (#2046)
8b01d3e Remove the warning message appear when there are no ports on CONFIG DB (#2050)
ed6e66e [GCU] Supporting Groupings during path-xpath translation (#2044)
25b3455 [ci] Use official build debian pkg instead and parameterize source branch (#2079)
taras-keryk pushed a commit to taras-keryk/sonic-buildimage that referenced this issue Apr 28, 2022
… ICMP packet loss data (sonic-net#2046)

Stemming from sonic-net/sonic-linkmgrd#14
sign-off: Jing Zhang [email protected]

#### What I did
Added support to retrieve and reset ICMP packet loss data in state db for muxcable.  

#### How I did it
Changes made in show/muxcable.py and config/muxcable.py

#### How to verify it
- Added unit tests. 
- Tested the command lines on testbeds. 
- Ran dualtor_io/test_link_failure.py. 

#### Previous command output (if the output of a command-line utility has changed)

#### New command output (if the output of a command-line utility has changed)
``` show muxcable pckloss <port_name>```
```
admin@str2-7050cx3-acs-07:~$ show muxcable packetloss Ethernet96 
PORT        COUNT                 VALUE
----------  ------------------  -------
Ethernet96  pck_loss_count        10439
Ethernet96  pck_expected_count    11406
PORT        EVENT                      TIME
----------  -------------------------  ---------------------------
Ethernet96  link_prober_unknown_start  2022-Jan-27 19:47:17.819699
Ethernet96  link_prober_unknown_end    2022-Jan-27 22:28:36.736928
```
```config muxcable pckloss reset <port_name>```
```
admin@str2-7050cx3-acs-07:~$ sudo config muxcable packetloss reset Ethernet96
admin@str2-7050cx3-acs-07:~$ show muxcable packetloss Ethernet96
PORT        COUNT                 VALUE
----------  ------------------  -------
Ethernet96  pck_expected_count        0
Ethernet96  pck_loss_count            0
PORT        EVENT                      TIME
----------  -------------------------  ---------------------------
Ethernet96  link_prober_unknown_start  2022-Jan-27 19:47:17.819699
Ethernet96  link_prober_unknown_end    2022-Jan-27 22:28:36.736928
```
```config muxcable pckloss reset all```
```
admin@str2-7050cx3-acs-07:~$ sudo config muxcable packetloss reset all
admin@str2-7050cx3-acs-07:~$ show muxcable packetloss Ethernet68
PORT        COUNT                 VALUE
----------  ------------------  -------
Ethernet68  pck_loss_count            0
Ethernet68  pck_expected_count        3
PORT        EVENT                      TIME
----------  -------------------------  ---------------------------
Ethernet68  link_prober_unknown_start  2022-Jan-27 19:47:17.702760
Ethernet68  link_prober_unknown_end    2022-Jan-27 22:28:36.756113

```
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 a pull request may close this issue.

3 participants