Hi SMF experts,
I noticed an unexpected behavior regarding the SMF service dependency update
when I tried
to backward-bfu away from the project bits. Specifically, a new
datalink-management
service is introduced by our project, and its manifest defines network/physical
service as
its dependent. In the backward bfu, we use the existing smf_delete_manifest()
function [1]
to delete the datalink-management service, and expect the dependency between
datalink-management and network-physical would also be removed.
But the reboot after bfu shows that although datalink-management service
instance is
successfully removed, the network-physical still has the dependency on the
datalink-management service ("svcs -d network/physical" does not show that
dependency, but
svcs -xv output shows that the state of the network-physical service instance
is now
offline because "Dependency svc:/network/datalink-management is absent". A
"svcadm
refresh" fixes the problem.
Note that before I made the changes described in [1] (see below), everything
works fine in
the global zone. So I guess this is something to do with the SVCCFG_REPOSITORY
setting I
added.
My question is, is the fix we proposed for 6647203 the correct way to remove a
service
(both in global and non-global zone)? If it is not, what would be the correct
fix?
Thanks
- Cathy
--------------
[1] Because of bug 6647203, we changed the smf_delete_manifest() function to
have
SVCCFG_REPOSITORY set before "svccfg delete":
smf_delete_manifest() {
(
mfst=$1
cd $root
[ -f $mfst ] || return;
if [ -r /etc/svc/volatile/repository_door ]; then
ENTITIES=`/tmp/bfubin/svccfg inventory $mfst`
for fmri in $ENTITIES; do
----> SVCCFG_REPOSITORY=$root/etc/svc/repository.db \
/tmp/bfubin/svccfg delete -f $fmri
done
fi
rm $mfst
)
}