Project

General

Profile

Actions

Bug #7818

closed

SMF does not always cleanup services that have been removed

Added by Andrew Stormont over 4 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Normal
Category:
smf
Start date:
2017-01-28
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage
Gerrit CR:

Description

The "svccfg cleanup" command and manifest-import script use different mechanisms to detect services without manifest files - svccfg uses the "manifestfiles" property group attached to each service, whereas the manifest-import script uses the SMF cache.

This means that the manifest-import command can on occasion fail to identify when cleanup needs to happen, and does not run the cleanup command. Running "svccfg cleanup" manually after boot is enough to clear up the problem.

The solution is to modify the manifest-import script so that it also refers to the "manifestfiles" property group.


Related issues

Related to illumos gate - Feature #6396: remove SVMClosedYuri Pankov2015-10-25

Actions
Has duplicate illumos gate - Bug #7797: SMF service removal: metainit service fails to load on updateClosed2017-01-23

Actions
Actions #1

Updated by Andrew Stormont over 4 years ago

  • Subject changed from SMF does not always cleanups services that have been removed to SMF does not always cleanup services that have been removed
Actions #2

Updated by Andrew Stormont over 4 years ago

  • Description updated (diff)
Actions #4

Updated by Joshua M. Clulow over 4 years ago

I think you could do all of this with a single awk invocation; e.g.

        smfmfiles=`svcprop -p manifestfiles '*' 2>/dev/null |
            awk -v early="$early" '$2 == "astring" &&
            (early != "true" || $3 ~ "^/lib/") { print $3 }'`
Actions #5

Updated by Joshua M. Clulow over 4 years ago

Looks good to me.

Reviewed by: Joshua M. Clulow <josh@sysmgr.org>
Actions #6

Updated by Andrew Stormont over 4 years ago

  • Description updated (diff)
Actions #7

Updated by Andrew Stormont over 4 years ago

  • Description updated (diff)
Actions #8

Updated by Andrew Stormont over 4 years ago

  • Has duplicate Bug #7797: SMF service removal: metainit service fails to load on update added
Actions #9

Updated by Marcel Telka over 4 years ago

Actions #10

Updated by Electric Monk over 4 years ago

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

git commit 56bce6093e5a50ce1da04e68f5e22a53c35cc8a8

commit  56bce6093e5a50ce1da04e68f5e22a53c35cc8a8
Author: Andrew Stormont <astormont@racktopsystems.com>
Date:   2017-02-06T23:11:06.000Z

    7818 SMF does not always cleanup services that have been removed
    Reviewed by: Joshua M. Clulow <josh@sysmgr.org>
    Approved by: Robert Mustacchi <rm@joyent.com>

Actions

Also available in: Atom PDF