On Mon, Oct 16, 2006 at 04:11:27PM -0700, John Beck wrote:
> I was helping a user with a service property issue w/rt the Secure by
> Default project where in order for the user to get mail, sendmail needed
> to have its:
> 1) config/local_only property set from true to false
> 2) service refreshed
> 3) service restarted
> 
> The user was booted into his older (build 29) environment, so we used
> svccfg's "repository" command to switch to the newer (build 49) repository,
> the "listprop" command to verify that the property was still true, then the
> "setprop" command to set it to false.  Then we made the mistake of assuming
> that a reboot back to the build 49 environment would constitute an automatic
> refresh and restart of the service.  But it didn't.
> 
> Fortunately, an SMF expert happened to walk by just at this time, and told
> us that we needed to refresh the service even after rebooting; once we did
> so, `svcprop` started reporting the desired value, and a subsequent restart
> of the service resulted in mail flowing.
> 
> So my question is: why didn't the reboot constitute an automatic refresh
> as we thought it would?  The current behavior seems counter-intuitive.

  A refresh to commit changes is needed on reboot for the same reason a
  refresh is needed when restarting a service.

  Without a refresh, a service which restarts (e.g. because it
  encountered an error) could read a configuration which is in an
  inconsistent intermediate state.  The refresh takes the edited
  version of the configuration and makes it active all at once, so you
  either get the old configuration or the new -- not something in
  between.

  The same principle applies on reboot.  The system could reboot when
  the configuration is in an inconsistent state.  Only when the
  administrator says so will SMF consider the edited version of the
  configuration consistent and usable.

  The part of the above scenario that seems wrong to me is not the need
  to refresh, but the need to restart.  A 'svcadm refresh' is supposed
  to tell SMF to (roughly):
    a) Make the edited configuration the active configuration, and
    b) Instruct the service to re-read its (new) configuration.

  If a restart is needed to make changing the local_only property
  register with sendmail, it sounds like there's a problem with
  sendmail's refresh method.

  Dave


Reply via email to