I am working on an aegir server that will only have server nodes.

I am unable to only enable hosting module without causing errors, as it calls functions that depend on hosting_site to be enabled.

The patch moved three functions to hosting_site.module: hosting_get_hostmaster_site_nid(), hosting_get_hostmaster_nid(), hosting_get_hostmaster_platform_nid()

It also checks to see if hosting_site module is enabled before trying to create a verify task for hostmaster from the site in hosting_feature_rebuild_caches()

Comments

Jon Pugh created an issue. See original summary.

  • Jon Pugh committed 124f7f4 on 2704247-hostmaster-get-nid
    Issue #2704247: Move functions hosting_get_hostmaster_site_nid() to...
Jon Pugh’s picture

Branch '2704247-hostmaster-get-nid'

ergonlogic’s picture

Shouldn't hosting_get_hostmaster_site_nid() and hosting_get_hostmaster_platform_nid() now be called hosting_site_...? hosting_get_hostmaster_nid() should probably stay where it it, but call hosting_site_get_hostmaster_site_nid().

I'm diffident about the module_exists('hosting_site'), though. Seems like it would be cleaner to add support for a new hook: hook_post_hosting_feature_rebuild_caches(). This would allow for implementing hosting_site_post_hosting_feature_rebuild_caches() that could contain everything after menu_rebuild().

But this verify task is how Hosting Features' backends get registered with Drush. So this change would mean that any module that didn't depend on hosting_site.module would have to find another way to register its drush/ dir as a Drush include. At least hook_post_hosting_feature_rebuild_caches() should allow such alternatives. But maybe we should give this whole mechanism further thought. Either way, we should probably find a way to document it. Maybe add a couple lines to the example modules.

ergonlogic’s picture

Status: Needs review » Needs work