function registration is incorrect after gearman server restart

Bug #1162977 reported by James E. Blair
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Jenkins Gearman Plugin
Fix Released
High
James E. Blair

Bug Description

Steps to reproduce:

1) Start gearmand
2) Enable gearman plugin in jenkins
3) gearadmin --workers shows correct function registration
4) Disable gearman plugin
5) gearadmin --workers shows correct function registration (no functions registered)
6) Enable gearman plugin
7) gearadmin --workers shows correct function registration
8) Stop gearmand
9) Start gearmand
10) gearadmin --workers shows correct function registration
11) Disable gearman plugin
12) gearadmin --workers shows INCORRECT function registration (functions still registered)
13) Enable gearman plugin; config page hangs on saving

Revision history for this message
Khai Do (zaro0508) wrote :

I'm seeing something a little different between steps 9 & 10. The functions are not exactly correct.

functions from step #7:
31 50.46.196.80 master-manager : stop:15.185.117.66
32 50.46.196.80 master-exec-0 : build:pear build:pear:!ubuntu build:guava build:grapefruit build:grapefruit:air
33 50.46.196.80 oneiric-668621-exec-0 : build:peach build:peach:linux build:lemon build:lemon:linux&&gcc build:kiwi:ubuntu build:kiwi build:kiwi:centos build:guava build:apple build:apple:oneiric-668621
34 50.46.196.80 precise-668665-exec-0 : build:tangerine:torrent build:tangerine build:tangerine:centos build:pear build:pear:!ubuntu build:peach build:peach:linux build:kiwi build:mango build:kiwi:ubuntu build:mango:torrent build:guava build:kiwi:centos

functions from step #10:
32 50.46.196.80 - : stop:15.185.117.66
31 50.46.196.80 - : build:grapefruit:air build:pear:!ubuntu build:pear build:guava build:grapefruit
33 50.46.196.80 - : build:apple:oneiric-668621 build:kiwi build:lemon build:apple build:kiwi:ubuntu build:guava build:lemon:linux&&gcc build:peach:linux build:peach build:kiwi:centos
34 50.46.196.80 - : build:kiwi build:mango build:kiwi:ubuntu build:mango:torrent build:guava build:tangerine:centos build:kiwi:centos build:tangerine:torrent build:pear:!ubuntu build:pear build:tangerine build:peach:linux build:peach

The functions seem to be correct, however the worker IDs seemed to have dropped off. My initial hunch is that this is a problem with the underlying gearman-java library that does the work to re-establish a lost connection with the server. I will investigate to see wether this is indeed the problem. Will also investigate options for making the connection more robust.

Khai Do (zaro0508)
Changed in gearman-plugin:
assignee: nobody → Khai Do (zaro0508)
importance: Undecided → High
status: New → In Progress
Revision history for this message
Khai Do (zaro0508) wrote :

I was calling the unregisterAll() method before shutting down the worker. But I can't do that due to an issue in the gearman-java library: https://bugs.launchpad.net/gearman-java/+bug/708153

I've removed which seems to have fixed the NPE.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to gearman-plugin (master)

Fix proposed to branch: master
Review: https://review.openstack.org/25846

Revision history for this message
James E. Blair (corvus) wrote :

In the latest build of gearman-plugin, in step 12, only the "stop" method is incorrectly listed, all the other methods are gone (which is correct). I also observe the worker ids issue you noted. And finally, the config screen still does hang for me at step 13.

Revision history for this message
James E. Blair (corvus) wrote :

This also happens when I try to trigger a build via gearman a second time.

Revision history for this message
James E. Blair (corvus) wrote :

Oops, strike that last comment, wrong bug.

Khai Do (zaro0508)
Changed in gearman-plugin:
status: In Progress → Fix Committed
Khai Do (zaro0508)
Changed in gearman-plugin:
status: Fix Committed → Triaged
Revision history for this message
Khai Do (zaro0508) wrote :

I can no longer repro after applying commit: https://review.openstack.org/#/c/26911/
Seems like this issue is fixed.

Changed in gearman-plugin:
assignee: Khai Do (zaro0508) → James E. Blair (corvus)
Khai Do (zaro0508)
Changed in gearman-plugin:
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.