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

Software Version not listed in gnmi_get of /openconfig-platform:components #100

Open
sachin-brm opened this issue Sep 10, 2019 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@sachin-brm
Copy link
Collaborator

sachin-brm commented Sep 10, 2019

Problem Description/Summary :

Software Version not listed in gnmi_get of /openconfig-platform:components

Expected Behavior :

Software version is supported yang object and should be listed:

https://github.com/project-arlo/sonic-mgmt-framework/wiki/YANG-Object-Reference

Topology :

DUT

Steps to Repro :

Perform a gnmi_get on openconfig-platform:components YANG model.
Observe that "software version" is not listed in gNMI o/p even though it is a supported YANG object.

root@sonic:/home/admin# docker exec -it telemetry bash
root@sonic:/# gnmi_get -xpath /openconfig-platform:components -target_addr 127.0.0.1:8080 -insecure
== getRequest:
prefix: <
>
path: <
elem: <
name: "openconfig-platform:components"
>
>
encoding: JSON_IETF

== getResponse:
notification: <
timestamp: 1568053269737861642
prefix: <
>
update: <
path: <
elem: <
name: "openconfig-platform:components"
>
>
val: <
json_ietf_val: "{\"openconfig-platform:components\":{\"component\":[\{\"name\":\"System Eeprom\",\"state\":\{\"description\":\"x86_64-accton_as7712_32x-r0\",\"empty\":false,\"hardware-version\":\"R02B\",\"id\":\"7712-32X-O-AC-F\",\"location\":\"Slot 1\",\"mfg-date\":\"05/25/2017\",\"mfg-name\":\"Edgecore\",\"name\":\"System Eeprom\",\"oper-status\":\"openconfig-platform-types:ACTIVE\",\"part-no\":\"FP3ZZ7632014A\",\"removable\":false,\"serial-no\":\"771232X1721081\"}}]}}"
>
>
>

root@sonic:/#

Telemetry log:

Sep 9 18:21:09.739310 sonic INFO telemetry#supervisord: telemetry I0909 18:21:09.737875 38 translib.go:385] Received Get request for path = /openconfig-platform:components
Sep 9 18:21:09.739310 sonic INFO telemetry#supervisord: telemetry I0909 18:21:09.737916 38 app_interface.go:116] getAppModule called for path =/openconfig-platform:components
Sep 9 18:21:09.739383 sonic INFO telemetry#supervisord: telemetry I0909 18:21:09.737933 38 app_interface.go:123] found the entry in the map for path =/openconfig-platform:components
Sep 9 18:21:09.739383 sonic INFO telemetry#supervisord: telemetry I0909 18:21:09.737954 38 app_interface.go:154] cast to appInterface worked&{<nil> [] <nil> <nil>}
Sep 9 18:21:09.739383 sonic INFO telemetry#supervisord: telemetry I0909 18:21:09.738079 38 pfm_app.go:44] initialize:if:path =/openconfig-platform:components
Sep 9 18:21:09.739411 sonic INFO telemetry#supervisord: telemetry I0909 18:21:09.738163 38 db.go:310] NewDB: Init indication not requested
Sep 9 18:21:09.739411 sonic INFO telemetry#supervisord: telemetry I0909 18:21:09.738198 38 pfm_app.go:97] PlatformApp: translateGet - path: /openconfig-platform:components
Sep 9 18:21:09.739709 sonic INFO telemetry#supervisord: telemetry I0909 18:21:09.738214 38 pfm_app.go:136] Received GET for PlatformApp Template: /openconfig-platform:components ,path: /openconfig-platform:components, vars: map[]
Sep 9 18:21:09.739709 sonic INFO telemetry#supervisord: telemetry I0909 18:21:09.738252 38 pfm_app.go:329] Preparing json for system eeprom
Sep 9 18:21:09.739709 sonic INFO telemetry#supervisord: telemetry I0909 18:21:09.738320 38 pfm_app.go:188] getSysEepromFromFile Enter

eepro json which is read for this data does not have 'software version' info.

Reproducibility ( Ex:- 3 out of 3 attempts ) Please also update "Reproducible" field :

Always

@sachin-brm sachin-brm added the bug Something isn't working label Sep 10, 2019
@jeff-yin jeff-yin assigned arunsundark and unassigned jeff-yin Sep 10, 2019
@jeff-yin
Copy link
Collaborator

The issue is that software version is not a parameter contained in the eeprom. That info should be read from somewhere else, like how the SONiC show version command reads it.

@rvasanthm
Copy link
Collaborator

Hello Sachin,
As of now system app supports only system eeprom component. Software version attribute under component instance is currently handled in the backend, this info will get populated only if software version info is programmed in system eeprom.

Solutions:

  1. System eeprom should be populated upon installing the sonic image so that existing backend changes will pick it up(I think this should be the ideal approach).
  2. Add workaround in the backend to read from the host system (like sonic cli-> show version command) and fill the software version field.

Please let me know what is expected and which approach you want to take.

@sachin-brm
Copy link
Collaborator Author

sachin-brm commented Sep 12, 2019 via email

@kuanyu99
Copy link

Excuse me, how do you make the pfm_app.go workable when it tries to read the "/mnt/platform/syseeprom"?
My "platform" directory has nothing but empty, not to speak of the "syseeprom" file.

Best Reagrds,
Kuanyu

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants