| 239 | |
| 240 | wired Class mostly implemented. A few notable large code changes: |
| 241 | * Most of the checks to @devName were switched to checks against @isActive since you can't (or shouldn't) be able to activate with out knowing your devName. Check to activate is more proper since it means ready to be configured instead of I know my name (but those are almost equivalent conditions). The noteable accpetion is of course the new wired class where the name is always known, but a call to activate (for other checks and population of config hash) has not been made. |
| 242 | * All calls to @@some_line.run have been wrapped into a Timeout::timeout(@cmdTimeout){} block. If @cmdTimeout number of seconds passes, the block emits a Timeout::Error exception. I then catch this expception and re-raise it with some context info (the command I was running). Ultimately this exception will be caught in Agent commands and used as info for a "command failed" message that is sent back console. |
| 243 | |
| 244 | It should be noted that AgentCommands::configure should catch all exceptions and log them (or at least like standard error, but something pretty wide). This way the nodeagent never dies. And since every command should now timeout, the agent should never lock up (for ever). |
| 245 | |