http://defect.opensolaris.org/bz/show_bug.cgi?id=9780
amaguire <alan.maguire at sun.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |alan.maguire at sun.com
Status|NEW |CLOSED
Resolution| |FIXED
--- Comment #1 from amaguire <alan.maguire at sun.com> 2009-06-30 04:33:45 ---
(In reply to comment #0)
> Here I create an enm, set its fmri to a wrong value, then I list it with
> "nwamadm", it show this enm is offline.
> However, without any other operation, I saw the daemon output a message(see
> the
> details below), and set its state to "maintenance"
> I think the function "nwamd_enm_deactivate" should not call here, since I
> don't
> run "nwamadm disable enm" command.
>
> bash-3.2# nwamcfg "create enm enm1; set fmri=svc:/not-exist-fmri;"
> bash-3.2# echo $?
> 0
> bash-3.2# nwamadm list
> TYPE PROFILE STATE
> ncp Automatic online
> ncu:phys bge0 online
> ncu:ip bge0 offline
> ncu:phys bge1 online
> ncu:ip bge1 offline*
> loc Automatic offline
> loc NoNet online
> loc Legacy offline
> enm enm1 offline
> bash-3.2# Jun 30 10:29:39 springmoon nwamd[103182]: 1: nwamd_enm_deactivate:
> smf_disable_instance(svc:/not-exist-fmri) failed for ENM enm1: invalid
> argument
>
> bash-3.2#
> bash-3.2#
> bash-3.2#
> bash-3.2# nwamadm list
> TYPE PROFILE STATE
> ncp Automatic online
> ncu:phys bge0 online
> ncu:ip bge0 offline
> ncu:phys bge1 online
> ncu:ip bge1 offline*
> loc Automatic offline
> loc NoNet online
> loc Legacy offline
> enm enm1 maintenance
> bash-3.2#
> bash-3.2# uname -a
> SunOS springmoon 5.11 nwam1-build.2009-06-26 i86pc i386 i86pc
There's an issue here that I'm fixing as part of another bug - basically the
states of newly-added objects don't get set for a while (until the next
periodic check). I've fixed this, so that the check is run a few seconds after
the object is added and the object is moved into the correct state. For the
sake
of the testsuite, it might make sense to wait about 10 seconds before
validating that ENMs and locations are in the expected state. The reason for
this is that we need to tell nwamd to run a single check on all locations and
ENMs when one changes. However to avoid having to do a check on all
locations/ENMs for each location/ENM at startup, we delay the check for about
5sec, and if a check has already been set up, we don't add another check. So on
startup when multiple locations are found, we don't check all locations for
each location added - rather we set up a timed check for a few seconds time
which captures all the added locations/ENMs.
In this case, the timed check (which evaluates all ENMs and locations) runs
eventually and things get into the right state, but with the changes I'm about
to push, this will happen much quicker.
What you say about the disable method running sounds reasonable, but it's
important to think about what an ENM is - think of it like an SMF service. By
creating a manual ENM that is disabled, you're essentially saying to disable
the service.
Closing as invalid since the state issues will be addressed elsewhere.
--
Configure bugmail: http://defect.opensolaris.org/bz/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.