Bug #5593
closedRecent versions of svcadm invoked for multiple FMRIs say "Partial FMRI matches multiple instances"
100%
Description
Initial discussion on the mailing list: http://comments.gmane.org/gmane.os.illumos.devel/20204
With recent illumos-based distros (OI Hipster, OmniOS bloody) unlike older distros (from Solaris 10 up to OI 151a8 at least) there is a regression in that calling "svcadm <command> abbrfmri1 abbrfmri2 ... abbrfmriN" no longer works and instead complains that "Partial FMRI matches multiple instances". This happens for abbreviated FMRIs that do unambiguously name a service instance, be it a shortened name of a single-instance service or a unique name of a non-"default" instance (where no other services have an instance with the same name). Thus, each partial FMRI in reality matches one instance, so the message is wrong as well as the ultimate failure of the command (as a way to protect from mistakes due to ambiguity).
- svcadm clear frequent hourly weekly daily monthly
svcadm: Partial FMRI matches multiple instances
- svcadm clear {frequent,hourly,weekly,daily,monthly}
svcadm: Partial FMRI matches multiple instances
- for X in frequent hourly weekly daily monthly; do svcadm clear $X; done
- svcs frequent hourly weekly daily monthly
STATE STIME FMRI
online Feb_03 svc:/system/filesystem/zfs/auto-snapshot:weekly
online Feb_03 svc:/system/filesystem/zfs/auto-snapshot:monthly
maintenance Feb_03 svc:/system/filesystem/zfs/auto-snapshot:hourly
maintenance Feb_03 svc:/system/filesystem/zfs/auto-snapshot:frequent
maintenance Feb_04 svc:/system/filesystem/zfs/auto-snapshot:daily
- svcadm restart autofs nfs/client
svcadm: Partial FMRI matches multiple instances
- svcs autofs nfs/client
STATE STIME FMRI
disabled Jan_28 svc:/network/nfs/client:default
online Jan_28 svc:/system/filesystem/autofs:default
- svcs -a | egrep 'frequent|hourly|weekly|daily|monthly|autofs|nfs/client'
disabled Jan_28 svc:/network/nfs/client:default
online Jan_28 svc:/system/filesystem/autofs:default
online Feb_03 svc:/system/filesystem/zfs/auto-snapshot:weekly
online Feb_03 svc:/system/filesystem/zfs/auto-snapshot:monthly
maintenance Feb_03 svc:/system/filesystem/zfs/auto-snapshot:hourly
maintenance Feb_03 svc:/system/filesystem/zfs/auto-snapshot:frequent
maintenance Feb_04 svc:/system/filesystem/zfs/auto-snapshot:daily
The regression was probably introduced in this commit:
https://github.com/joyent/illumos-joyent/commit/5d047bee30f80f141cc55b60b0f84cb75f5ad80d
(jjelinek authored on Oct 22, 2013: OS-2567 SMF: allow svcadm to act on multiple instances simultaneously)
and the error may be lurking around usr/src/lib/libscf/common/lowlevel.c:6826 as of that commit:
https://github.com/joyent/illumos-joyent/commit/5d047bee30f80f141cc55b60b0f84cb75f5ad80d#diff-d873aa76861657c835899e99f573a6f1R6826
- svcadm clear frequent hourly weekly daily monthly
(this worked)
At the very least, this looks like a regression (worked before, but no longer does, and some scripts/habits may and do rely on old behavior) and the usecase in example is not something the manpage says it is protecting against (abbreviated FMRI is not ambiguous).
Related issues