Forgot to include the list.

David Finberg wrote:
> On Tue, 27 Mar 2007, Tony Nguyen wrote:
>
>> The new property value not committed via a refresh is stored in the 
>> repository as an 'editing' property. The next svcadm refresh will use 
>> the editing property values to update the running snapshot.
>>
>>> What I expected was that the old, i.e. the running (svcprop -s 
>>> running -p
>>> config/testval) state would be returned. But instead, the current state
>>> of the repository is returned. Is this the right behavior? And is there
>>> some simple explanation of why I want that in this case, since I 
>>> guess my
>>> intuition is way off here.
>
>> It's the expected behavior though a bit confusing. If you always want 
>> to read from the running state(snapshot), use the 
>> scf_instance_get_pg_composed interface with a running snapshot 
>> argument. See enable_fmri_rec in cmd/svc/svcadm/svcadm.c.
>
> Ok, maybe I didn't ask the right question then. Say I look at two 
> services in Solaris, say rpc/bind, and smtp. smtp checks its 
> config/local_only property in its start method, via
> svcprop -p config/local_only $SMF_FMRI.
>
> On the other hand, bind takes its state from scf_simple_prop_get. So 
> we have two services with really different behaviors with respect to 
> repository updates. Is one of them preferred? Just a style thing? A 
> bug? Does this have implications for the refresh/restart methods for 
> services based on which style you choose?

I'm still not clear on your questions but will go my best :^)

These are two different methods of reading property values. One is a cli 
command and the other a programmatic interface but they are 
functionality equivalent as you can get either editing or running values 
from both. svcprop by default returns a composed value and 
scf_instance_get_pg_composed with a running snapshot argument will 
return the same value. svcprop -C returns the uncomposed value which is 
the same value if you DON'T use scf_instance_get_pg_composed with a 
running snapshot argument.

Does it make sense?
-tony



Reply via email to