Skip to content

[thermalctld] fix some redundant removal of state DB tables#315

Merged
prgeor merged 8 commits intosonic-net:masterfrom
vdahiya12:pmon-master-2
Dec 9, 2022
Merged

[thermalctld] fix some redundant removal of state DB tables#315
prgeor merged 8 commits intosonic-net:masterfrom
vdahiya12:pmon-master-2

Conversation

@vdahiya12
Copy link
Contributor

@vdahiya12 vdahiya12 commented Nov 17, 2022

Signed-off-by: vaibhav-dahiya vdahiya@microsoft.com
This PR aims to get rid of such messages in syslog when thermalctld, essentially delete keys is getting called twice, causing some redis issues.
This PR gets rid of deleting such keys twice.

Nov 16 00:33:00.566174 sonic INFO pmon#/supervisord: thermalctld Exception ignored in: <function TemperatureUpdater.del at 0xb5dbe810>
Nov 16 00:33:00.566585 sonic INFO pmon#/supervisord: thermalctld Traceback (most recent call last):
Nov 16 00:33:00.566825 sonic INFO pmon#/supervisord: thermalctld File "/usr/local/bin/thermalctld", line 558, in del
Nov 16 00:33:00.567014 sonic INFO pmon#/supervisord: thermalctld table_keys = self.table.getKeys()
Nov 16 00:33:00.567181 sonic INFO pmon#/supervisord: thermalctld File "/usr/lib/python3/dist-packages/swsscommon/swsscommon.py", line 2320, in getKeys
Nov 16 00:33:00.567343 sonic INFO pmon#/supervisord: thermalctld return _swsscommon.Table_getKeys(self)
Nov 16 00:33:00.567499 sonic INFO pmon#/supervisord: thermalctld RuntimeError: RedisReply catches system_error: command: 2#015
Nov 16 00:33:00.567658 sonic INFO pmon#/supervisord: thermalctld $4#015
Nov 16 00:33:00.567811 sonic INFO pmon#/supervisord: thermalctld KEYS#015
Nov 16 00:33:00.567964 sonic INFO pmon#/supervisord: thermalctld $18#015
Nov 16 00:33:00.568118 sonic INFO pmon#/supervisord: thermalctld TEMPERATURE_INFO|
#15
Nov 16 00:33:00.568273 sonicINFO pmon#/supervisord: thermalctld , reason: Expected to get redis type 2 got type 3, err: NON-STRING-REPLY: Input/output error: Input/output error

Description

Motivation and Context

How Has This Been Tested?

Additional Information (Optional)

Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
@prgeor
Copy link
Collaborator

prgeor commented Nov 23, 2022

@vdahiya12 could you update

Description
Motivation and Context
How Has This Been Tested?

@prgeor prgeor self-assigned this Nov 23, 2022
self.table._del(name)
if self.is_chassis_system and self.chassis_table is not None:
self.chassis_table._del(name)
if self.is_chassis_system and self.chassis_table is not None:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this issue is not seen on fixed platform i.e non-modular chassis?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure, need to investgate

if self.is_chassis_system and self.chassis_table is not None:
self.chassis_table._del(name)
if self.is_chassis_system and self.chassis_table is not None:
self.chassis_table._del(name)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this tested?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, tested on M0 failing device

@Junchao-Mellanox
Copy link
Collaborator

Please add new unit test case and fix the existing test case failure.

if self.is_chassis_system and self.chassis_table is not None:
self.chassis_table._del(name)
if self.is_chassis_system and self.chassis_table is not None:
self.chassis_table._del(name)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

where is name defined?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
@prgeor
Copy link
Collaborator

prgeor commented Dec 8, 2022

@Junchao-Mellanox any more comments.? LGTM

lotus-nexthop pushed a commit to lotus-nexthop/sonic-platform-daemons that referenced this pull request Oct 28, 2025
…onic-net#315)

* Add get_transceiver_status to API interface

* Add test_ccmis support

* Add get_transceiver_pm API interface

* Add debug log and more description for interface

* Remove unnecessary pass
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants