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

port_config.ini is not a part of saved config during upgrade #2047

Closed
andriymoroz-mlnx opened this issue Sep 13, 2018 · 4 comments
Closed

port_config.ini is not a part of saved config during upgrade #2047

andriymoroz-mlnx opened this issue Sep 13, 2018 · 4 comments

Comments

@andriymoroz-mlnx
Copy link
Collaborator

Description

After sonic2sonic upgrade changed port_config.ini is replaced by default version from the image.

Steps to reproduce the issue:

  1. update port_config.ini according to needed port split (do config load_minigraph to regenerate config_db)
  2. check interfaces are up (according to split set up)
  3. do sonic2sonic upgrade
  4. reboot
  5. check interfaces - new config is a kind of mixture of interfaces from split setup and default one

Describe the results you received:

  Interface        Lanes    Speed    MTU       Alias    Oper    Admin
-----------  -----------  -------  -----  ----------  ------  -------
  Ethernet0      0,1,2,3      10G    N/A   Ethernet0     N/A      N/A
  Ethernet1            1      10G    N/A   Ethernet1     N/A      N/A
  Ethernet2            2      10G    N/A   Ethernet2     N/A      N/A
  Ethernet3            3      10G    N/A   Ethernet3     N/A      N/A
  Ethernet4      4,5,6,7      10G    N/A   Ethernet4     N/A      N/A
  Ethernet5            5      10G    N/A   Ethernet5     N/A      N/A
  Ethernet6            6      10G    N/A   Ethernet6     N/A      N/A
  Ethernet7            7      10G    N/A   Ethernet7     N/A      N/A
  Ethernet8    8,9,10,11      10G    N/A   Ethernet8     N/A      N/A
  Ethernet9            9      10G    N/A   Ethernet9     N/A      N/A
 Ethernet10           10      10G    N/A  Ethernet10     N/A      N/A
 Ethernet11           11      10G    N/A  Ethernet11     N/A      N/A
 Ethernet12  12,13,14,15      10G    N/A  Ethernet12     N/A      N/A
 Ethernet13           13      10G    N/A  Ethernet13     N/A      N/A
 Ethernet14           14      10G    N/A  Ethernet14     N/A      N/A
 Ethernet15           15      10G    N/A  Ethernet15     N/A      N/A
 Ethernet16  16,17,18,19      10G    N/A  Ethernet16     N/A      N/A
 Ethernet17           17      10G    N/A  Ethernet17     N/A      N/A
 Ethernet18           18      10G    N/A  Ethernet18     N/A      N/A
 Ethernet19           19      10G    N/A  Ethernet19     N/A      N/A
 Ethernet20  20,21,22,23      10G    N/A  Ethernet20     N/A      N/A
 Ethernet21           21      10G    N/A  Ethernet21     N/A      N/A
 Ethernet22           22      10G    N/A  Ethernet22     N/A      N/A
 Ethernet23           23      10G    N/A  Ethernet23     N/A      N/A
 Ethernet24  24,25,26,27      10G    N/A  Ethernet24     N/A      N/A
 Ethernet25           25      10G    N/A  Ethernet25     N/A      N/A
 Ethernet26           26      10G    N/A  Ethernet26     N/A      N/A
 Ethernet27           27      10G    N/A  Ethernet27     N/A      N/A
 Ethernet28  28,29,30,31      50G    N/A  Ethernet28     N/A      N/A
 Ethernet29        30,31      50G    N/A  Ethernet29     N/A      N/A
 Ethernet32  32,33,34,35      50G    N/A  Ethernet32     N/A      N/A
 Ethernet36  36,37,38,39      50G    N/A  Ethernet36     N/A      N/A
 Ethernet40  40,41,42,43      40G    N/A  Ethernet40     N/A      N/A
 Ethernet44  44,45,46,47      40G    N/A  Ethernet44     N/A      N/A
 Ethernet48  48,49,50,51      40G    N/A  Ethernet48     N/A      N/A
 Ethernet52  52,53,54,55      40G    N/A  Ethernet52     N/A      N/A
 Ethernet56  56,57,58,59      40G    N/A  Ethernet56     N/A      N/A
 Ethernet60  60,61,62,63      40G    N/A  Ethernet60     N/A      N/A

Describe the results you expected:

  Interface        Lanes    Speed    MTU       Alias    Oper    Admin
