I was working on updating the spec with the changes/clarifications
we made over the past couple weeks, and realized that there's still
a problem with the location startup scheme we came up with.

The plan was:
  - network/location has dependency on filesystem/usr and on location
    config files stored under /etc/svc/volatile.

  - ipfilter and ipsec services will depend on network/location;
    milestone/network will continue to depend on ipfilter and the
    ipsec services.

  - nwamd, when ready to install a location, will place the needed
    files in /etc/svc/volatile/nwam-loc/.

  - nwamd will disable/re-enable network/location, which will cause
    it to re-evaluate its dependencies, and see the required files
    under /etc/svc/volatile/nwam-loc/.

  - network/location will then install the location files into the
    filesystem, and refresh/restart services as necessary to activate
    the new location config.

What occurred to me today was that network location's start method
has one other task: if the default (No-Net and Automatic) locations
don't already exist, it creates them.  This is another task that must
wait until we have a writable filesystem, thus network/location's
dependency on filesystem/usr helps to ensure that that's the case.

But this presents us with a chicken-and-egg problem the first time
nwam runs after install: nwamd can't select and install a location
until it has at least read in the default network locations, so it
won't create the files that network/location depends on until it has
the Automatic and No-Net locations loaded.  But those locations won't
be created until network/location runs.  Clearly a problem!

I'm thinking the creation of the default locations should be split
off into a separate transient service, which would be inserted between
filesystem/usr and network/location in the dependency chain.  That
feels a little heavy-weight; but I haven't yet come up with anything
better.  Any ideas?

-renee

Reply via email to