Home Help Center

Starting IcePack when node is missing?

brianbrian Member brian whitneyOrganization: boulder research and developmentProject: MarketBank ✭✭✭
Hi Again,

We would like to start IcePack each day automatically via a Unix cron job. We may have several nodes(machines) involved in the application. If a node is down when trying to load the application using icepackadmin, we get this:

error: IcePack::ParserDeploymentException: :
platform.xml: ApplicationBuilder.cpp:239: IceXML::ParserException
can't find node `rhea'

Questions are:

1) Is there a way to get icepackadmin to continue to add servers for other nodes that are alive and valid even if one node is not?
(Yes, I read 21.8.4 in 1.4 manual about requirements, but just double checking. It would be nice if we did not have this requirement or could circumvent it.)

2) Is there a way to add a node to an application at a later time? For example, if the node was down and has since been brought back up?

3) If icepackadmin, icepacknode, or icepackregistry fail, do they exit with a return value that indicates failure and if so, what is it? If not, is there some way we could tell one of these failed inside a script?

Thanks for the umpteenth time,

Brian

Comments

  • benoitbenoit Rennes, FranceAdministrators, ZeroC Staff Benoit FoucherOrganization: ZeroC, Inc.Project: Ice ZeroC Staff
    Re: Starting IcePack when node is missing?

    Hi Brian,
    Originally posted by brian
    Hi Again,

    We would like to start IcePack each day automatically via a Unix cron job. We may have several nodes(machines) involved in the application. If a node is down when trying to load the application using icepackadmin, we get this:

    error: IcePack::ParserDeploymentException: :
    platform.xml: ApplicationBuilder.cpp:239: IceXML::ParserException
    can't find node `rhea'

    Note that a deployment is persistent. Once you've deployed an application or server on a set of IcePack nodes, you can bring down and restart the registry and/or nodes. Upon restart, your existing deployment should still be available.

    Questions are:

    1) Is there a way to get icepackadmin to continue to add servers for other nodes that are alive and valid even if one node is not?
    (Yes, I read 21.8.4 in 1.4 manual about requirements, but just double checking. It would be nice if we did not have this requirement or could circumvent it.)

    Not if you're using an application descriptor, however, you can do that if you register individually each server with the "server add" icepackadmin command.

    2) Is there a way to add a node to an application at a later time? For example, if the node was down and has since been brought back up?

    You can add a node to the IcePack domain at any time and deploy new servers on it (with the icepackadmin "server add" command). If you use IcePack 1.5.x, you can now update an existing application deployment to add a new server.

    3) If icepackadmin, icepacknode, or icepackregistry fail, do they exit with a return value that indicates failure and if so, what is it? If not, is there some way we could tell one of these failed inside a script?

    Yes, they are supposed to exit with EXIT_FAILURE (which is 1) in case of a failure.


    Thanks for the umpteenth time,

    Brian

    Benoit.
  • brianbrian Member brian whitneyOrganization: boulder research and developmentProject: MarketBank ✭✭✭
    Note that a deployment is persistent. Once you've deployed an application or server on a set of IcePack nodes, you can bring down and restart the registry and/or nodes. Upon restart, your existing deployment should still be available.

    I'm not sure I understand this. We can have running services and then bring down the registry and/or nodes and those services will still be running? We can then bring everything down (using icepackadmin shutdown?) and restart and those existing services will still be there?

    What about IceStorm topics, will they still be valid after restart?
    Not if you're using an application descriptor, however, you can do that if you register individually each server with the "server add" icepackadmin command.

    Right, but is there a way to do that via an xml file without using the application/node elements so we can do this in a cron script without having to do this manually in icepackadmin and/or use the -e option on many invokations of icepackadmin?
    You can add a node to the IcePack domain at any time and deploy new servers on it (with the icepackadmin "server add" command). If you use IcePack 1.5.x, you can now update an existing application deployment to add a new server.


    I'm confused. Even in 1.4, we have added a new server as long as the node already exists. However, if the node does not exist as specificied in an application descriptor, we get this message:

    Ice::ParserException can't find node 'xxx'

    Is this what is fixed in 1.5.1?
  • benoitbenoit Rennes, FranceAdministrators, ZeroC Staff Benoit FoucherOrganization: ZeroC, Inc.Project: Ice ZeroC Staff
    Hi Brian,
    Originally posted by brian
    I'm not sure I understand this. We can have running services and then bring down the registry and/or nodes and those services will still be running? We can then bring everything down (using icepackadmin shutdown?) and restart and those existing services will still be there?

    What about IceStorm topics, will they still be valid after restart?

    The servers activated by the IcePack node will be terminated when the node are shutdown. For IceStorm, yes, I believe the topics are persistent are therefore will still be there after a restart.

    Right, but is there a way to do that via an xml file without using the application/node elements so we can do this in a cron script without having to do this manually in icepackadmin and/or use the -e option on many invokations of icepackadmin?

    No, I'm afraid that's not possible. Deploying an application is supposed to be something you do once, when you setup your nodes to run the different services of your application. IcePack expect that at this time all the nodes are up and running.

    It seems that you have a different usage however, perhaps you could explain why you need to deploy the application regularly from a cron job? Is the application deployed for a short period of time and then teared down?

    I'm confused. Even in 1.4, we have added a new server as long as the node already exists. However, if the node does not exist as specificied in an application descriptor, we get this message:

    Ice::ParserException can't find node 'xxx'

    Is this what is fixed in 1.5.1?

    No, it still requires all the nodes to be up and running when deploying servers of an application. IcePack 1.5.x has totally re-designed descriptors and allows to update an existing deployment (without having to redeploy the whole application or servers). Take a look at the manual of Ice 1.5 for more information on how the new deployment mechanism works.

    Benoit.
  • brianbrian Member brian whitneyOrganization: boulder research and developmentProject: MarketBank ✭✭✭
    Thanks again for the quick reply, Benoit.
    It seems that you have a different usage however, perhaps you could explain why you need to deploy the application regularly from a cron job? Is the application deployed for a short period of time and then teared down?

    We have a stock trading platform. We want to automatically deploy an IcePack application via automatically run scripts -- e.g. a Unix cron job -- each day before trading starts and then shut it down after the trading day. We need to do this for various reasons.

    The problem is: what if a node/machine goes down during the night and that node cannot be reached by the IcePack administrator. Now, it just throws an exception and dies. We then have to 1) manually remove the node and rmanually restart IcePack; or 2) manually fix the machine and then manually restart IcePack. What would be nice and very desirable is for icepackadmin to notify the user that a node is unreachable, but continue on its merry way. Then, we could later "fix" the node, and re-add it back to the current deployed application without having to take all of our running services down and restart.

    Does this help you understand? For our discussion, it seems like this is just not possible, n'est pas?

    Brian
  • benoitbenoit Rennes, FranceAdministrators, ZeroC Staff Benoit FoucherOrganization: ZeroC, Inc.Project: Ice ZeroC Staff
    Yes, I agree, it should be possible to tell the admin tool to ignore the unreachable nodes and only deploy the servers on the nodes which are accessible. I'll put this on our TODO list!

    In the meantime, the easiest is to write a shell script and use the icepackadmin "server add" command to individually add each server. You could also write a small tool to talk directly to the IcePack::Admin interface to deploy your servers on the nodes.

    Benoit.
  • brianbrian Member brian whitneyOrganization: boulder research and developmentProject: MarketBank ✭✭✭
    Yes, I agree, it should be possible to tell the admin tool to ignore the unreachable nodes and only deploy the servers on the nodes which are accessible. I'll put this on our TODO list!

    Sounds good.
    Yes, I agree, it should be possible to tell the admin tool to ignore the unreachable nodes and only deploy the servers on the nodes which are accessible. I'll put this on our TODO list!

    Yep, and we may end up doing this.

    Thanks again for your help, Benoit!

    Brian
Sign In or Register to comment.