NUT timed shutdown option #982

Closed
phillxnet opened this Issue Oct 23, 2015 · 5 comments

Projects

None yet

2 participants

@phillxnet
Contributor

Add the facility to GUI config a NUT initiated shutdown after a user chosen length of time. This would override the current default of only shutting down when On Battery (OB) and Low Battery (LB).
Please update the following forum post with progress on this issue:- http://forum.rockstor.com/t/ups-nut-rock-ons/592
Thanks to @g2_ufo on our forum for requesting this feature.

@phillxnet phillxnet was assigned by schakrava Dec 12, 2015
@schakrava schakrava added this to the Kilauea Iki milestone Dec 12, 2015
@schakrava schakrava modified the milestone: Looney Bean, Kilauea Iki Feb 28, 2016
@phillxnet
Contributor

Adding the following forum thread / post as additional interest in this feature:
https://forum.rockstor.com/t/ups-service-fails-to-start/1609/3

@phillxnet
Contributor

Further interest in NUT feature expansion expressed in the following forum thread:
https://forum.rockstor.com/t/failed-to-start-nut-ups-service-due-to-a-system-error/2135

@phillxnet phillxnet added a commit to phillxnet/rockstor-core that referenced this issue Oct 11, 2016
@phillxnet phillxnet remove redundant nut monitor info logging #982 592c6a8
@phillxnet phillxnet added a commit to phillxnet/rockstor-core that referenced this issue Oct 11, 2016
@phillxnet phillxnet minor comment edits and PEP350 corrections #982 61e656b
@phillxnet phillxnet added a commit to phillxnet/rockstor-core that referenced this issue Oct 11, 2016
@phillxnet phillxnet add todo on upssched.conf edit requirements #982 739b255
@phillxnet phillxnet added a commit to phillxnet/rockstor-core that referenced this issue Oct 12, 2016
@phillxnet phillxnet improve upssched.conf example entries #982 ce5dbc8
@phillxnet phillxnet added a commit to phillxnet/rockstor-core that referenced this issue Oct 15, 2016
@phillxnet phillxnet initial draft of NUT timed shutdown config parser #982 190ebab
@phillxnet phillxnet added a commit to phillxnet/rockstor-core that referenced this issue Oct 15, 2016
@phillxnet phillxnet add missing new line chars in early shutdown config editor #982 83ba8a9
@phillxnet phillxnet added a commit to phillxnet/rockstor-core that referenced this issue Oct 15, 2016
@phillxnet phillxnet correct incomplete cancel timer line template #982 d25b806
@phillxnet phillxnet added a commit to phillxnet/rockstor-core that referenced this issue Oct 15, 2016
@phillxnet phillxnet escape * char in match string and fix logic bug in parser #982
Given our target line contains a wild card char '*' we need to
escape this for literal char in sting match, this adds requirement
to split search pattern string from replacement string. Could be
done by inline char replacement / removal but this is simple fix
to fit current small scope of parser.
07c1d3f
@phillxnet
Contributor
phillxnet commented Oct 15, 2016 edited

Backend conf file parser is now mostly done (a little more testing once front end is in place).
TODO:

  • Add NUT shutdown timer selector to Web-UI NUT config page.
  • Ensure default shutdown timer setting is consistent with prior releases (ie disabled).
  • Correct / enhance conf template file explanatory comments.
  • Test real hw with timed shutdown option in all nut modes.
  • establish correct NUT client info is broadcast when in netserver mode for timed shutdown.
  • confirm sane behaviour when configured shutdown time period exceeds UPS capacity.
@phillxnet phillxnet added a commit to phillxnet/rockstor-core that referenced this issue Oct 16, 2016
@phillxnet phillxnet add UI template for nut shutdown timer selector #982 748e74b
@phillxnet phillxnet added a commit to phillxnet/rockstor-core that referenced this issue Oct 16, 2016
@phillxnet phillxnet add handlebar helper and tooltip for nut shutdown timer selector #982
Plus minor smartd tooltip typos and spelling.
57cf93f
@phillxnet phillxnet added a commit to phillxnet/rockstor-core that referenced this issue Oct 16, 2016
@phillxnet phillxnet improve accuracy of nut timed shutdown tooltip #982 e7917f7
@phillxnet phillxnet added a commit to phillxnet/rockstor-core that referenced this issue Oct 16, 2016
@phillxnet phillxnet make nut port placeholder text more informative #982 #1458
Several users have interpreted the previous "auto" placeholder
/ example text as an auto fill and so left it blank, this can in most
instances lead to a mis-configured nut. Changing the placeholder
text to represent more of a hint (it is already greyed out) should
help with this.
8a9613a
@phillxnet phillxnet added a commit to phillxnet/rockstor-core that referenced this issue Oct 16, 2016
@phillxnet phillxnet establish a NUT backend port default of auto #982 #1458
By defaulting to auto for the port setting we cater for the
most common connection type going forward. This takes
effect when the port entry is left blank: a situation that
has proved to be common.
1091af9
@phillxnet phillxnet added a commit to phillxnet/rockstor-core that referenced this issue Oct 16, 2016
@phillxnet phillxnet establish a NUT backend shutdown timing default of 0 #982
By defaulting to 0, which effectively disables early 'timed'
shutdown by nut we preserve the prior behaviour before
timed shutdown was a config options. The front end already
defaults to 0 so here we ensure the backend does the same.
1f46ffd
@phillxnet phillxnet added a commit to phillxnet/rockstor-core that referenced this issue Oct 16, 2016
@phillxnet phillxnet additional safeguard on nut shutdown timer seconds value #982
Protect against receiving a 'seconds' string value that cannot be
interpreted as an integer. In this instance revert to the default of
seconds = '0', log the issue, and proceed.
67c5f85
@phillxnet phillxnet added a commit to phillxnet/rockstor-core that referenced this issue Oct 16, 2016
@phillxnet phillxnet pass NUT shutdown timer value from Web-UI to config editor #982 0587d56
@phillxnet phillxnet added a commit to phillxnet/rockstor-core that referenced this issue Oct 16, 2016
@phillxnet phillxnet correct / enhance timed shutdown comments in upssched.conf template f…
…ile #982
15b2e7d
@phillxnet
Contributor

Next step is to prove / test on real hw as frontend and backend config edits appear to be working as intended.

@phillxnet phillxnet added a commit to phillxnet/rockstor-core that referenced this issue Oct 17, 2016
@phillxnet phillxnet enhance NUT timed shutdown tooltip to explain netserver priority #982 781307a
@schakrava schakrava closed this in #1490 Nov 12, 2016
@phillxnet
Contributor

All forum threads referenced have been updated.

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