Welcome to the new Gigaspaces XAP forum. To recover your account, please follow these instructions.

Ask Your Question
0

What is the correct way to undeploy a PU programmatically?

Hi,

I have tried to use the .undeploy() method to undeploy a PU however it was unsuccessful. Could you please advise if there is a better way to undeploy a PU?

Thanks, KP

asked 2018-06-15 09:47:33 -0600

kp gravatar image
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

There are multiple ways to undeploy a pu. For example, it can be done from the command line, web ui or in your case using the Admin API. In the end, they are calling the Admin API internally to do the undeployment. So the choice of your tool depends on what suits you. You don't mention why it was unsuccessful.

answered 2018-06-15 11:51:14 -0600

Dixson Huie gravatar image
edit flag offensive delete link more

Comments

Hi Dixson, I attempted to undeploy using org.openspaces.admin.pu.ProcessingUnit undeploy(). I am unsure why it was unsuccessful that is why I created this question. Regards, KP

kp gravatar imagekp ( 2018-06-18 03:25:01 -0600 )edit

Hi Dixson,

To clarify, on calling undeploy(), the Mirror Service PU was removed from Gigaspaces Web UI however the related process was not killed using 'ps -ef' to search for the process id on the node. We noticed that there was a memory shortage error before we undeployed so it may be related?

With previous testing, we noticed that if the Mirror Service PU is INTACT, then usually undeploying it kills the associated process id. However, when the Mirror Service PU is BROKEN, the associated process id is still running when we try to undeploy it.

Perhaps we can kill the GSC itself after the PU undeploy to ensure that the PU resources have been freed up?

Perhaps it is possible to get the process id for the pu and then kill it?

Thanks, KP

kp gravatar imagekp ( 2018-06-18 08:05:19 -0600 )edit

If you are using the service grid, then deploying the GSC and the processing unit are 2 distinct steps and these components are managed separately. If you undeploy a processing unit it won't kill the GSC it was running in.

See: https://docs.gigaspaces.com/xap/12.3/... and https://docs.gigaspaces.com/xap/12.3/...

Dixson Huie gravatar imageDixson Huie ( 2018-06-18 14:46:26 -0600 )edit

Hi Dixson, is this applicable to XAP 10.1? Am trying to find the instructions for killing the GSC.

kp gravatar imagekp ( 2018-06-19 06:12:49 -0600 )edit

Run kill from the command line, if you're intention is to make the gsa automatically start another one. Otherwise you can do a shutdown, but you would have to start another one.

Dixson Huie gravatar imageDixson Huie ( 2018-06-19 08:36:37 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2018-06-15 09:47:33 -0600

Seen: 221 times

Last updated: Jun 15