-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
DellEmc(Z9264f): Bug fix in show platform psustatus cli #3033
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jleveque
reviewed
Jun 18, 2019
Hi Joe,
Thanks for your valuable feedback,
As per you suggestion changes are updated and tested.
Can you please review.
Thanks & Regards,
Karthik.G
From: Joe LeVeque <notifications@github.com>
Sent: Wednesday, June 19, 2019 3:11 AM
To: Azure/sonic-buildimage
Cc: Gengan, Karthik; Author
Subject: Re: [Azure/sonic-buildimage] DellEmc(Z9264f): Bug fix in show platform psustatus cli (#3033)
[EXTERNAL EMAIL]
@jleveque commented on this pull request.
________________________________
In device/dell/x86_64-dellemc_z9264f_c3538-r0/plugins/psuutil.py<#3033 (comment)>:
@@ -35,8 +37,10 @@ def get_pmc_register(self, reg_name):
status = 1
global ipmi_sdr_list
ipmi_dev_node = "/dev/pmi0"
-
- ipmi_cmd = IPMI_SENSOR_DATA
+ ipmi_cmd = IPMI_PSU_DATA
+
+ if os.path.exists("/.dockerenv"):
Apparently this is not a good long-term solution to check for whether we are running in a Docker container. Docker also used to create a ./dockerinit file, but they have since removed it. There's a chance they remove /.dockerenv in the future, as well. It seems that a better solution is something is something like the following (in bash):
if [ $(cat /proc/self/cgroup | grep -c ":/docker") -gt 0 ] ; then
echo "Running in a Docker container"
else
echo "NOT running in a Docker container"
fi
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#3033>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AMB43EVWBDHUUTC6LSQK3X3P3FI77ANCNFSM4HZCZ54A>.
|
jleveque
suggested changes
Jun 24, 2019
Hi Joe,
Addressed your valuable comments...
Can you please review.
Thanks & Regards,
Karthik.G
From: Joe LeVeque <notifications@github.com>
Sent: Monday, June 24, 2019 11:35 PM
To: Azure/sonic-buildimage
Cc: Gengan, Karthik; Author
Subject: Re: [Azure/sonic-buildimage] DellEmc(Z9264f): Bug fix in show platform psustatus cli (#3033)
[EXTERNAL EMAIL]
@jleveque requested changes on this pull request.
________________________________
In device/dell/x86_64-dellemc_z9264f_c3538-r0/plugins/psuutil.py<#3033 (comment)>:
@@ -28,15 +30,22 @@ class PsuUtil(PsuBase):
def __init__(self):
PsuBase.__init__(self)
+
+ def isDockerEnv(self):
It might be a bit clearer if this function returned true/false based on num_docker > 0.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#3033>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AMB43EQ3MJVU7FP6DUN4DBDP4EED3ANCNFSM4HZCZ54A>.
root@sonic:/home/admin# psuutil status
PSU Status
----- --------
PSU 1 OK
PSU 2 OK
root@sonic:/home/admin# show platform psustatus
PSU Status
----- --------
PSU 1 OK
PSU 2 OK
root@sonic:/home/admin# redis-dump -d 6 -y | grep PSU_ -A5
"PSU_INFO|PSU 1": {
"type": "hash",
"value": {
"presence": "true",
"status": "true"
}
--
"PSU_INFO|PSU 2": {
"type": "hash",
"value": {
"presence": "true",
"status": "true"
}
|
jleveque
suggested changes
Jun 25, 2019
Hi Jeo,
Addressed your latest valuable comments...
Can you please review.
Thanks & Regards,
Karthik.G
From: Joe LeVeque <notifications@github.com>
Sent: Wednesday, June 26, 2019 12:36 AM
To: Azure/sonic-buildimage
Cc: Gengan, Karthik; Author
Subject: Re: [Azure/sonic-buildimage] DellEmc(Z9264f): Bug fix in show platform psustatus cli (#3033)
[EXTERNAL EMAIL]
@jleveque requested changes on this pull request.
________________________________
In device/dell/x86_64-dellemc_z9264f_c3538-r0/plugins/psuutil.py<#3033 (comment)>:
@@ -74,11 +84,10 @@ def get_psu_status(self, index):
:return: Boolean, True if PSU is operating properly, False if PSU is\
faulty
"""
- #Until psu_status is implemented this is hardcoded temporarily
+ # Until psu_status is implemented this is hardcoded temporarily
Comment should be indented another level, as it's part of the function.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#3033>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AMB43EQIUOGQNYJK3RA2NJ3P4JUA7ANCNFSM4HZCZ54A>.
|
jleveque
approved these changes
Jun 28, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
- What I did
1. Psud daemon in pmon docker is crashed due to accessing host command in docker
environment. So construct the ipmi command string based on
environments (host or docker).
- How I did it
1. Differentiating host and docker environment based on dockerenv file in docker.
- How to verify it
1.show platform psustatus
2. dump the redis database
Example:- redis-dump -d 6 -y | grep PSU_ -A5
3. snmpwalk -v 2c -c public 1.3.6.1.4.1.9.9.117.1.1.2.1.2
- Description for the changelog
- A picture of a cute animal (not mandatory but encouraged)
UT_log.txt