Print this page
7711 SMF: Finish implementing support for degraded state

Split Close
Expand all
Collapse all
          --- old/usr/src/lib/librestart/common/librestart.h
          +++ new/usr/src/lib/librestart/common/librestart.h
↓ open down ↓ 12 lines elided ↑ open up ↑
  13   13   * When distributing Covered Code, include this CDDL HEADER in each
  14   14   * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15   15   * If applicable, add the following below this CDDL HEADER, with the
  16   16   * fields enclosed by brackets "[]" replaced with your own identifying
  17   17   * information: Portions Copyright [yyyy] [name of copyright owner]
  18   18   *
  19   19   * CDDL HEADER END
  20   20   */
  21   21  /*
  22   22   * Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
       23 + * Copyright 2017 RackTop Systems.
  23   24   */
  24   25  
  25   26  #ifndef _LIBRESTART_H
  26   27  #define _LIBRESTART_H
  27   28  
  28   29  #include <libsysevent.h>
  29   30  #include <libcontract.h>
  30   31  #include <libscf.h>
  31   32  #include <limits.h>
  32   33  #include <priv.h>
↓ open down ↓ 51 lines elided ↑ open up ↑
  84   85   * Event types
  85   86   *      RESTARTER_EVENT_TYPE_ADD_INSTANCE
  86   87   *              responsible for a new (stopped) instance
  87   88   *      RESTARTER_EVENT_TYPE_REMOVE_INSTANCE
  88   89   *              no longer responsible for this instance; stop it and return
  89   90   *      RESTARTER_EVENT_TYPE_ENABLE
  90   91   *              no guarantee that dependencies are met; see
  91   92   *              RESTARTER_EVENT_TYPE_START
  92   93   *      RESTARTER_EVENT_TYPE_DISABLE
  93   94   *              no guarantee that instance was running
       95 + *      RESTARTER_EVENT_TYPE_ADMIN_RESTORE
  94   96   *      RESTARTER_EVENT_TYPE_ADMIN_DEGRADED
       97 + *      RESTARTER_EVENT_TYPE_ADMIN_DEGRADE_IMMEDIATE
  95   98   *      RESTARTER_EVENT_TYPE_ADMIN_REFRESH
  96   99   *      RESTARTER_EVENT_TYPE_ADMIN_RESTART
  97  100   *      RESTARTER_EVENT_TYPE_ADMIN_MAINT_OFF
  98  101   *      RESTARTER_EVENT_TYPE_ADMIN_MAINT_ON
  99  102   *      RESTARTER_EVENT_TYPE_ADMIN_MAINT_ON_IMMEDIATE
 100  103   *      RESTARTER_EVENT_TYPE_ADMIN_MAINT_OFF
 101  104   *      RESTARTER_EVENT_TYPE_STOP
 102  105   *              dependencies are, or are becoming, unsatisfied
 103  106   *      RESTARTER_EVENT_TYPE_START
 104  107   *              dependencies have become satisfied
↓ open down ↓ 13 lines elided ↑ open up ↑
 118  121  #define RESTARTER_EVENT_TYPE_ADMIN_RESTART              7
 119  122  #define RESTARTER_EVENT_TYPE_ADMIN_MAINT_OFF            8
 120  123  #define RESTARTER_EVENT_TYPE_ADMIN_MAINT_ON             9
 121  124  #define RESTARTER_EVENT_TYPE_ADMIN_MAINT_ON_IMMEDIATE   10
 122  125  #define RESTARTER_EVENT_TYPE_STOP                       11
 123  126  #define RESTARTER_EVENT_TYPE_START                      12
 124  127  #define RESTARTER_EVENT_TYPE_DEPENDENCY_CYCLE           13
 125  128  #define RESTARTER_EVENT_TYPE_INVALID_DEPENDENCY         14
 126  129  #define RESTARTER_EVENT_TYPE_ADMIN_DISABLE              15
 127  130  #define RESTARTER_EVENT_TYPE_STOP_RESET                 16
      131 +#define RESTARTER_EVENT_TYPE_ADMIN_RESTORE              17
      132 +#define RESTARTER_EVENT_TYPE_ADMIN_DEGRADE_IMMEDIATE    18
 128  133  
 129  134  #define RESTARTER_EVENT_ERROR                   -1
 130  135  
 131  136  #define RESTARTER_EVENT_INSTANCE_DISABLED       0
 132  137  #define RESTARTER_EVENT_INSTANCE_ENABLED        1
 133  138  
 134  139  typedef enum {
 135  140          RESTARTER_STATE_NONE,
 136  141          RESTARTER_STATE_UNINIT,
 137  142          RESTARTER_STATE_MAINT,
↓ open down ↓ 214 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX