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

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/svc/startd/log.c
          +++ new/usr/src/cmd/svc/startd/log.c
↓ 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   * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
  23   23   * Use is subject to license terms.
  24   24   * Copyright 2011 Nexenta Systems. All rights reserved.
       25 + * Copyright 2017 RackTop Systems.
  25   26   */
  26   27  
  27   28  /*
  28   29   * log.c - debugging and logging functions
  29   30   *
  30   31   * Logging destinations
  31   32   *   svc.startd(1M) supports three logging destinations:  the system log, a
  32   33   *   daemon-specific log (in the /var/svc/log hierarchy by default), and to the
  33   34   *   standard output (redirected to the /var/svc/log/svc.startd.log file by
  34   35   *   default).  Any or all of these destinations may be used to
↓ open down ↓ 433 lines elided ↑ open up ↑
 468  469  
 469  470                  action = gettext("starting");
 470  471  
 471  472                  message = uu_msprintf("[ %s %s%s ]\n",
 472  473                      inst->ri_i.i_fmri + strlen("svc:/"), action,
 473  474                      omessage);
 474  475  
 475  476                  severity = LOG_INFO;
 476  477          } else {
 477  478                  switch (outcome) {
      479 +                case DEGRADE_REQUESTED:
      480 +                        action = gettext("transitioned to degraded by "
      481 +                            "request (see 'svcs -xv' for details)");
      482 +                        break;
 478  483                  case MAINT_REQUESTED:
 479  484                          action = gettext("transitioned to maintenance by "
 480  485                              "request (see 'svcs -xv' for details)");
 481  486                          break;
 482  487                  case START_FAILED_REPEATEDLY:
 483  488                          action = gettext("failed repeatedly: transitioned to "
 484  489                              "maintenance (see 'svcs -xv' for details)");
 485  490                          break;
 486  491                  case START_FAILED_CONFIGURATION:
 487  492                          action = gettext("misconfigured: transitioned to "
↓ open down ↓ 207 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX