Project

General

Profile

Bug #79239

Ensure UPS is not ONLINE at shutdown event

Added by Hugh Trentham over 2 years ago. Updated over 2 years ago.

Status:
Done
Priority:
No priority
Assignee:
Waqar Ahmed
Category:
Services
Seen in:
Severity:
New
Reason for Closing:
Reason for Blocked:
Needs QA:
No
Needs Doc:
No
Needs Merging:
No
Needs Automation:
No
Support Suite Ticket:
n/a
Hardware Configuration:
ChangeLog Required:
No

Description

When I have UPS service enabled and set to Master, my FreeNAS server shutsdown over night. I disable the UPS service server stays up and running.
Since I upgraded to 11.2-U2.1 update the UPS service is shutting down my server.


Related issues

Has duplicate FreeNAS - Bug #82803: Refer to ticket # 79239Closed
Copied to FreeNAS - Bug #84916: Ensure UPS is not ONLINE at shutdown event Ready for Testing

Associated revisions

Revision 6bb4f770 (diff)
Added by Waqar Ahmed over 2 years ago

Ensure UPS is not ONLINE at shutdown event This commit ensures UPS is not ONLINE when shutdown event is passed by upssched. There are cases where battery/charger issues can result in ups.status being 'OL LB' at the same time. This will ensure that we don't initiate a shutdown if ups is OL. Ticket: #79239

Revision e22eff91 (diff)
Added by Waqar Ahmed over 2 years ago

Ensure UPS is not ONLINE at shutdown event This commit ensures UPS is not ONLINE when shutdown event is passed by upssched. There are cases where battery/charger issues can result in ups.status being 'OL LB' at the same time. This will ensure that we don't initiate a shutdown if ups is OL. Ticket: #79239

Revision 810d28ef (diff)
Added by Waqar Ahmed over 2 years ago

tkt-79239: Ensure UPS is not ONLINE at shutdown event (#2833) Ensure UPS is not ONLINE at shutdown event This commit ensures UPS is not ONLINE when shutdown event is passed by upssched. There are cases where battery/charger issues can result in ups.status being 'OL LB' at the same time. This will ensure that we don't initiate a shutdown if ups is OL. Ticket: #79239

History

#1 Updated by Hugh Trentham over 2 years ago

  • File debug-freenas-20190306214305.txz added
  • Private changed from No to Yes

#2 Updated by Dru Lavigne over 2 years ago

  • Assignee changed from Release Council to William Grzybowski

#3 Updated by William Grzybowski over 2 years ago

  • Assignee changed from William Grzybowski to Waqar Ahmed
  • Target version changed from Backlog to 11.2-U4

#5 Updated by Waqar Ahmed over 2 years ago

  • Status changed from Unscreened to Blocked
  • Reason for Blocked set to Need additional information from Author

Hello Hugh, so i can confirm your scenario from the debug. But according to the logs, ups service shuts down the system because the ups is on low battery - can you confirm that on your end ? The ups service logs the battery status as being on low battery and that issues a shutdown.
Looking forward to hearing from you on this. Thank you!

#6 Updated by Hugh Trentham over 2 years ago

Waqar Ahmed wrote:

Hello Hugh, so i can confirm your scenario from the debug. But according to the logs, ups service shuts down the system because the ups is on low battery - can you confirm that on your end ? The ups service logs the battery status as being on low battery and that issues a shutdown.
Looking forward to hearing from you on this. Thank you!

My battery is fully charged, I see that error to sometimes in FreeNAS. When I connect the same UPS to a different NAS device there are no issues.

#7 Updated by Waqar Ahmed over 2 years ago

Can you please attach a new debug and the output of `upsc ups` where ups in the command is the name of the identifier which you have set in Services -> Ups section. Please try to do this when the battery is charged. Thank you

#8 Updated by Waqar Ahmed over 2 years ago

Also could you please let me know that have you configured shutdown on the other NAS for ups service if UPS goes on low batterry / or on battery ( depends on how you configured it ) ? Thanks again!

#9 Updated by Hugh Trentham over 2 years ago

I sent in my bug report again, couldn't export the debug file.
Yes, the UPS works fine on my Seagate NAS and it is set to shutdown on low battery(10%)

#10 Updated by Waqar Ahmed over 2 years ago

Can you please send the output of the command as well ?

#11 Updated by Waqar Ahmed over 2 years ago

  • Has duplicate Bug #82803: Refer to ticket # 79239 added

#12 Updated by Waqar Ahmed over 2 years ago

Hello Hugh. A reminder, please send me the output of `upsc ups` and a new debug with it so that they can be matched. Thank you!

#13 Updated by Hugh Trentham over 2 years ago

Here is my output for UPS:

% upsc ups@localhost
battery.charge: 100
battery.charge.low: 10
battery.charge.warning: 20
battery.mfr.date: CPS
battery.runtime: 600
battery.runtime.low: 300
battery.type: PbAcid
battery.voltage: 24.0
battery.voltage.nominal: 24
device.mfr: CPS
device.model: CST135XLU
device.serial: CR7GT2002630
device.type: ups
driver.name: usbhid-ups
driver.parameter.pollfreq: 30
driver.parameter.pollinterval: 2
driver.parameter.port: /dev/ugen0.3
driver.parameter.synchronous: no
driver.version: 2.7.4
driver.version.data: CyberPower HID 0.4
driver.version.internal: 0.41
input.voltage: 119.0
input.voltage.nominal: 120
output.voltage: 136.0
ups.beeper.status: enabled
ups.delay.shutdown: 20
ups.delay.start: 30
ups.load: 45
ups.mfr: CPS
ups.model: CST135XLU
ups.productid: 0501
ups.realpower.nominal: 810
ups.serial: CR7GT2002630
ups.status: OL
ups.test.result: No test initiated
ups.timer.shutdown: -60
ups.timer.start: -60
ups.vendorid: 0764
% % upsc ups@localhost
ups.timer.start: -60
ups.vendorid: 0764

: Too many arguments.
% battery.charge: 100
battery.charge:: Too many arguments.
% battery.charge.low: 10
battery.charge.low:: Too many arguments.
% battery.charge.warning: 20
battery.charge.warning:: Too many arguments.
% battery.mfr.date: CPS
battery.mfr.date:: Too many arguments.
% battery.runtime: 600
battery.runtime:: Too many arguments.
% battery.runtime.low: 300
battery.runtime.low:: Too many arguments.
% battery.type: PbAcid
battery.type:: Too many arguments.
% battery.voltage: 24.0
battery.voltage:: Too many arguments.
% battery.voltage.nominal: 24
battery.voltage.nominal:: Too many arguments.
% device.mfr: CPS
device.mfr:: Too many arguments.
% device.model: CST135XLU
device.model:: Too many arguments.
% device.serial: CR7GT2002630
device.serial:: Too many arguments.
% device.type: ups
device.type:: Too many arguments.
% driver.name: usbhid-ups
driver.name:: Too many arguments.
% driver.parameter.pollfreq: 30
driver.parameter.pollfreq:: Too many arguments.
% driver.parameter.pollinterval: 2
driver.parameter.pollinterval:: Too many arguments.
% driver.parameter.port: /dev/ugen0.3
driver.parameter.port:: Too many arguments.
% driver.parameter.synchronous: no
driver.parameter.synchronous:: Too many arguments.
% driver.version: 2.7.4
driver.version:: Too many arguments.
% driver.version.data: CyberPower HID 0.4
driver.version.data:: Too many arguments.
% driver.version.internal: 0.41
driver.version.internal:: Too many arguments.
% input.voltage: 119.0
input.voltage:: Too many arguments.
% input.voltage.nominal: 120
input.voltage.nominal:: Too many arguments.
% output.voltage: 136.0
output.voltage:: Too many arguments.
% ups.beeper.status: enabled
ups.beeper.status:: Too many arguments.
% ups.delay.shutdown: 20
ups.delay.shutdown:: Too many arguments.
% ups.delay.start: 30
ups.delay.start:: Too many arguments.
% ups.load: 45
ups.load:: Too many arguments.
% ups.mfr: CPS
ups.mfr:: Too many arguments.
% ups.model: CST135XLU
ups.model:: Too many arguments.
% ups.productid: 0501
ups.productid:: Too many arguments.
% ups.realpower.nominal: 810
ups.realpower.nominal:: Too many arguments.
% ups.serial: CR7GT2002630
ups.serial:: Too many arguments.
% ups.status: OL
ups.status:: Too many arguments.
% ups.test.result: No test initiated
ups.test.result:: Too many arguments.
% ups.timer.shutdown: -60
ups.timer.shutdown:: Too many arguments.
% ups.timer.start: -60
ups.timer.start:: Too many arguments.
% ups.vendorid: 0764
ups.vendorid:: Too many arguments.
%
: No current job.
%

#14 Updated by Waqar Ahmed over 2 years ago

Please a new debug as well so i can correlate. Thank you

#15 Updated by Waqar Ahmed over 2 years ago

Also getting the debug is very easy. System -> Advanced -> Save Debug. So once you have the debug, you can attach it with choose files by coming on this ticket.

#16 Updated by Hugh Trentham over 2 years ago

  • File debug-freenas-20190402145946.tgz added

I am attaching debug.
Thanks

#17 Updated by Dru Lavigne over 2 years ago

  • Status changed from Blocked to Unscreened
  • Reason for Blocked deleted (Need additional information from Author)

#18 Updated by Waqar Ahmed over 2 years ago

  • Status changed from Unscreened to In Progress

#19 Updated by Bug Clerk over 2 years ago

  • Status changed from In Progress to Ready for Testing

#20 Updated by Bug Clerk over 2 years ago

  • Target version changed from 11.2-U4 to 11.3-BETA1

#21 Updated by Bug Clerk over 2 years ago

  • Copied to Bug #84916: Ensure UPS is not ONLINE at shutdown event added

#22 Updated by Dru Lavigne over 2 years ago

  • File deleted (debug-freenas-20190306214305.txz)

#23 Updated by Dru Lavigne over 2 years ago

  • File deleted (debug-freenas-20190402145946.tgz)

#24 Updated by Dru Lavigne over 2 years ago

  • Subject changed from FreeNAS shutting down overnight to Ensure UPS is not ONLINE at shutdown event
  • Status changed from Ready for Testing to Done
  • Target version changed from 11.3-BETA1 to Master - FreeNAS Nightlies
  • Private changed from Yes to No
  • Needs QA changed from Yes to No
  • Needs Doc changed from Yes to No
  • Needs Merging changed from Yes to No

#26 Updated by Waqar Ahmed over 2 years ago

Hello Hugh. I wanted to update you on the changes we have introduced here. If a UPS is online and also shows that it is on low battery or on battery, we don't initiate a shutdown. This case can potentially happen with bad battery/charger. So the debug states that the UPS when issued a shutdown, was ONLINE ( connected to power ) and also on LOW BATTERY. Before and after this, the UPS remains ONLINE. So i would suggest that you please have a look at the battery probably ( it is also possible that it might be an issue with your ups model and driver compatibility ).
Thank you for helping us out here, have a good day!

Also available in: Atom PDF