John Forte wrote: > I'm having some difficulty understanding whether I am seeing expected > behavior or possibly a bug, either way, I'm a bit confused. > > I have a service with one instance. I use scf_pg_create to create a > new property group 'A' with one property '1'. If I then use svcprop > to view all property groups and properties, I see property group > 'A'/property '1' only on the parent service, not the instance. > However, if I use svccfg import to reimport the manifest, the > property group and the property I created, using > scf_pg_create/scf_transaction_property_new, show up on the service > instance using svcprop but when I issue a listpg on svccfg, that same > property group does not display.
Service properties are inherited by instances. A couple points: svccfg always shows you precisely what is set where. For example, when you look at an instance, you see only the properties set on that instance, not the composition of that instance and its service. svcprop defaults to looking at the running snapshot of an instance; i.e. a snapshot of its configuration taken the last time it was started or refreshed. You can see your changes if you use svcprop -c, but remember they won't take effect until you refresh the service. > A follow on question is do I need to call scf_pg_create on the > instance? It appears that property groups and properties are not > really inherited, they're somehow inherited for list purposes via > svcprop (and I assume the library get interfaces but I haven't tried > that yet) such that I would need to create the property group on the > instance in addition to the parent service if properties on that > instance only were expected to be modifiable by the admin. You do not need to call scf_pg_create on the instance. You do need to refresh the instance after making the change to the service for it to take effect, though. We require this so that if you were to make several changes to the service or instance, you don't run the risk of the instance seeing an incomplete or inconsistent configuration. Dave