I hope that this information is not too late.  Please be advised that the 
information posted below is from a document that we've written to help us with 
the very situation:

Deleting Solaris 10 SMF Dependencies

There will be times when you will need to import a new service into Solaris 10 
SMF - some of the services that you create may need to setup some dependencies 
on other services.  If you have imported a service that has these dependencies, 
but realize that you need to remove that service, you will run into the 
following problems when you try to re-import the service.

Note: For this document we are using the global-cpu-shares service that changes 
the default number of CPU shares a global zone is allocated.

1.      When you try to re-import the service (for whatever reason) after 
removing it you will receivce the following errors:
# svccfg import /var/svc/manifest/site/gzone_share.xml
svccfg: Could not create "zones" dependency in svc:/system/zones (already 
exists).
svccfg: Import of /var/svc/manifest/site/gzone_share.xml failed.  Progress:
svccfg: Service "system/global-cpu-shares": some properties imported.
svccfg: Instance "default": not reached.

2.      First we need to check the properties of the service that has been 
listed as a dependency (in this case the ?zones? service) to make verify that 
we are working with the correct dependent service.
# svccfg -s svc:/system/zones listprop

3.      Look for the name of the service you are trying to re-import in the 
above command?s output, if you see it (ours is marked in [b]bold [/b]print), 
you know you are on the right path.
<output truncated for space>
[i][u]zones[/u][/i]                             dependency
[b]zones/entities               fmri     svc:/system/global-cpu-shares[/b]
zones/external          boolean  true
zones/grouping          astring  optional_all
zones/restart_on                astring  none
zones/type                      astring  service
<output truncated for space>

4.      Now we want to look at the property groups of the service to determine 
which property group needs to be removed.
# svccfg -s svc:/system/zones listpg

5.      Find the entry for dependency that is listed in Step 3 (the entry?s 
name is [u]underlined [/u]and [i]italicized[/i]) - the culprit is marked in 
[b]bold[/b] print.
multi-user-server  dependency
general            framework
startd             framework
start              method
stop               method
tm_common_name     template
tm_man_zones       template
tm_man_zoneadm     template
[b]zones              dependency[/b]

6.      Remove the property group
# svccfg -s svc:/system/zones delpg zones

7.      Now you can re-import the new service?s xml manifest and everyone will 
be happy
# svccfg import /var/svc/manifest/site/gzone_share.xml

(Note: after you successfully import the new service manifest, you may need to 
enable the service)
 
 
This message posted from opensolaris.org

Reply via email to