On Tue, 15 Sep 2009 14:24:19 +0100
Alan Maguire <Alan.Maguire at Sun.COM> wrote:

> hi folks
> 
> In investigating defects 10123 (stopping manual locations
> produces unexpected events) and 10978 (nwamadm report
> "incorrect" state) I've been left wondering if we should
> really fail state changes which are redundant. At present,
> if an already-enabled object is enabled, we
> get an "entity is in use" error, while if we try to disable
> an already-disabled object, we get an "invalid state"
> error. This is inconsistent with SMF which allows enable
> requests to succeed even if the object is already enabled.

All our state changes are absolute.  They should all be idempotent.

> 
> I'm proposing that we change this so that such
> redundant requests do not trigger an error, and
> that we get rid of the NWAM_ENTITY_INVALID_STATE
> error code (since it's only used in this scenario). Does
> this sound reasonable? Thanks!

One way to improve the reliability of code is to remove the ability for
it to fail.  This seems like one of those opportunities.  I think this
should go fairly high in our stack of things to do after we have
guaranteed that the project is going back.

                        mph

> 
> Alan
> _______________________________________________
> nwam-dev mailing list
> nwam-dev at opensolaris.org
> http://mail.opensolaris.org/mailman/listinfo/nwam-dev

Reply via email to