Archived

This forum has been archived. Please start a new discussion on GitHub.

IcePatch2 Functionality

Hi guys, it's me again with what again is probably a schoolboy error.

I have a grid set up now with two instances each of two simple Compoments running as IceBox services which are load-balanced via two replica Groups.

I want to confirm now that it is feasible to patch one Service without impacting the other.

I have an ice patch Server in my grid, and when the grid starts up it all kicks in and seems to work fine.

My next steps are the following:

1) Change source file and compile
2) Copy resulting dll into the "source" Directory, i.e. the Directory which icepatch2 sources binaries from as defined by its Ice.Patch Directory property
3) Manually run icepatchcalc2.exe on this "source" Directory
4) Run server patch SERVER_NAME or indeed application patch APPLICATION_NAME from a grid admin session

The patch is carried out but it doesn't seem to recognise that the underlying binaries have changed.

I have tried Setting the IcePatch2.Thorough property to 1 in my icebox XML definitions but that had no effect (not sure that would be the right place to put it anyway).

If I remove and re-add my grid application then the full process kicks off and I get the new Version of my Service, but I want to be able to do this without a re-boot.

Apologies in advance if there is an obvious answer to this in the doc or if I've made a silly mistake.

Here is my currend grid XML:

<?xml version="1.0" encoding="utf-8"?>
<icegrid>
<application name="grid">
<replica-group id="ReplicatorAddService">
<load-balancing type="round-robin"/>
<object identity="AddServiceGateway" type="::ProView::Grid::Slice::Test::AddService"/>
</replica-group>

<replica-group id="ReplicatorSubtractService">
<load-balancing type="round-robin"/>
<object identity="SubtractServiceGateway" type="::ProView::Grid::Slice::Test::SubtractService"/>
</replica-group>

<service-template id="AddService">
<parameter name="instanceId"/>
<service name="AddService-${instanceId}" entry="${server.distrib}/AddService/ProView.Grid.Add.dll:ProView.Grid.Add.Service">
<properties>
<property name="instanceId" value="${instanceId}"/>
</properties>
<description>AddService ${instanceId}</description>
<adapter name="AddServiceAdapter-${instanceId}" id="AddServiceAdapter-${instanceId}" endpoints="tcp -h Dannys-Laptop" replica-group="ReplicatorAddService"/>
</service>
</service-template>

<service-template id="SubtractService">
<parameter name="instanceId"/>
<service name="SubtractService-${instanceId}" entry="${server.distrib}/SubtractService/ProView.Grid.Subtract.dll:ProView.Grid.Subtract.Service">
<properties>
<property name="instanceId" value="${instanceId}"/>
</properties>
<description>SubtractService ${instanceId}</description>
<adapter name="SubtractServiceAdapter-${instanceId}" id="SubtractServiceAdapter-${instanceId}" endpoints="tcp -h Dannys-Laptop" replica-group="ReplicatorSubtractService"/>
</service>
</service-template>

<server-template id="IcePatch2">
<parameter name="instance-name" default="${application}.IcePatch2"/>
<parameter name="host"/>
<parameter name="endpoints" default="tcp"/>
<parameter name="directory"/>
<server id="${instance-name}" activation="on-demand" application-distrib="false" exe="icepatch2server">
<properties>
<property name="Ice.Default.Host" value="${host}"/>
<property name="IcePatch2.InstanceName" value="${instance-name}"/>
<property name="IcePatch2.Directory" value="${directory}"/>
<property name="Ice.StdOut" value="${node.datadir}/tmp/${server}.stdout"/>
<property name="Ice.StdErr" value="${node.datadir}/tmp/${server}.stderr"/>
</properties>
<adapter name="IcePatch2" endpoints="${endpoints}" id="${application}.IcePatch2">
<object identity="${instance-name}/server" type="::IcePatch2::FileServer"/>
</adapter>
</server>
</server-template>

<node name="Node1">
<server-instance template="IcePatch2" host="Dannys-Laptop" directory="C:\GridProView\lib"/>
<icebox id="IceBoxAdd1" activation="always" exe="iceboxnet.exe">
<distrib>
<directory>AddService</directory>
</distrib>
<description>IceBox Server Add 1</description>
<property name="IcePatch2Client.Thorough" value="1"/>
<service-instance template="AddService" instanceId="1"/>
</icebox>
<icebox id="IceBoxSubtract1" activation="always" exe="iceboxnet.exe">
<distrib>
<directory>SubtractService</directory>
</distrib>
<description>IceBox Server Subtract 1</description>
<property name="IcePatch2Client.Thorough" value="1"/>
<service-instance template="SubtractService" instanceId="1"/>
</icebox>
</node>

<node name="Node2">
<icebox id="IceBoxAdd2" activation="always" exe="iceboxnet.exe">
<distrib>
<directory>AddService</directory>
</distrib>
<description>IceBox Server Add 2</description>
<property name="IcePatch2Client.Thorough" value="1"/>
<service-instance template="AddService" instanceId="2"/>
</icebox>
<icebox id="IceBoxSubtract2" activation="always" exe="iceboxnet.exe">
<distrib>
<directory>SubtractService</directory>
</distrib>
<description>IceBox Server Subtract 2</description>
<property name="IcePatch2Client.Thorough" value="1"/>
<service-instance template="SubtractService" instanceId="2"/>
</icebox>
</node>
</application>
</icegrid>

Comments

  • benoit
    benoit Rennes, France
    Hi Daniel,

    Do you stop the IcePatch2 server before running icepatch2calc.exe and restart it after?

    Cheers,
    Benoit.
  • Hi Benoit,

    Hope you had a good Weekend.

    As always you hit the nail on the head, stopping and re-starting the patching Server caused the required behaviour to kick in - apologies if I missed this Point in the documentation.

    Is there a fundamental reason that a re-start of the ice patch Server is required, or is that an inherent Feature deriving from the fact that most patches involve a full re-start of the grid ?

    Thinking ahead if I have a large number of nodes on separate machines in prod, this means I would have the added Overhead of bouncing each icepatch instance when doing a partial deploy. I'm not moaning, just trying to make sure my understanding is correct :-)

    Thanks,

    Danny
  • benoit
    benoit Rennes, France
    Hi,

    You don't have to stop all the servers from an IceGrid application to patch it.

    Stopping the IcePatch2 server before updating its files is necessary however to ensure it doesn't read files which are being replaced. So you should stop the IcePatch2 server, update its data directory, re-compute the checksums and start again the IcePatch2 server.

    Once the IcePatch2 server data is updated, you can patch the servers from the application individually.

    Cheers,
    Benoit.
  • Hi Benoit,

    OK that makes sense, I was thinking that every machine needed an ice patch Server but of course only one is required per grid, so that solves my confusion :-)

    Again, many thanks for your help.

    Cheers,

    Daniel