Question

I have 3 packages that we am building spec files for to install our applications with:

Package A
Package B
Package C

A depends on B
A depends on c

The issue is that each of these packages install things that require an App Server shutdown before the installation and restart after the installation.

Which is fine if are only installing B or C.

The issues when installing A and there are new versions of B and/or C, I end up with 3 serial restarts of my App Server and it takes like 10 mins to do each restart.

When we build the RPMs is there a way to have A and B detect that they are being installed/updated as a dependency to A and not restart the server and let A do that?

Was it helpful?

Solution

I don't know if there's a native way to do it, but what I've done in the past is have all the packages check in %pre if the target service is running (e.g. httpd). If it is, shut it down and use at to have it restart in a reasonable amount of time in the future (like two minutes). Each RPM also checks if the restart is already in the queue (I used a random queue like "n" or something), and if it is, it bumps it out for another two minutes. The end result should be the server comes up only one time, two minutes after the final package is installed.

Drawback: Even though at is in the LSB, for some reason a handful of machines didn't have it installed, so I had to add it to my Requires tag.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top