cross server dependancies

31 views
Skip to first unread message

Byron Appelt

unread,
Jun 15, 2012, 3:19:13 PM6/15/12
to puppet...@googlegroups.com
I have an application package that needs to be installed on certain application servers but before it can be installed, database access has to be setup on a database server. 

I have figured out how to export a resource on the app server that gets collected and realized on the database server, but I cannot figure out how to make the package on the app server depend on the exported resource that gets realized on the database server. 

I have tried something like this:

@@numerex_percona::database_grant { $::mysql_hostname:
            user => 'root',
            password => $::mysql_server_root_password,
            host => $::fqdn,
           before => Package['ublipgw'],
}

But that doesn't work because Package['ublipgw'] is not on the server where the database_grant is realized, but on the server where it is exported. What is the best way to handle a situation like this? 

David Schmitt

unread,
Jun 18, 2012, 4:39:11 AM6/18/12
to puppet...@googlegroups.com
Puppet doesn't support cross-node relationships. You'll have to manage
that on a similar level as you are managing maintenance windows, that is
by scheduling when changes to your manifests are actually applied to
your nodes.

On a related note you need to make sure that the database_grant is able
to manage its state without the other server being available, else you
will run into troubles when you have transient problems with the other
server or network later. In the simplest case a re-try might be
sufficient, but, depending on your actual situation, might also be the
worst thing that could happen.



Best Regards, David
Reply all
Reply to author
Forward
0 new messages