passing parameters on restart

From: Darius Buntinas (buntinas_at_mcs_dot_anl_dot_gov)
Date: Wed Jul 22 2009 - 09:04:53 PDT

  • Next message: Neal Becker: "blcr with rocks"
    I'm trying to figure out the best way to provide a process new
    parameters on a restart.
    
    Take the example of a process which is connected to a server over an
    ephemeral port.  The process is checkpointed, and later restarted and
    needs to reconnect to a new instance of the server possibly listening on
    a different port.
    
    When the process was originally started the port information was given
    as a command line parameter or an environment variable.  But when it's
    restarted from a checkpoint it gets the original values (as they're part
    of the process image).  So I need to find a way to get this new
    information to the restarted process.
    
    One solution would be to use a well-known port rather than an ephemeral
    port.  This is not the best solution since there may be more than one
    instance of the server running, and the process needs to connect to the
    correct one.  Also, the server may be running on a different node
    altogether.
    
    Another solution is to write this info to a file and have the process
    read the file on restart.  Again we'd need a well-known filename which
    would have trouble if there are multiple instances being restarted.
    
    I'm wondering if there is a way to have the restarter process open an fd
    to the server before it forks the new restarted process (I'm not sure
    how exactly this is done) so the restarted process would inherit the
    opened fd.
    
    Any ideas would be greatly appreciated.
    
    Thanks,
    -d
    

  • Next message: Neal Becker: "blcr with rocks"