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

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/svc/startd/graph.c
          +++ new/usr/src/cmd/svc/startd/graph.c
↓ open down ↓ 15 lines elided ↑ open up ↑
  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, Syneto S.R.L. All rights reserved.
  25   25   * Copyright 2016 Toomas Soome <tsoome@me.com>
  26      - * Copyright 2016 RackTop Systems.
       26 + * Copyright 2017 RackTop Systems.
  27   27   */
  28   28  
  29   29  /*
  30   30   * graph.c - master restarter graph engine
  31   31   *
  32   32   *   The graph engine keeps a dependency graph of all service instances on the
  33   33   *   system, as recorded in the repository.  It decides when services should
  34   34   *   be brought up or down based on service states and dependencies and sends
  35   35   *   commands to restarters to effect any changes.  It also executes
  36   36   *   administrator commands sent by svcadm via the repository.
↓ open down ↓ 857 lines elided ↑ open up ↑
 894  894                  assert(v->gv_state == RESTARTER_STATE_DEGRADED ||
 895  895                      v->gv_state == RESTARTER_STATE_ONLINE);
 896  896                  break;
 897  897  
 898  898          case RESTARTER_EVENT_TYPE_START:
 899  899                  log_framework(LOG_DEBUG, "Starting %s.\n", v->gv_name);
 900  900                  assert(v->gv_state == RESTARTER_STATE_OFFLINE);
 901  901                  break;
 902  902  
 903  903          case RESTARTER_EVENT_TYPE_REMOVE_INSTANCE:
      904 +        case RESTARTER_EVENT_TYPE_ADMIN_RESTORE:
 904  905          case RESTARTER_EVENT_TYPE_ADMIN_DEGRADED:
      906 +        case RESTARTER_EVENT_TYPE_ADMIN_DEGRADE_IMMEDIATE:
 905  907          case RESTARTER_EVENT_TYPE_ADMIN_REFRESH:
 906  908          case RESTARTER_EVENT_TYPE_ADMIN_RESTART:
 907  909          case RESTARTER_EVENT_TYPE_ADMIN_MAINT_OFF:
 908  910          case RESTARTER_EVENT_TYPE_ADMIN_MAINT_ON:
 909  911          case RESTARTER_EVENT_TYPE_ADMIN_MAINT_ON_IMMEDIATE:
 910  912          case RESTARTER_EVENT_TYPE_DEPENDENCY_CYCLE:
 911  913          case RESTARTER_EVENT_TYPE_INVALID_DEPENDENCY:
 912  914                  break;
 913  915  
 914  916          default:
↓ open down ↓ 5983 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX