Project

General

Profile

Bug #8688

svcadm does not handle multiple partial FMRI arguments

Added by Andy Fiddaman about 2 years ago. Updated about 2 years ago.

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

100%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage

Description

Considering the following behaviour of svcadm in illumos gate:

1. svcadm enable console-login -> Partial FMRI matches multiple instances
2. svcadm enable \*console-login\* -> Okay
3. svcadm enable console-login:vt2 -> Okay
4. svcadm enable console-login:vt2 console-login:vt3 -> Partial FMRI matches multiple instances
5. svcadm enable console-login \*console-login:vt3 -> Okay

I consider that examples 4 and 5 exhibit the wrong behaviour. Each argument should be evaluated independently to determine if it matches multiple FMRIs with or without wildcards, rather than considering the arguments as a whole.


Related issues

Related to illumos gate - Feature #5021: SMF: allow svcadm to act on multiple instances simultaneouslyClosed2014-07-18

Actions
Related to illumos gate - Bug #5593: Recent versions of svcadm invoked for multiple FMRIs say "Partial FMRI matches multiple instances"Closed2015-02-05

Actions
Related to illumos gate - Bug #5112: svcadm manpage needs more 5021-related updatesClosed2014-08-21

Actions

History

#1

Updated by Andy Fiddaman about 2 years ago

In summary:

5021 broke a behaviour of svcadm; the ability to specify multiple partial FMRIs as arguments, e.g.:

svcadm disable /network/nfs/nlockmgr /network/nfs/status \
/network/nfs/cbd /network/nfs/mapid

This is because the change for 5021 looks at the entire set of arguments
at once and if any partial FMRI is found in conjunction with more than one
argument, then it generates an error.

So this is a specific regression and will be fixed under this issue.

However the automatic promotion of wildcards from any wildcard fmri to any other partial fmri seems wrong

At present:

svcadm enable console-login -> Partial FMRI matches multiple instances

but:

svcadm enable console-login '*vtdaemon*' -> ok

However, there's a comment in the code that could be read in a way that
implies that this is desired behaviour so more discussion is required.
Taking this to the illumos developer list.

#2

Updated by Andy Fiddaman about 2 years ago

  • Related to Feature #5021: SMF: allow svcadm to act on multiple instances simultaneously added
#3

Updated by Andy Fiddaman about 2 years ago

  • Related to Bug #5593: Recent versions of svcadm invoked for multiple FMRIs say "Partial FMRI matches multiple instances" added
#4

Updated by Andy Fiddaman about 2 years ago

  • Related to Bug #5112: svcadm manpage needs more 5021-related updates added
#5

Updated by Electric Monk about 2 years ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100

git commit ad3ad82ad2fb99c424a8482bd1908d08b990ccea

commit  ad3ad82ad2fb99c424a8482bd1908d08b990ccea
Author: Andy Fiddaman <omnios@citrus-it.net>
Date:   2017-10-18T20:16:11.000Z

    5112 svcadm manpage needs more 5021-related updates
    5593 Recent versions of svcadm invoked for multiple FMRIs say "Partial FMRI matches multiple instances" 
    8688 svcadm does not handle multiple partial FMRI arguments
    Reviewed by: Dominik Hassler <hadfl@omniosce.org>
    Reviewed by: Chris Fraire <cfraire@me.com>
    Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com>
    Approved by: Robert Mustacchi <rm@joyent.com>

Also available in: Atom PDF