Skip to content

sonic-cfggen parse sonic_version error #1277

@lguohan

Description

@lguohan

Description

In /etc/sonic/sonic_version.yml, the debian versionis 8.10, but the sonic-cfggen output the version to be 8.1.

sonic-cfggen -y /etc/sonic/sonic_version.yml --print-data

{
    "onie_skip_ethmgmt_macs": "yes", 
    "onie_platform": "x86_64-mlnx_msn2700-r0", 
    "onie_machine": "mlnx_msn2700", 
    "debian_version": 8.1, 
    "build_version": "HEAD.6-181b95f", 
    "build_date": "Wed Jan  3 02:58:41 UTC 2018", 
    "build_number": 6, 
    "onie_config_version": "1", 
    "platform": "x86_64-mlnx_msn2700-r0", 
    "onie_partition_type": "gpt", 
    "asic_type": "mellanox", 
    "onie_vendor_id": "33049", 
    "commit_id": "181b95f", 
    "onie_machine_rev": "0", 
    "onie_arch": "x86_64", 
    "onie_kernel_version": "4.10.11", 
    "kernel_version": "3.16.0-4-amd64", 
    "built_by": "sonicbld@jenkins-slave-phx-1", 
    "onie_version": "2016.11-5.1.0008-9600", 
    "onie_build_date": "\"2017-04-26T11:01+0300\"", 
    "onie_switch_asic": "mlnx", 
    "onie_firmware": "auto"
}

admin@str-msn2700-05:/etc/sonic$ cat sonic_version.yml 
build_version: HEAD.6-181b95f
debian_version: 8.10
kernel_version: 3.16.0-4-amd64
asic_type: mellanox
commit_id: 181b95f
build_date: Wed Jan  3 02:58:41 UTC 2018
build_number: 6
built_by: sonicbld@jenkins-slave-phx-1

Steps to reproduce the issue:
1.
2.
3.

Describe the results you received:

Describe the results you expected:

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions