sonic-net / sonic-buildimage

Scripts which perform an installable binary image build for SONiC
Other
737 stars 1.42k forks source link

dmidecode executed for all commands but not in non-privileged path #16878

Open justindthomas opened 1 year ago

justindthomas commented 1 year ago

Description

All commands executed as non-privileged generate an error related to dmidecode. This does not seem to affect the function of the device, but is an annoyance. I started working with a different manufacturer's device at work (a Ragile unit) and noticed that it does not have this peculiarity, so decided to raise an issue here for my Dell unit.

Steps to reproduce the issue:

Here is some example output (summarized) from my Dell N3248TE-ON:

jdt@sonic:~$ show system-health
failed to import plugin show.plugins.cisco-8000: [Errno 2] No such file or directory: 'dmidecode'
Usage: show system-health [OPTIONS] COMMAND [ARGS]...

  Show system-health information

. . .
jdt@sonic:~$ sudo show system-health
Usage: show system-health [OPTIONS] COMMAND [ARGS]...

  Show system-health information
. . .
jdt@sonic:~$ show platform
failed to import plugin show.plugins.cisco-8000: [Errno 2] No such file or directory: 'dmidecode'
Usage: show platform [OPTIONS] COMMAND [ARGS]...

  Show platform-specific hardware info

. . .
jdt@sonic:~$ sudo show platform
Usage: show platform [OPTIONS] COMMAND [ARGS]...

  Show platform-specific hardware info

. . .
jdt@sonic:~$

Describe the results you received:

The expected output, but with a warning about a missing dmidecode command.

Describe the results you expected:

No warning about the dmidecode command (which does exist, but is only in the path for the root user).

Output of show version:

jdt@sonic:~$ show version
failed to import plugin show.plugins.cisco-8000: [Errno 2] No such file or directory: 'dmidecode'

SONiC Software Version: SONiC.master.381613-caf0e1884
SONiC OS Version: 11
Distribution: Debian 11.7
Kernel: 5.10.0-23-2-amd64
Build commit: caf0e1884
Build date: Sun Oct  8 12:46:25 UTC 2023
Built by: AzDevOps@vmss-soni0026C5

Platform: x86_64-dellemc_n3248te_c3338-r0
HwSKU: DellEMC-N3248TE
ASIC: broadcom
ASIC Count: 1
Serial Number: 4GNXV43
Model Number: 0WNWT9
Hardware Revision:
Uptime: 03:38:32 up 54 min,  1 user,  load average: 2.53, 2.40, 2.39
Date: Sat 14 Oct 2023 03:38:32

Docker images:
REPOSITORY                    TAG                       IMAGE ID       SIZE
docker-gbsyncd-broncos        latest                    d50a6c6f83f5   349MB
docker-gbsyncd-broncos        master.381613-caf0e1884   d50a6c6f83f5   349MB
docker-gbsyncd-credo          latest                    1a194750a1ff   320MB
docker-gbsyncd-credo          master.381613-caf0e1884   1a194750a1ff   320MB
docker-syncd-brcm             latest                    d12952d0889d   674MB
docker-syncd-brcm             master.381613-caf0e1884   d12952d0889d   674MB
docker-dhcp-relay             latest                    a0c8b59c3653   307MB
docker-macsec                 latest                    916f30b37577   326MB
docker-eventd                 latest                    3605126ec76d   299MB
docker-eventd                 master.381613-caf0e1884   3605126ec76d   299MB
docker-orchagent              latest                    9f11b1ba20ec   336MB
docker-orchagent              master.381613-caf0e1884   9f11b1ba20ec   336MB
docker-fpm-frr                latest                    e1728733d5d4   356MB
docker-fpm-frr                master.381613-caf0e1884   e1728733d5d4   356MB
docker-nat                    latest                    a64b25e0719f   327MB
docker-nat                    master.381613-caf0e1884   a64b25e0719f   327MB
docker-sflow                  latest                    5fe034e83abc   326MB
docker-sflow                  master.381613-caf0e1884   5fe034e83abc   326MB
docker-teamd                  latest                    04ba3d3d05d6   324MB
docker-teamd                  master.381613-caf0e1884   04ba3d3d05d6   324MB
docker-platform-monitor       latest                    a6b7650ac2c8   419MB
docker-platform-monitor       master.381613-caf0e1884   a6b7650ac2c8   419MB
docker-sonic-telemetry        latest                    2558451a27b8   387MB
docker-sonic-telemetry        master.381613-caf0e1884   2558451a27b8   387MB
docker-snmp                   latest                    ff10067bf124   338MB
docker-snmp                   master.381613-caf0e1884   ff10067bf124   338MB
docker-lldp                   latest                    58e58e5703f2   341MB
docker-lldp                   master.381613-caf0e1884   58e58e5703f2   341MB
docker-mux                    latest                    c2c043fb9724   348MB
docker-mux                    master.381613-caf0e1884   c2c043fb9724   348MB
docker-database               latest                    28bf7f3dd0d4   299MB
docker-database               master.381613-caf0e1884   28bf7f3dd0d4   299MB
docker-router-advertiser      latest                    05194bd41a1e   299MB
docker-router-advertiser      master.381613-caf0e1884   05194bd41a1e   299MB
docker-sonic-mgmt-framework   latest                    aaaacbaaee3d   416MB
docker-sonic-mgmt-framework   master.381613-caf0e1884   aaaacbaaee3d   416MB

Output of show techsupport:

See the file uploaded in https://github.com/sonic-net/sonic-buildimage/issues/16730

deke997 commented 1 year ago

Hi,

This happened to me as well (https://github.com/sonic-net/SONiC/issues/1494)

It seems to only affect the Dell N3248 for some reason. I have not had this issue on Celestica or Edgecore switches

dgsudharsan commented 1 year ago

@prgeor Please assign to appropriate individual.

justindthomas commented 11 months ago

@prgeor and @dgsudharsan I submitted a PR (noted above) to fix this.