Project

General

Profile

Bug #7852

svccfg archive should drop SCF_NOTIFY_PG_POSTFIX

Added by Andrew Stormont about 2 years ago. Updated about 2 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

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

History

#1

Updated by Andrew Stormont about 2 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)
#2

Updated by Andrew Stormont about 2 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.
#3

Updated by Andrew Stormont about 2 years ago

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

Updated by Andrew Stormont about 2 years ago

  • Description updated (diff)
#5

Updated by Andrew Stormont about 2 years ago

Moved to description

#6

Updated by Andrew Stormont about 2 years ago

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

Updated by Andrew Stormont about 2 years ago

  • Description updated (diff)
#8

Updated by Andrew Stormont about 2 years ago

  • Description updated (diff)
#9

Updated by Andrew Stormont about 2 years ago

  • Description updated (diff)
#10

Updated by Electric Monk about 2 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>

Also available in: Atom PDF