Skip to main content

[pkg-discuss] Re: Code review: system-repository service split

  • From: Tim Foster < >
  • To:
  • Cc: Edward Pilatowicz < >, Erik Trauschke < >
  • Subject: [pkg-discuss] Re: Code review: system-repository service split
  • Date: Thu, 03 Oct 2013 14:39:19 +1300

Hi Ed,

On 10/ 3/13 02:27 PM, Edward Pilatowicz wrote:
On Mon, Sep 30, 2013 at 11:57:52AM +1300, Tim Foster wrote:
On 09/28/13 04:24 AM, Erik Trauschke wrote:
http://ips.java.net/webrev/timf/sysrepo-svc-split-webrev/

Because there's no dependency on the system-repository-cache, it
does mean that we can have this situation:

# svcs *system-repository*
STATE          STIME    FMRI
disabled       11:23:18 svc:/application/pkg/system-repository-cache:default
online         11:01:33 svc:/application/pkg/system-repository:default

where a rogue admin has disabled the cache service and nothing
decides the system is broken.

for the system-repository-cache service why don't we:

- deliver it as always enabled
- mark the dependency on the system-repository service as
   grouping=optional_all and restart_on='refresh'

Hmm, that'll still allow for a disabled system-repository-cache, as in the scenario above won't it, or are you saying the system-repository should also have a 'require_all' dependency on the system-repository-cache as well (with the system-repository-cache choosing to SMF_EXIT_TEMP_TRANSIENT)


My initial worry was that since 'pkg set-publisher' refreshes the system-repository service, that we'll end up restarting htcacheclean more frequently than we want (it's bad enough at the moment, restarting on every boot!) until I remembered that we have code in the refresh method that specifically looks at the arguments for the existing htcacheclean process to determine whether any of the configuration has actually changed.

then when the system-repository-cache service start method runs we know
that either:

- the system-repository is online, in which case we start htcacheclean
- the system-repository is disabled, in which return
   SMF_EXIT_TEMP_TRANSIENT

that way htcacheclean will get automatically enabled whenever the
system-repository service gets started.

In theory, that sounds excellent. I'll experiment a bit and report back - thanks for the idea.

        cheers,
                        tim



[pkg-discuss] Re: Code review: system-repository service split

Edward Pilatowicz 10/03/2013

[pkg-discuss] Re: Code review: system-repository service split

Tim Foster 10/03/2013

[pkg-discuss] Re: Code review: system-repository service split

Edward Pilatowicz 10/04/2013
 
 
Close
loading
Please Confirm
Close