David Bustos wrote: > Quoth David Bustos on Thu, Jan 15, 2009 at 01:08:16PM -0800: >> /* >> * Didn't find any last-import snapshots. Override- >> * import the properties. Unless one of the instances >> * has a general/enabled property, in which case we're >> * probably running a last-import-capable svccfg for >> * the first time, and we should only take the >> * last-import snapshot. >> */ > > There might be a workaround hidden here. Can you try > > - importing the manifest > - creating an instance > - enabling or disabling that instance > - importing the original manifest > - importing the new manifest > > ? If I'm right, then the re-import of the original manifest will create > the last-import snapshots necessary for svccfg to behave better. >
I agree that an import should create last-import snapshots for existing instances but there seems to be a bug. That is the current code doesn't match the above comment. If I read it correctly, if we don't have any last-import snapshot, we rely on lscf_instance_import() on line 6750 to take last-import snapshots for existing instances. However, we we only call lscf_instance_import() for instances described in the manifest which in our case is an empty set. We can verify this by running 'svccfg -s foo:bar listsnap' after the svccfg import command. I think creating last-import snapshots for all existing instances if none exists would make the suggested workaround workable :) -tony