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

[pcied] daemon is in FATAL state when system starts #7993

Closed
DavidZagury opened this issue Jun 28, 2021 · 1 comment · Fixed by sonic-net/sonic-platform-daemons#198
Closed

Comments

@DavidZagury
Copy link
Contributor

Description

The pcied damon does not start.
It crashes when trying to start it and enters FATAL state.

Steps to reproduce the issue:

  1. Load switch
  2. Enter pmon contianer
  3. Check pcied status

Describe the results you received:

Pcied daemon crashes when trying to start it.

Describe the results you expected:

Pcied daemon should load.

Output of show version:

Image based 5c503b8

Output of show techsupport:

(paste your output here or download and attach the file here )

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

On the log we can see:

Jun 27 12:24:04.281007 r-leopard-41 INFO pmon#/supervisord: pcied File "/usr/local/bin/pcied", line 48, in load_platform_pcieutil
Jun 27 12:24:04.281070 r-leopard-41 INFO pmon#/supervisord: pcied self.log_error("Failed to load platform Pcie module. Error : {}".format(str(e)), True)
Jun 27 12:24:04.281070 r-leopard-41 INFO pmon#/supervisord: pcied NameError: name 'self' is not defined
Jun 27 12:24:04.288837 r-leopard-41 INFO pmon#/supervisord: pcied Exception ignored in: <function DaemonPcied.del at 0x7fb1817b9488>
Jun 27 12:24:04.288837 r-leopard-41 INFO pmon#/supervisord: pcied Traceback (most recent call last):
Jun 27 12:24:04.288837 r-leopard-41 INFO pmon#/supervisord: pcied File "/usr/local/bin/pcied", line 100, in del
Jun 27 12:24:04.288837 r-leopard-41 INFO pmon#/supervisord: pcied if self.status_table:
Jun 27 12:24:04.288837 r-leopard-41 INFO pmon#/supervisord: pcied AttributeError: 'DaemonPcied' object has no attribute 'status_table'

It started after the merge of sonic-net/sonic-platform-daemons#189
This PR added in the function load_platform_pcieutil on file src/sonic-platform-daemons/sonic-pcied/scripts/pcied a call to self.log_error which is not defined in this scoop.

The lines:
https://github.com/Azure/sonic-platform-daemons/blob/2d2749ab77ea0cfb9b1a9a0a5c7eeffbde9daed8/sonic-pcied/scripts/pcied#L48
https://github.com/Azure/sonic-platform-daemons/blob/2d2749ab77ea0cfb9b1a9a0a5c7eeffbde9daed8/sonic-pcied/scripts/pcied#L53

@liat-grozovik liat-grozovik changed the title [Pcied] daemon is in FATAL state when system starts [pcied] daemon is in FATAL state when system starts Jun 28, 2021
@liat-grozovik
Copy link
Collaborator

@sujinmkang could you please take a look? this is a result of recent changes in master I believe. Lets not take into 202012 until it is clear we have stable changes in master.

lguohan pushed a commit to sonic-net/sonic-platform-daemons that referenced this issue Jul 13, 2021
…' is not defined' (#198)

Fix sonic-net/sonic-buildimage#7993

- Fixes wrong log line when Pcie module does not exists that causes the pcied daemon to enter FATAL state.
- Change log level of line "Failed to load platform Pcie module" to notice since this is not an error flow, this is part of the normal loading flow we expect when a vendor didn't supply a Pcie class.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants