Changes between Version 19 and Version 20 of Internal/NewNodeAgent


Ignore:
Timestamp:
Feb 13, 2015, 1:49:08 AM (9 years ago)
Author:
ssugrim
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Internal/NewNodeAgent

    v19 v20  
    77 * cocaine refrence [https://github.com/thoughtbot/cocaine here]
    88 * yaml?
     9 * timeout
    910
    1011
     
    236237
    237238added UML diagram of driver class layout. Followed UML guidelines from [http://www.ibm.com/developerworks/rational/library/content/RationalEdge/sep04/bell/ here] and [http://aviadezra.blogspot.com/2009/05/uml-association-aggregation-composition.html here]. Note Diamond = composotion, and arrow = parent.
     239
     240wired 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
     244It 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