5767 fix several problems with zfs test suite
[unleashed.git] / usr / src / cmd / iscsid / iscsi-initiator.xml
blob42e0f21384998a281426ac5cc472002b1dd85e06
1 <?xml version='1.0'?>
2 <!DOCTYPE service_bundle SYSTEM '/usr/share/lib/xml/dtd/service_bundle.dtd.1'>
4 <!--
6  CDDL HEADER START
8  The contents of this file are subject to the terms of the
9  Common Development and Distribution License (the "License").
10  You may not use this file except in compliance with the License.
12  You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
13  or http://www.opensolaris.org/os/licensing.
14  See the License for the specific language governing permissions
15  and limitations under the License.
17  When distributing Covered Code, include this CDDL HEADER in each
18  file and include the License file at usr/src/OPENSOLARIS.LICENSE.
19  If applicable, add the following below this CDDL HEADER, with the
20  fields enclosed by brackets "[]" replaced with your own identifying
21  information: Portions Copyright [yyyy] [name of copyright owner]
23  CDDL HEADER END
25  Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
27         Service manifests for the iSCSI Initiator
28 -->
30 <!--
31 GLXXX: Instance creation guidelines:
33 Currently inetd doesn't support property composition in the configuration of
34 it's instances. It expects to find the "proto" property in the instances
35 "inetd_private" property group, and all other properties (including the
36 default back ones) in the "inetd_private" property group of the service.
37 This means that only the "proto" field can be specialized for an instance, which
38 limits the creation of instances of a service to only those with all fields
39 common, bar the "proto" field. This would enable the following two services
40 to be created as instances of a common service: 
42 exec    stream  tcp     nowait  root    /usr/sbin/in.rexecd     in.rexecd
43 exec    stream  tcp6    nowait  root    /usr/sbin/in.rexecd     in.rexecd 
45 but dissallow common service create for these (different socket type):
47 time    stream  tcp6    nowait  root    internal
48 time    dgram   udp6    wait    root    internal
50 To be more specific, for rpc services all the netids associated with the
51 service would need a seperate instance creating under a common service, with
52 the instance name and the "proto" being the netid. For non-rpc based
53 services only services with changes limited to the "proto" field (such as
54 udp/upd6 and tcp/tcp6) can have instances created under a common service - as
55 in the exec example above.
57 I neglected to mention that the composition limitation applies for methods
58 also, so an instance can't have a different method than its service.
60 Inetd is soon going to change to use instance composition for its configuration.
61 This will mean that any of the properties/methods can be present in either the
62 instance or the service (with the instance one overriding in the case both are
63 present) and that multiple instances can be created for a service with the 
64 potential to specialize all the properties/methods.
66 -->
68 <service_bundle type='manifest' name='SUNWiscsir:iscsi-initiator'>
70 <service
71     name='network/iscsi/initiator'
72     type='service'
73     version='1'>
75     <single_instance/>
77     <dependency
78         name='network'
79         grouping='require_any'
80         restart_on='error'
81         type='service'>
82         <service_fmri value='svc:/milestone/network' />
83     </dependency>
85     <dependency
86         name='net'
87         grouping='require_all'
88         restart_on='none'
89         type='service'>
90         <service_fmri value='svc:/network/service' />
91     </dependency>
93     <dependency
94         name='loopback'
95         grouping='require_any'
96         restart_on='error'
97         type='service'>
98         <service_fmri value='svc:/network/loopback' />
99     </dependency>
101     <dependent
102         name='iscsi-initiator_multi-user'
103         grouping='optional_all'
104         restart_on='none'>
105         <service_fmri value='svc:/milestone/multi-user' />
106     </dependent>
108         <!--
109            Set a timeout of -1 to signify to inetd that we don't want
110            to timeout this service, since the forked process is the
111            one that does the services work. This is the case for most/all
112            legacy inetd services; for services written to take advantage
113            of Greenlines capabilities, the start method should fork
114            off a process to handle the request and return a success code.
115         -->
116         <exec_method
117                 type='method'
118                 name='start'
119                 exec='/lib/svc/method/iscsi-initiator %m'
120                 timeout_seconds='600'>
121                 <method_context>
122                         <method_credential
123                         user='root'
124                         group='root'
125                         privileges='basic,sys_devices,sys_mount'
126                         />
127                 </method_context>
128         </exec_method>
129         
130         <exec_method
131                 type='method'
132                 name='stop'
133                 exec='/lib/svc/method/iscsi-initiator %m'
134                 timeout_seconds='600'>
135                 <method_context>
136                         <method_credential
137                         user='root'
138                         group='root'
139                         privileges='basic,sys_devices,sys_mount'
140                         />
141                 </method_context>
142         </exec_method>
143         
144         <!--
145             Create an enabled instance.
146         -->
147         <instance
148         name='default'
149         enabled='true' >
150         </instance>
152         <stability value='Evolving' />
154         <template>
155                 <common_name>
156                         <loctext xml:lang='C'>
157                                 iSCSI initiator daemon
158                         </loctext>
159                 </common_name>
161                 <documentation>
162                         <manpage
163                                 title='iscsi'
164                                 section='7D'
165                                 manpath='/usr/share/man' />
166                 </documentation>
167         </template>
168 </service>
170 </service_bundle>