[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

snmpconf PM MIB module #3 CLOSED - Policy failure and fallback



Hello,

This issue reads:  if you have multiple policies running
at different levels of precedence, how do you fallback to a
policy of lower precedence if the one at a higher level fails.
Steve Waldbusser had a proposal, which he will work on more
with Wes Hardaker and publish to the mailing list.

The most recent draft includes a new accessor function called
defer() that addresses this issue:

9.3.12.  defer()

Policies can be associated in groups with the behavior that
for each element, of the policies that match the filter, only
the one the highest precedence value will be active. For
example if there is a default bronze policy that applies to
any interface and a special policy for gold interfaces, the
higher precedence of the gold policy will ensure that it is
run on gold ports and the bronze policy isn't.

Unfortunately, once the winning policy has been selected and
the action begins running, situations can occur where the code
determines that it cannot complete its task. In many such
cases, it is desirable that the next runner-up policy be
executed. In the previous example it would be desirable that
at least bronze behavior be configured if gold is appropriate
but isn't possible.

When a policy defers it exits and the filter-matching policy
with the next-highest precedence is immediately run. Because
it's possible that might defer as well, the execution
environment must remember where it is in the precedence chain
so that it can continue going down the chain until an action
completes without deferring or no policies are left in the
group. Once a policy completes successfully, the next
iteration will begin at the top of the precedence chain.

There are two ways to defer. A script can exit by calling
die() and specify that it should defer. Alternately, a script
can instruct the execution environment to cause it to defer if
it experiences a run-time exception.

   defer(integer defer)

       The defer function changes the run-time exception behavior of a
       script. By default, a script will not defer when it encounters
       an RTE. If defer(1) is called, the exit behavior is changed so
       the script will defer when it is terminated due to an RTE.
       won't defer when it is terminated due to an RTE.

With kind regards,

--
David Partain                  David.Partain@ericsson.com
Ericsson Radio Systems AB      Tel:    +46 13 28 41 44
Research and Innovation        Fax:    +46 13 28 75 67
P.O. Box 1248
SE-581 12  Linköping, Sweden