I've run into an SMF upgrade-related problem, and I can't explain what
I'm seeing.  I think it's a bug, but before I file it, I want to make
sure, and find out whether there's any more information I should
gather.

The problem is that if a service has ever been enabled -- even just
once -- then it's impossible to import any new attributes.  This is
affecting my current project, because I rely on manifest imports to
"do the right thing" after an upgrade.

Please see the attached example files.  The second file is just a copy
of the first with an extra property attached to the existing property
group.

If I import the first file, I can create any number of instances, and
then import the second (modified) file, and the results are as
expected:

# svccfg import foo.xml
# svcprop -p config foo
config/bar boolean false
config/stability astring Evolving
# svccfg -s foo add blah
# svccfg -s foo add blech
# svccfg import foo2.xml
# svcprop -p config foo
config/bar boolean false
config/baz boolean false
config/stability astring Evolving
# svcprop -p config foo:blech
config/bar boolean false
config/baz boolean false
config/stability astring Evolving
# 

The new "baz" property is added.  But watch what happens if I *ever*
enable one of these services.  It now becomes impossible to do any
upgrade at all:

# svccfg delete foo
# svccfg import foo.xml
# svccfg -s foo add blah
# svccfg -s foo add blech
# svcadm enable -s foo:blah
# svcadm disable -s foo:blah
# svccfg import foo2.xml
# svcprop -p config foo
config/bar boolean false
config/stability astring Evolving
# 

And, what's worse, it now appears to be impossible to fix the problem
in any obvious way.  "Refresh" doesn't do anything.

# svcadm refresh foo
svcadm: Pattern 'foo' matches multiple instances:
        svc:/foo:blech
        svc:/foo:blah
# svcadm refresh foo:blah
# svcadm refresh foo:blech
# svcprop -p config foo
config/bar boolean false
config/stability astring Evolving
# svccfg import foo2.xml
# svcprop -p config foo
config/bar boolean false
config/stability astring Evolving
# 

The only thing I can do is delete that toxic (previously enabled)
instance, and redo the import:

# svccfg delete foo:blech
# svccfg import foo2.xml
# svcprop -p config foo
config/bar boolean false
config/baz boolean false
config/stability astring Evolving
# 

Why would this be true?  I've tried running with the "-v" flag, but
the output doesn't seem different between the cases.  What else should
I be looking at?

-- 
James Carlson, Solaris Networking              <james.d.carlson at sun.com>
Sun Microsystems / 35 Network Drive        71.232W   Vox +1 781 442 2084
MS UBUR02-212 / Burlington MA 01803-2757   42.496N   Fax +1 781 442 1677

-------------- next part --------------
A non-text attachment was scrubbed...
Name: foo.xml
Type: application/octet-stream
Size: 938 bytes
Desc: foo original
URL: 
<http://mail.opensolaris.org/pipermail/smf-discuss/attachments/20090115/728ddff4/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: foo2.xml
Type: application/octet-stream
Size: 992 bytes
Desc: foo modified
URL: 
<http://mail.opensolaris.org/pipermail/smf-discuss/attachments/20090115/728ddff4/attachment-0001.obj>

Reply via email to