Project

General

Profile

Actions

Bug #7852

closed

svccfg archive should drop SCF_NOTIFY_PG_POSTFIX

Added by Andrew Stormont almost 7 years ago. Updated almost 7 years ago.

Status:
Closed
Priority:
Normal
Category:
smf
Start date:
2017-02-11
Due date:
% Done:

100%

Estimated time:
Difficulty:
Bite-size
Tags:
needs-triage
Gerrit CR:
External Bug:

Description

The svccfg restore fails with "Invalid input." because it is unable to parse the FMA events stored in the "notification_parameters" section of the archive.

root@omnios:~/illumos-gate# svccfg archive -a > /tmp/archive.xml 
root@omnios:~/illumos-gate# svccfg restore /tmp/archive.xml 
svccfg: Invalid input.

This is because the parser doesn't recognise SCF_NOTIFY_PG_POSTFIX. This is something used internally and is added on restore. The archive logic should not be exporting it.

root@omnios:~# svccfg
svc:/system/fm/notify-params> select notify-params:default
svc:/system/fm/notify-params:default> listpg
general                 framework
list.suspect,fmnotify   notify_params
list.repaired,fmnotify  notify_params
list.resolved,fmnotify  notify_params
restarter               framework    NONPERSISTENT
restarter_actions       framework    NONPERSISTENT
svc:/system/fm/notify-params:default> 

Where SCF_NOTIFY_PG_POSTFIX is appended on restore: https://github.com/illumos/illumos-gate/blob/master/usr/src/cmd/svc/svccfg/svccfg_xml.c#L1621

Actions #1

Updated by Andrew Stormont almost 7 years ago

  • Subject changed from svccfg archive generates archives which cannot be restored to svccfg archive should drop SCF_NOTIFY_PG_POSTFIX
  • Description updated (diff)
Actions #2

Updated by Andrew Stormont almost 7 years ago

Webrev: http://cr.illumos.org/~webrev/andy_js/7852/

Before change the events in the notification_parameters section look like this:

<event value='list.suspect,fmnotify'/>

The "fmnotify" suffix is the SCF_NOTIFY_PG_POSTFIX. After the change:
<event value='list.suspect'/>

The restore code is able to parse this.
Actions #3

Updated by Andrew Stormont almost 7 years ago

  • Description updated (diff)
  • Status changed from New to In Progress
  • Assignee set to Andrew Stormont
  • Difficulty changed from Medium to Bite-size
Actions #4

Updated by Andrew Stormont almost 7 years ago

  • Description updated (diff)
Actions #5

Updated by Andrew Stormont almost 7 years ago

Moved to description

Actions #6

Updated by Andrew Stormont almost 7 years ago

  • Description updated (diff)
  • Category set to smf
Actions #7

Updated by Andrew Stormont almost 7 years ago

  • Description updated (diff)
Actions #8

Updated by Andrew Stormont almost 7 years ago

  • Description updated (diff)
Actions #9

Updated by Andrew Stormont almost 7 years ago

  • Description updated (diff)
Actions #10

Updated by Electric Monk almost 7 years ago

  • Status changed from In Progress to Closed
  • % Done changed from 0 to 100

git commit 6d88fd4d74cbf1962856668273386b3b904d692c

commit  6d88fd4d74cbf1962856668273386b3b904d692c
Author: Andrew Stormont <astormont@racktopsystems.com>
Date:   2017-02-23T16:59:38.000Z

    7852 svccfg archive should drop SCF_NOTIFY_PG_POSTFIX
    Reviewed by: Dan McDonald <danmcd@omniti.com>
    Approved by: Robert Mustacchi <rm@joyent.com>

Actions

Also available in: Atom PDF