svcadm does not handle multiple partial FMRI arguments
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.
Updated by Andy Fiddaman over 4 years ago
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 \
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
svcadm enable console-login -> Partial FMRI matches multiple instances
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.
Updated by Electric Monk over 4 years ago
- Status changed from New to Closed
- % Done changed from 0 to 100
commit ad3ad82ad2fb99c424a8482bd1908d08b990ccea Author: Andy Fiddaman <firstname.lastname@example.org> 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 <email@example.com> Reviewed by: Chris Fraire <firstname.lastname@example.org> Reviewed by: Jerry Jelinek <email@example.com> Approved by: Robert Mustacchi <firstname.lastname@example.org>