Re: Dependencies on other hosts in a distributed application?

Jeff Johnson <[email protected]> Tue, 23 Sep 2008 16:51:59 -0400
Newsgroups gmane.linux.redhat.rpm.general
Message-ID <[email protected]>
On Sep 22, 2008, at 7:44 PM, Mike Meyer wrote:

> I find myself responsible for managing an ecosystem of rpms for our
> custom application. One of the interesting sticking points is what we
> call the "db" rpm. Most of the other rpms won't run correctly unless
> that rpm is installed. The catch is, it's got to be installed on the
> database node(s) of the application, not the application nodes that
> the other rpms are being installed on.
>
> I haven't seen anything to indicate that the rpm format can handle
> such a dependency. Have I overlooked something? Anybody got *any*
> ideas on how such a thing might be handled?
>

rpm5 has something called a "probe dependency", basically
a boolean valued function call that returns SATISFIED/UNSATISFIED
depending on the run-time environment. An additional compiled in
probe for the condition "package is installed on database node"
is likely no more complicated than attempting a connection to a
URI that includes hostname and port.

rpm5 also expands macros while checking dependencies, that's
sufficient to fire an external script that returns 0 == satisfied !0  
== unsatisfied.

But you are unlikely to be using rpm5. Oh well ...

73 de Jeff