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

PSUd changes to compute power-budget for Modular chassis #104

Merged
merged 4 commits into from
Nov 11, 2020

Conversation

mprabhu-nokia
Copy link
Contributor

@mprabhu-nokia mprabhu-nokia commented Oct 20, 2020

PSUd changes to computer power-budget for Modular chassis

HLD: sonic-net/SONiC#646

PSUd will introduce power requirements calculations. Platform APIs are introduced to provide consumers and total consumed power. Number of PSUs will help provide total supplied power

Output of STATE-DB:

  "CHASSIS_INFO|chassis_power_budget 1": {
    "expireat": 1603182970.639244,
    "ttl": -0.001,
    "type": "hash",
    "value": {
      "SUPERVISOR consumed_power": "80.0",
      "FABRIC-CARD consumed_power": "185.0",
      "FAN consumed_power": "999",
      "LINE-CARD consumed_power": "1000.0",
      "PSU supplied_power": "9000.0"
    }
  },

PSUd will introduce power requirements calculations. Platform APIs
are introduced to provide consumers and total consumed power.
Number of PSUs will help provide total supplied power
Addressed review-comments to move get_maxiumum_consumed_power(),
get_status_master_led() and set_status_master_led() to PSU etc.
This can in future be added to Fan and other peripherals

Added UT to test the power-budget feature
@anshuv-mfst
Copy link

@judyjoseph , Shyam, Samuel A( Arista) - please review this PR.

Thanks

sonic-psud/scripts/psud Outdated Show resolved Hide resolved
sonic-psud/scripts/psud Outdated Show resolved Hide resolved
sonic-psud/scripts/psud Outdated Show resolved Hide resolved
@jleveque
Copy link
Contributor

jleveque commented Nov 6, 2020

@Junchao-Mellanox: Please review, also.

@jleveque jleveque changed the title PSUd changes to computer power-budget for Modular chassis PSUd changes to compute power-budget for Modular chassis Nov 6, 2020
@jleveque
Copy link
Contributor

jleveque commented Nov 6, 2020

@Staphylo, @minionatwork: Please review again.

@jleveque
Copy link
Contributor

Please fix conflicts

@mprabhu-nokia
Copy link
Contributor Author

Please fix conflicts

Done. Thanks.

@jleveque
Copy link
Contributor

@Staphylo, @minionatwork: Please review again.

@jleveque jleveque merged commit 05c79de into sonic-net:master Nov 11, 2020
@mprabhu-nokia mprabhu-nokia deleted the nokia-psud-pr branch November 12, 2020 21:43
vdahiya12 pushed a commit to vdahiya12/sonic-platform-daemons that referenced this pull request Apr 4, 2022
…r_info_dict for platform api 1.0 (sonic-net#104)

Fixes the following bug reproduced on SONiC.HEAD.729-dirty-20200727.075328:
```
pmon#supervisord: xcvrd Traceback (most recent call last):
INFO pmon#supervisord: xcvrd   File "/usr/bin/xcvrd", line 1207, in <module>
INFO pmon#supervisord: xcvrd     main()
INFO pmon#supervisord: xcvrd   File "/usr/bin/xcvrd", line 1204, in main
INFO pmon#supervisord: xcvrd     xcvrd.run()
INFO pmon#supervisord: xcvrd   File "/usr/bin/xcvrd", line 1165, in run
INFO pmon#supervisord: xcvrd     self.init()
INFO pmon#supervisord: xcvrd   File "/usr/bin/xcvrd", line 1144, in init
INFO pmon#supervisord: xcvrd     post_port_sfp_dom_info_to_db(is_warm_start, self.stop_event)
INFO pmon#supervisord: xcvrd   File "/usr/bin/xcvrd", line 430, in post_port_sfp_dom_info_to_db
INFO pmon#supervisord: xcvrd     post_port_sfp_info_to_db(logical_port_name, int_tbl, transceiver_dict, stop_event)
INFO pmon#supervisord: xcvrd   File "/usr/bin/xcvrd", line 260, in post_port_sfp_info_to_db
INFO pmon#supervisord: xcvrd     ('application_advertisement',port_info_dict['application_advertisement'])])
INFO pmon#supervisord: xcvrd KeyError: 'application_advertisement'
```

Signed-off-by: Volodymyr Boyko <[email protected]>
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.

7 participants