Daniel Pittman
2009-Aug-10 05:25 UTC
[Puppet Users] Managing intermittently available resources...
G''day. I have a problem that I don''t know the best way to mesh with Puppet. Specifically, we have a database active/passive fail-over cluster. Access to the database is *only* possible on the active machine, not on the passive machine. I would like to manage various database resources, including databases, users, and embedded PL/SQL features, that are database level features: you *MUST* connect to the database server to check, or modify, them. Direct disk access is not possible. So, how do I best manage that via puppet? If I just configure a "database" resource on both machines I get problems, since we are not easily able to access the database server on the passive system. I can, I suppose, have both systems connect to the virtual IP address that always points at the active server, and do all their administration over the network. That should /mostly/ work, except that it will fall down if I add a new PS/SQL feature that requires a package installed, and the passive machine runs before the active one ... so adds the DBMS feature while the package is not yet installed. My best guess, right now, is that I need to write a function, or a fact, that determines if we are the active or passive machine for a specific service[1], and then only configure those features when we are active. Comments? Daniel Footnotes: [1] ...and these machines have multiple HA services, which can run on either or both; machine 1 might be active with the database, but passive with some other service. -- ✣ Daniel Pittman ✉ daniel@rimspace.net ☎ +61 401 155 707 ♽ made with 100 percent post-consumer electrons Looking for work? Love Perl? In Melbourne, Australia? We are hiring. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
Matt McLeod
2009-Aug-10 05:37 UTC
[Puppet Users] Re: Managing intermittently available resources...
2009/8/10 Daniel Pittman <daniel@rimspace.net>:> My best guess, right now, is that I need to write a function, or a fact, that > determines if we are the active or passive machine for a specific service[1], > and then only configure those features when we are active.I''d probably write a set of facts, one for each HA service, and then take it from there. I''ve found it pretty straightforward to write custom facts, not hugely more complicated than whatever the underlying process is to get the data. -- * Matt McLeod | People can do the work, * matt@boggle.org | so machines have time to think --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
jcbollinger
2009-Aug-10 13:05 UTC
[Puppet Users] Re: Managing intermittently available resources...
On Aug 10, 12:37 am, Matt McLeod <m...@boggle.org> wrote:> 2009/8/10 Daniel Pittman <dan...@rimspace.net>: > > > My best guess, right now, is that I need to write a function, or a fact, that > > determines if we are the active or passive machine for a specific service[1], > > and then only configure those features when we are active. > > I''d probably write a set of facts, one for each HA service, and then > take it from there. I''ve found it pretty straightforward to write > custom facts, not hugely more complicated than whatever the underlying > process is to get the data.Agreed. You can use the same resource(s) across a group of nodes, relying upon one or more custom facts to determine, per node, what configuration details that resource ensures. Custom facts can be very easy to write, though a clever enough programmer can make them arbitrarily difficult :-) --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---