Bug #13108

Job scheduler can't find worker after "site title" changes

Added by David Juhasz 3 months ago. Updated 2 months ago.

Status:VerifiedStart date:07/11/2019
Priority:MediumDue date:
Assignee:-% Done:

0%

Category:Job scheduling
Target version:Release 2.5.2
Google Code Legacy ID: Tested version:2.5
Sponsored:No Requires documentation:

Description

To reproduce

  1. Make sure the AtoM worker is running, e.g. sudo service atom-worker status
  2. Login as an administrator, go to "Admin > Settings > Site information"
  3. Change the "Site title" and click "Save"
  4. Perform any action that runs a background job, e.g. Navigate to an archival description and click "Generate a finding aid", or change the name of an archival institution linked to one or more archival descriptions

Resulting error

2019/07/11 17:35:04 [error] 561#561: *13 FastCGI sent in stderr: "PHP message:
No Gearman worker available that can handle the job arFindingAidJob" while
reading response header from upstream, client: 10.10.10.1, server: _, request:
"GET /index.php/walden-garden-club-2/informationobject/generateFindingAid
HTTP/1.1", upstream: "fastcgi://unix:/var/run/php-fpm.atom.sock:", host:
"10.10.10.10", referrer: "http://10.10.10.10/index.php/walden-garden-club-2" 

Expected result

Changing the site title should not affect the job scheduler functionality.

Additional notes

- Restarting the atom-worker will load the new site title and restore job scheduler functionality
- If the "Site title" is translated to a second language, switching the site to that culture will cause the job scheduler to fail as well, as the site title is different (this was the originally reported failure case)
- Changing the "Site Base URL" will also prevent the job scheduler from working

History

#1 Updated by David Juhasz 3 months ago

  • Description updated (diff)

#2 Updated by David Juhasz 3 months ago

  • Description updated (diff)

#3 Updated by David Juhasz 3 months ago

  • Description updated (diff)

#4 Updated by David Juhasz 3 months ago

The bug looks like a result of this code:
https://github.com/artefactual/atom/blob/1c70ba36c0ad85ed0fd5cef8a64508ae41c207d0/lib/model/QubitJob.php#L324

The site title is being use to create a unique site prefix for jobs, to avoid namespace collisions between jobs from multiple AtoM instances running on the same server.

#5 Updated by David Juhasz 3 months ago

  • Description updated (diff)

#6 Updated by José Raddaoui Marín 3 months ago

  • Status changed from New to Code Review

Since we're trying to improve the worker stability in 2.5.2, I have a tentative fix for this issue:

https://github.com/artefactual/atom/pull/945

There is a long description about the problem and solution in the PR and some comments in the code changes.

#7 Updated by Dan Gillean 3 months ago

  • Assignee set to David Juhasz

#8 Updated by David Juhasz 2 months ago

  • Status changed from Code Review to Feedback
  • Assignee changed from David Juhasz to José Raddaoui Marín

PR looks good to me. :)

#9 Updated by José Raddaoui Marín 2 months ago

  • Status changed from Feedback to QA/Review
  • Assignee changed from José Raddaoui Marín to Dan Gillean

Thanks David! Ready for testing on qa/2.6.x. Clear Symfony cache and restart the worker after pulling the new code.

#10 Updated by Dan Gillean 2 months ago

  • Status changed from QA/Review to Feedback
  • Assignee changed from Dan Gillean to José Raddaoui Marín

Works in qa/2.6.x - do we want to backport this one for the 2.5.2 release?

#11 Updated by David Juhasz 2 months ago

I vote for backporting to 2.5.x :)

#12 Updated by José Raddaoui Marín 2 months ago

  • Status changed from Feedback to QA/Review
  • Assignee changed from José Raddaoui Marín to Dan Gillean
  • Target version changed from Release 2.6.0 to Release 2.5.2

Cherry-picked to stable/2.5.x.

Sorry for stepping ahead, I thought this was already 2.5.2 material and added some notes about it in the 2.5 docs.

#13 Updated by Dan Gillean 2 months ago

  • Status changed from QA/Review to Verified
  • Assignee deleted (Dan Gillean)

Also available in: Atom PDF