Fatal error: Call to undefined function hosting_get_queues()...
hosting.drush.inc on line 17

my fault?

Comments

Anonymous’s picture

Status: Active » Postponed (maintainer needs more info)

Please provide more information per the bug reporting guidelines

dixon_’s picture

I can confirm this issue. The error appears when trying to run any drush command. I'll try to look into the problem and submit a patch if I can fix it.

dixon_’s picture

It seems that Drupal is in a too early bootstrap phase. hosting.module isn't included an that is why the fatal error is thrown. If I just try to include the module file t() and module_invoke_all() isn't defined either. The quick solution I came up with was to manually execute drush_bootstrap(DRUSH_BOOTSTRAP_DRUPAL_FULL) at the very beginning of the file hosting.drush.inc.

I think it's strange that more people hasn't faced the same problem. Could it be an environment specific issue that makes Drush doesn't bootstrap the right way?

Here is my environment:

  • Linux vps 2.6.26-1-xen-amd64 #1 SMP Sat Nov 8 21:20:04 UTC 2008 x86_64 GNU/Linux
  • PHP 5.2.6-3ubuntu4.4 with Suhosin-Patch 0.9.6.2
dixon_’s picture

Status: Postponed (maintainer needs more info) » Active
Anonymous’s picture

Where in the filesystem are you when you run the drush command? i.e does it occur when in the root of the platform /var/aegir/yourplatform, or in sites/your.main.aegir.site.com, or?

This issue's been mentioned quite a few times with various reasons for it: usually the reason is such that the module 'hosting' is not in /var/aegir/yourplatform/profiles/hostmaster/modules but in /sites/all/modules or sites/default or something like that.

See these tickets

#545168: fatal error on drush 'hosting setup' : hosting_get_queues() not found
#484268: Call to undefined function hosting_get_queues()
#498210: Install problems with drush
#446620: can't get past 'drush.php provision verify' failing

dixon_’s picture

You may be right. I have the hosting module in sites/all/module. I will try to move it.

But then I think we have a problem with the make file, which downloads the hosting module to sites/all/modules. Isn't that right?

Anonymous’s picture

The make file downloads the hosting module (and others) and by design places them inside the 'modules' directory inside profiles/hostmaster/ . So if you installed using drush_make etc and it's put it in sites/all/modules, that is an issue that I've never reproduced.

Anonymous’s picture

All other modules ie install_profile_api, jquery_ui, modalframe etc should also be in that subdirectory. And the Eldir theme should be in /profiles/hostmaster/themes. It's not possible for drush_make to put these in the correct place but not the hosting module in the way the make file currently exists, so perhaps it was accidentally moved?

Good luck!

dixon_’s picture

Status: Active » Fixed

When setting up Aegir with hostmaster.make all modules is installed in sites/all/modules. This is why the problem appears. Moving the hosting module to profiles/hostmaster/modules solved the problem.

Thanks for quick answers!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.