-----------  -----------  -------  -----  ----------  ------  -------
  Ethernet0            0      10G   9216   Ethernet0    down     down
  Ethernet1            1      10G   9100   Ethernet1    down       up
  Ethernet2            2      10G   9100   Ethernet2    down       up
  Ethernet3            3      10G   9100   Ethernet3    down       up
  Ethernet4            4      10G   9100   Ethernet4    down       up
  Ethernet5            5      10G   9100   Ethernet5    down       up
  Ethernet6            6      10G   9100   Ethernet6    down       up
  Ethernet7            7      10G   9100   Ethernet7    down       up
  Ethernet8            8      10G   9100   Ethernet8    down       up
  Ethernet9            9      10G   9100   Ethernet9    down       up
 Ethernet10           10      10G   9100  Ethernet10    down       up
 Ethernet11           11      10G   9100  Ethernet11    down       up
 Ethernet12           12      10G   9100  Ethernet12    down       up
 Ethernet13           13      10G   9100  Ethernet13    down       up
 Ethernet14           14      10G   9100  Ethernet14    down       up
 Ethernet15           15      10G   9100  Ethernet15    down       up
 Ethernet16           16      10G   9100  Ethernet16    down       up
 Ethernet17           17      10G   9100  Ethernet17    down       up
 Ethernet18           18      10G   9100  Ethernet18    down       up
 Ethernet19           19      10G   9100  Ethernet19    down       up
 Ethernet20           20      10G   9100  Ethernet20    down       up
 Ethernet21           21      10G   9100  Ethernet21    down       up
 Ethernet22           22      10G   9100  Ethernet22    down       up
 Ethernet23           23      10G   9100  Ethernet23    down       up
 Ethernet24           24      10G   9100  Ethernet24    down       up
 Ethernet25           25      10G   9216  Ethernet25    down     down
 Ethernet26           26      10G   9216  Ethernet26    down     down
 Ethernet27           27      10G   9216  Ethernet27    down     down
 Ethernet28        28,29      50G   9100  Ethernet28    down       up
 Ethernet29        30,31      50G   9100  Ethernet29    down       up
 Ethernet32  32,33,34,35      50G   9100  Ethernet32    down       up
 Ethernet36  36,37,38,39      50G   9100  Ethernet36    down       up
 Ethernet40  40,41,42,43      40G   9216  Ethernet40    down     down
 Ethernet44  44,45,46,47      40G   9216  Ethernet44    down     down
 Ethernet48  48,49,50,51      40G   9216  Ethernet48    down     down
 Ethernet52  52,53,54,55      40G   9216  Ethernet52    down     down
 Ethernet56  56,57,58,59      40G   9216  Ethernet56    down     down
 Ethernet60  60,61,62,63      40G   9216  Ethernet60    down     down

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

**Output of `show version`:**

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

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

```
(paste your output here)
```
@lguohan
Copy link
Collaborator

lguohan commented Sep 21, 2018

  1. portsyncd should read lane information read from config_db directly
  2. if config_db exists, we should not read from port_configini.

that should solve this s2s upgrade issue.

@andriymoroz
Copy link

does it mean to process port_config.ini on first boot and move all info to config_db (including aliases, etc) as we do with the minigraph?
if so, it still can be good to save it (like minigraph). This will allow to delete config_db.json and execute "config load_minigraph" to get clear config and still maintain desired port split.

@qiluo-msft
Copy link
Collaborator

@lguohan Do you mean portsyncd or portorch in your comment?

portsyncd should read lane information read from config_db directly

@yxieca
Copy link
Contributor

yxieca commented Sep 19, 2019

@andriymoroz-mlnx Is this issue address already? Please feel free to reopen if the issue still exists.

@yxieca yxieca closed this as completed Sep 19, 2019
taras-keryk pushed a commit to taras-keryk/sonic-buildimage that referenced this issue Apr 28, 2022
…NG container (sonic-net#2047)

#### What I did
Did a debug session with Ping Mao and found this case is failing in her PR: sonic-net#9545 I think it is an interesting case and I added it explicitly to GCU.

Adding unit-test where path and ref paths are under the same YANG container

[sonic-loopback-interface.yang](https://github.com/Azure/sonic-buildimage/blob/master/src/sonic-yang-models/yang-models/sonic-loopback-interface.yang) has:
```yang
    container sonic-loopback-interface {
        container LOOPBACK_INTERFACE {
            list LOOPBACK_INTERFACE_LIST {
                ...
                leaf name{
                    type string;
                }
                ...
            list LOOPBACK_INTERFACE_IPPREFIX_LIST {
                leaf name{
                    ...
                    type leafref {
                        path "../../LOOPBACK_INTERFACE_LIST/name";
                    }
                }
               ...
```

#### How I did it
Unit-test added

#### How to verify it
unit-test

#### 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)
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

6 participants