Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
After enabling the hosting backup queue module in aegir hostmaster 3.6, aegir fails to perform any queue task.
I've found the cause of this by manually calling the dispatch from the command line:
drush @hostmaster hosting-dispatch
PHP Fatal error: Call to undefined function hosting_get_most_recent_task() in var/aegir/hostmaster7.x-3.6/profiles/hostmaster/modules/aegir/hosting_site_backup_manager/hosting_backup_queue/hosting_backup_queuemodule on line 71
Drush command terminated abnormally due to an unrecoverable error.
So this failing command prevents all other cron process from taking place.
Comments
Comment #2
gboudrias CreditAttribution: gboudrias at Praxis Labs Coop commentedIf someone can confirm this bug it is indeed important as it would break all queues.
Comment #3
gboudrias CreditAttribution: gboudrias at Praxis Labs Coop commentedI can't reproduce this on my staging server. Can you list your versions (PHP, etc)?
Since this may be important I would like others to check if they can reproduce this bug.
Comment #4
Neograph734I am currently away from the computer. Will provide a list of versions and enabled modules tomorrow.
Comment #5
Neograph734As of now I can no longer reproduce the failing of scheduled tasks. I just updated several system packages and maybe that solved it. The php error is still there when running
drush @hostmaster hosting-dispatch
, but it no longer appears to be blocking the processing of tasks. Below you'll find the post I was initially writing.Let me start by explaining my installation was far from ideal because I managed to install exactly between the releases of provisioning and hostmaster. (Provisioning failed to download hostmaster-7.x-3.6 as it was not yet released and perhaps both packages should be published in another order? On the other hand, I was probably the only one unlucky enough to experience this.) I resumed the installation a couple of hours later and it worked. I don't expect this to be related, but it might.
My development machine is a vmware virtual machine running in Windows. It has 1GB of ram, 1 processor and 20 GB of disk space.
The versions are
Centos: 7.2.1511
Apache: 2.4.6
PHP: 5.6.22
Enabled Drupal modules:
Comment #6
gboudrias CreditAttribution: gboudrias at Praxis Labs Coop commentedIt may be hard to reproduce since a lot of us are on Debian.
(Set to "major" as it doesn't seem to break everything anymore.)
Comment #7
helmo CreditAttribution: helmo at Initfour websolutions commentedI see that the missing function was removed in #2474801: Task cancellation broken
I've now restored it. You can apply
this patch of upgrade to the dev version.
PS: About the packaging delay during the 3.6 release ... it took 110 minutes before the hostmaster package was build ... normally that's just a few. :( Luckily someone from the D.o team fixed the package build.
Comment #8
Neograph734Thanks a lot for the fast response guys.
Regarding the ps, it explains a lot.
Comment #9
sozkara CreditAttribution: sozkara commentedI just upgraded my aegir and the error is still there. There are no backups created still.
Error: Call to undefined function hosting_get_most_recent_task() in .../aegir/distro/007/profiles/hostmaster/modules/aegir/hosting_site_backup_manager/hosting_backup_queue/hosting_backup_queue.module
Comment #10
helmo CreditAttribution: helmo at Initfour websolutions commented@sozkara did you upgrade to the dev version?
Check that hosting/task/hosting_task.module has the function as shown in http://cgit.drupalcode.org/hosting/commit/task/hosting_task.module?id=31...
Comment #11
Neograph734sozkara the hostmaster distribution is not yet updated. You need to download the dev version of the hosting module manually and place it in your installation profile (/var/aegir/hostmaster-7.x-3.6/profiles/hostmaster/modules/hosting). That solved it for me.
You might be able to download it with
drush @hostmaster dl hosting
, but that results in the same module being available to Drupal twice and potentially leads to stange behavior.It worked for me and the error is gone.
Comment #12
sozkara CreditAttribution: sozkara commented@helmo i applied the patch as per http://cgit.drupalcode.org/hosting/patch/task/hosting_task.module?id=313...
error is gone from the hosting-dispatch, but still no backups created in task queue.
edit: same with dev version. no errors, but no backup tasks either.
Comment #13
sozkara CreditAttribution: sozkara commentedCan this be related?
Comment #14
Neograph734@sozkara since it is not related to the error anymore (thus not related to this issue), I've created a separate issue for this #2756411: Backup tasks are not being generated.
UPDATE:
Yes that could be related. Could you place that in the other issue as well please?
Comment #15
sozkara CreditAttribution: sozkara commented@Neograph734 I updated that issue, thanks.
Comment #16
d.sibaud CreditAttribution: d.sibaud commentedapplying the patch linked in #7 suddenly HMBM restarted to backups, many thanks @helmo
Comment #17
millenniumtreeWould like to see the patch from #7 and 2756411#3 in the Debian 3.6 package!
Our backups must be manually run each morning on 3 servers using 3.5 and 3.6.
Glad to see the solution was finally discovered! :)