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

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/svc/startd/startd.h
          +++ new/usr/src/cmd/svc/startd/startd.h
↓ open down ↓ 14 lines elided ↑ open up ↑
  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  /*
  23   23   * Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
  24   24   * Copyright (c) 2015, Joyent, Inc. All rights reserved.
       25 + * Copyright 2017 RackTop Systems.
  25   26   */
  26   27  
  27   28  #ifndef _STARTD_H
  28   29  #define _STARTD_H
  29   30  
  30   31  #include <sys/time.h>
  31   32  #include <librestart.h>
  32   33  #include <librestart_priv.h>
  33   34  #include <libscf.h>
  34   35  #include <libsysevent.h>
↓ open down ↓ 122 lines elided ↑ open up ↑
 157  158          startd_alloc_retry((void *(*)(size_t, int))umem_zalloc, (sz))
 158  159  
 159  160  
 160  161  extern pthread_mutexattr_t mutex_attrs;
 161  162  
 162  163  /*
 163  164   * Definitions for administrative actions.
 164  165   *   Note that the ordering in admin_action_t, admin_actions, and admin_events
 165  166   *   must match.  admin_actions and admin_events are defined in startd.c.
 166  167   */
 167      -#define NACTIONS                        6
      168 +#define NACTIONS                        8
 168  169  
 169  170  typedef enum {
 170  171          ADMIN_EVENT_DEGRADED = 0x0,
 171  172          ADMIN_EVENT_MAINT_OFF,
 172  173          ADMIN_EVENT_MAINT_ON,
 173  174          ADMIN_EVENT_MAINT_ON_IMMEDIATE,
 174  175          ADMIN_EVENT_REFRESH,
 175  176          ADMIN_EVENT_RESTART
 176  177  } admin_action_t;
 177  178  
↓ open down ↓ 159 lines elided ↑ open up ↑
 337  338          graph_vertex_t  *ge_parent;
 338  339  } graph_edge_t;
 339  340  
 340  341  int libscf_get_info_events_all(scf_propertygroup_t *);
 341  342  int32_t libscf_get_stn_tset(scf_instance_t *);
 342  343  
 343  344  /*
 344  345   * Restarter transition outcomes
 345  346   */
 346  347  typedef enum {
      348 +        DEGRADE_REQUESTED,
 347  349          MAINT_REQUESTED,
 348  350          START_REQUESTED,
 349  351          START_FAILED_REPEATEDLY,
 350  352          START_FAILED_CONFIGURATION,
 351  353          START_FAILED_FATAL,
 352  354          START_FAILED_TIMEOUT_FATAL,
 353  355          START_FAILED_OTHER
 354  356  } start_outcome_t;
 355  357  
 356  358  typedef void (*instance_hook_t)(void);
↓ open down ↓ 436 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX