David Bustos writes:
> Quoth Justin Lloyd on Thu, Oct 05, 2006 at 08:27:56AM -0700:
> > At my company we are working on a centralized logging project,
> > standardizing on Syslog-NG across all platforms (Solaris 9 & 10, IRIX
> > and RH Linux). The problem I'm encountering is correctly defining
> > a syslog-ng SMF service (or instance of system-log?!) so that certain
> > dependencies continue to be met, such as rarp, without running into
> > the possibility of future upgrades and/or patches wiping out our
> > customizations.
> > 
> > I've been tinkering with the NCsysng package at the Open-Systems
> > Group's blog
> > (http://opensystems.wordpress.com/2006/06/01/replacing-syslog-on-solaris-10
> -with-syslog-ng/),
> > but I still have not figured out the correct way to deal with the rarp
> > dependency. I initially thought that adding a dependent, but the
> > problem is that rarp has an explicit dependency on
> > svc:/system/system-log.
> 
> To be clear, you need rarp to depend on syslog-ng?  In that case, you
> should be able to delete rarp's dependency on system-log, and put
> a dependent in your syslog-ng manifest.  During upgrade, Solaris should
> consider the dependency deletion to be a customization, and not add it
> back.  (In fact, you should be able to test this yourself, by modifying
> the dependency and reimporting the manifest.)

If the syslog-ng manifest defined itself with an instance name of
svc:/system/system-log:syslog-ng,  and put all the configuration within 
instance tags, this wouldn't be necessary at all.  That's because in 
SMF, anyone who depends on the service name essentially does an 'any' 
dependency on all of its instances.  Any instance of a service named 
system/system-log satisfies a dependency on system/system-log.

I'd consider re-working the manifest a little to:

  - change the service name line to
        name='system/system-log'
  - remove the create_default_instance tag
  - just before the first dependency tag add:
        <instance name='syslog-ng' enabled='false'>
  - add a closing
        </instance>
    just before the stability level.

For bonus points, contribute the changes back to the original author...

I'd also skip the step in the blog which suggests deleting the
Solaris-delivered system-log.  You can just disable it, if you use the 
process above.

But, David's method will work too. :)

(It'd be good for us to define the Solaris-delivered syslog manifest in 
basically the way I suggest above.  I'll be happy to help anyone who
wanted a first putback to OpenSolaris through the simple code changes and
sponsorship process for this change...)

liane
-- 
Liane Praza, Solaris Kernel Development
liane.praza at sun.com - http://blogs.sun.com/lianep



Reply via email to