I've been practising building and managing rpm for a while
now by using
some good advices of the mandriva community.
But today I'm facing a problem I can't solve and the
preleminary
discussions I had on #rpm didn't helpt me to find the
solution, that's
why I've decided this morning to mail the rpm-devel mailing
list.
Usually when you upgrade or remove a rpm on a system, you
use the
different %pre/%post for managing the start/stop of
your
services. This works fine. But what about if you're running
in a cluster ?
Imagine an application which is distributed on a cluster and
installed
using rpm. Then using an admin console, you start a
clustered
application : that means that all nodes are communicating
and must have
the same release for insuring a quality service. Everything
is fine.
Now you must make a critical update or a major update
meaning your
application will not be compatible with the previous
release. The usual
way to do that will be stopping the application, upgrade it
and then
restart it. That's the way I do and it works. Cool.
But what about if someone try to upgrade/remove the rpm
while the
application is running ? This case mustn't appear because
the
application will fail or will break. In a High Availability
environnement this is not acceptable. So using the
%pre/%preun for
starting/stopping the application is not possible because a
node of this
cluster could not stop the entire application so if we ask
this node to
upgrade/remove the rpm it must abort.
So I've used a small script in the %pre/%preun to check if
the
application is running for aborting the upgrade/remove. My
script is
able to detect if rpm is allowed or not to do its job. But
I sounds
like I can't prevent rpm to do it ! Using some exit code in
this
sections will exit the section but rpm will not abort this
upgrade/remove.
My 2 cents questions is: Is it possible to prevent rpm for
upgrading/removing a rpm ?
If not, I think I could be usefull to add this feature to
help the
clustered application to manage their upgrade/removal.
What do you think about that ?
_______________________________________________
Rpm-devel mailing list
Rpm-devel lists.dulug.duke.edu
https://lists.dulug.duke.edu/mailman/listinfo/rpm-devel
a>
|