Shawn Walker wrote:
5707 depot should support SIGHUP to refresh configuration
Bugid: http://defect.opensolaris.org/bz/show_bug.cgi?id=5707

Last message: http://mail.opensolaris.org/pipermail/pkg-discuss/2009-May/013432.html
Last webrev: http://cr.opensolaris.org/~richb/pkg-5707-v2/

http://cr.opensolaris.org/~richb/pkg-5707-v2/src/modules/server/depot.py.wdiff.html

After further research, I'm wondering if lines 157-159 are necessary. If you remove those, and you send a SIGHUP to a depot process (that is *not* running from a terminal/console) does the configuration get refreshed properly?

It should, because cherrypy performs an execve of the process by default when a SIGHUP is received.

I think we only need the SIGUSR1 hook.  Can you check?

Yup. We can safely remove those three lines and everything
still works fine.

Tested by changing the [repository] description in
/export/home/pkg-solaris/repo-5707/cfg_cache
and checking if the change showed up on the front page after doing a
"kill -HUP <depot pid>". Same for "kill -USR1 <depot pid>".

I also tried doing a pkgsend to the repository via "file:///"
and seeing if a published package shows up in the output of
stard.sfbay.sun.com:25707/catalog/0/ and on the catalog page, etc.

 My pkgsend commands were:

$ eval `pkgsend -s file:///export/home/pkg-solaris/repo-5707 open [email protected]` $ pkgsend -s file:///export/home/pkg-solaris/repo-5707 add set name=description value="Example Package"
   $ pkgsend -s file:///export/home/pkg-solaris/repo-5707 close

 Then did a "kill -HUP <depot pid>"

and saw the new package line.

 Same for "kill -USR1 <depot pid>"

Finally I made sure that the new test:

$  cd ~/pkg/bugs/5707/gate/src/tests
$  pfexec python run.py -o cli.t_pkg_depotd.TestPkgDepot.test_bug_5707 -v

worked correctly.

New webrev at:

  http://cr.opensolaris.org/~richb/pkg-5707-v3/

Thanks to Shawn for his help in re-testing this.

_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss

Reply via email to