[geeks] SMF confuseth me still

Phil Stracchino phils at caerllewys.net
Sat Sep 23 12:40:22 CDT 2017


I have my replacement Thor online, after the original rescue experienced
a progressive failure of its system controller.  I now have two spare
power supplies, 42 spare 1TB SATA disks of unknown age (Sun-labelled
Seagate Barracudas), 42 spare drive trays, and 32GB of spare RAM.  And I
suppose two spare processors.

It booted right up off the old system's drives and imported the zpools
without issue, after I reset the ILOM password, cleared the CMOS, and
loaded optimized BIOS defaults.  But I still have the odd problem that
Bacula does not and will not start after boot until I restart the
manifest-import service.  I can't even manually start it with svcadm
enable.  But as soon as I restart manifest-import, bang, here's Bacula
running.  I'm baffled.

I even tried deleting and completely re-importing the service
definition.  And I can DELETE it, sure.  But now I can't re-import it,
though manifest-import does not report any errors and after "importing"
it I cannot validate it.

svc:> import /var/svc/manifest/network/bacula.xml
Restarting svc:/system/manifest-import
 The manifest being imported is from a standard location and should be
imported with the  command : svcadm restart svc:/system/manifest-import
Successful import.
svc:> validate /var/svc/manifest/network/bacula.xml
svc:> validate svc:/network/bacula/dir:default
svccfg: Failed to walk instances: unknown error



This is my service definition (and yes, it's intentional that the
director service is disabled, I run my director on a different host.)

Anyone see anything wrong here?



<?xml version="1.0"?>
<!DOCTYPE service_bundle SYSTEM
"/usr/share/lib/xml/dtd/service_bundle.dtd.1">
<!--
	Copyright (c) 2005 Peter Eriksson (peter at ifm.liu.se)

	This manifest can be used to manage Bacula using the
	Solaris SMF subsystem.

	Search and replace /opt/bacula in this script with your install prefix.

	To use, remove any Bacula startup scripts in /etc/rc?.d and /etc/init.d.
	Then import this manifest using: svcfg -v import bacula.xml
	The active the daemons you need with:

		svcadm enable bacula/fd
		svcadm enable bacula/sd
		svcadm enable bacula/dir
-->

<service_bundle type='manifest' name='bacula'>

<service
	name='network/bacula/fd'
	type='service'
	version='1'>

	<create_default_instance enabled='true' />

	<single_instance />

	<dependency name='network'
	    grouping='require_any'
	    restart_on='error'
	    type='service'>
		<service_fmri value='svc:/network/service' />
	</dependency>

        <dependency name='config-file'
                    grouping='require_all'
                    restart_on='none'
                    type='path'>
                <service_fmri
value='file:///opt/bacula/etc/bacula-fd.conf'/>
        </dependency>

	<exec_method
	    type='method'
	    name='start'
	    exec='/opt/bacula/sbin/bacula-fd -v -c /opt/bacula/etc/bacula-fd.conf'
	    timeout_seconds='60' />

	<exec_method
	    type='method'
	    name='stop'
	    exec=':kill'
	    timeout_seconds='60' />

	<stability value='Unstable' />

	<template>
		<common_name>
			<loctext xml:lang='C'>
			Bacula Backup System - File Daemon
			</loctext>
		</common_name>
		<documentation>
		</documentation>
	</template>
</service>

<service
	name='network/bacula/sd'
	type='service'
	version='1'>

	<create_default_instance enabled='true' />

	<single_instance />

	<dependency name='network'
	    grouping='require_any'
	    restart_on='error'
	    type='service'>
		<service_fmri value='svc:/network/service' />
	</dependency>

        <dependency name='config-file'
                    grouping='require_all'
                    restart_on='none'
                    type='path'>
                <service_fmri
value='file:///opt/bacula/etc/bacula-sd.conf'/>
        </dependency>

	<exec_method
	    type='method'
	    name='start'
	    exec='/opt/bacula/sbin/bacula-sd -v -c /opt/bacula/etc/bacula-sd.conf'
	    timeout_seconds='60' />

	<exec_method
	    type='method'
	    name='stop'
	    exec=':kill'
	    timeout_seconds='60' />

	<stability value='Unstable' />

	<template>
		<common_name>
			<loctext xml:lang='C'>
			Bacula Backup System - Storage Daemon
			</loctext>
		</common_name>
                <documentation>
                </documentation>
	</template>
</service>

<service
	name='network/bacula/dir'
	type='service'
	version='1'>

	<create_default_instance enabled='false' />

	<single_instance />

	<dependency name='network'
	    grouping='require_any'
	    restart_on='error'
	    type='service'>
		<service_fmri value='svc:/network/service' />
	</dependency>

        <dependency name='config-file'
                    grouping='require_all'
                    restart_on='none'
                    type='path'>
                <service_fmri
value='file:///opt/bacula/etc/bacula-dir.conf'/>
        </dependency>

	<dependency name='bacula'
	    grouping='optional_all'
	    restart_on='error'
	    type='service'>
		<service_fmri value='svc:/network/bacula/fd' />
		<service_fmri value='svc:/network/bacula/sd' />
	</dependency>

	<exec_method
	    type='method'
	    name='start'
	    exec='/opt/bacula/sbin/bacula-dir -v -c
/opt/bacula/etc/bacula-dir.conf'
	    timeout_seconds='60' />

	<exec_method
	    type='method'
	    name='stop'
	    exec=':kill'
	    timeout_seconds='60' />

	<stability value='Unstable' />

	<template>
		<common_name>
			<loctext xml:lang='C'>
			Bacula Backup System - Director Daemon
			</loctext>
		</common_name>
                <documentation>
                </documentation>
	</template>
</service>

</service_bundle>




-- 
  Phil Stracchino
  Babylon Communications
  phils at caerllewys.net
  phil at co.ordinate.org
  Landline: +1.603.293.8485
  Mobile:   +1.603.998.6958


More information about the geeks mailing list