Ticket #2561: condor_startd did not properly initially invoke hibernation plugin
Some machines from our pool have problem with hibernation, so I decide to shutdown those idle machines. But with default configuration there is only S4 among Hibernation Suported States.
After a while I found that plugin power_state did not recognize S5 with "pm-utils", but only with "/sys".
I tried change configuration
an then also HIBERNATION_PLUGIN_ARGS = -m /sys
But neither of these things work correctly.
2011-Nov-28 10:44:43 by danb:
Thanks for the patch, Lukas!
In the manual, the behavior of HIBERNATION_PLUGIN_ARGS is explicitly defined: "Used only when the condor_startd is not initially invoking the plug-in to determine the low power states supported." So this patch would alter the defined behavior. Unfortunately, I don't know why the behavior is defined the way it is. Perhaps instead of changing it, we could add a new configuration variable HIBERNATION_PLUGIN_INIT_ARGS?
I agree that suppression of stderr is bad, because it makes debugging impossible. However, I am concerned that by mixing stderr with stdout, we would introduce an implicit constraint on the behavior of the hibernation plugin: it must never emit any stderr output except in case of failure. (And in case of failure, only the first line of stderr output is logged.) I think to better handle this case, Condor should provide a popen-like implementation that provides separate stdout and stderr pipes. In addition, it should provide a convenience function that correctly handles reading the full stdout and stderr output into strings and returning the status of the program. I have made a ticket suggesting this: #2668.
2011-Dec-07 15:04:45 by tstclair:
What is the state of this it has a FiV of 7.7.4 and no commits.
2011-Dec-14 15:58:00 by johnkn:
I discussed Dan's objections with him and we decided to go ahead and accept the patch from Lukas unmodified, the documentation will be changed to reflect the new behavior.
2011-Dec-15 10:40:55 by smoler:
Karen documented changes with TJ's description of code change.
Check-in : version history item and updates to knob definitions HIBERNATION_PLUGIN and HIBERNATION_PLUGIN_ARGS ===GT=== #2561 (By Karen Miller )|
Check-in : fix startd to pass arguments through to the hibernator, patch submitted by Lukas Slebodnik email@example.com #2561 ===VersionHistory:Pending=== (By John (TJ) Knoeller )|
1544 bytes added by slebodnik on 2011-Oct-19 11:12:23 UTC.
Only in method StartdHibernator::initialize() hibernation plugin is called with agrument ad to detect Hibernation Suported States. But additional command line arguments from HIBERNATION_PLUGIN_ARGS are ignored. This patch fix it.
Other repairs in patch:
- my_popenv() will also return STDERR, because it was ignored. Therefore it was impossible find error from log files, if plugin was called with wrong arguments
For example: HIBERNATION_PLUGIN_ARGS = "-m /sys"
- added debug print to help fix previous mistake