The latest provision is causing upgrades to DevShop to fail, and I FINALLY figured out why!

if (d()->profile != 'hostmaster') {

}

Since some of us extend Aegir by using our own drupal profile, we cannot check against d()->profile.

I dealt with a similar issue in #2704291: Verify of a site with function "hosting_get_features" overwrites the `~/.drush/drushrc.php` file..

Instead, let's check that the root and URI match those for @hostmaster alias. That was we can be absolutely sure we dealing with the "@hostmaster" site.

if (!(d()->root == d('@hostmaster')->root && d()->uri == d('@hostmaster')->uri)) {

}
CommentFileSizeAuthor
#3 2826388-check-hostmaster.patch2.05 KBJon Pugh
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Jon Pugh created an issue. See original summary.

Jon Pugh’s picture

Issue summary: View changes
Jon Pugh’s picture

  • Jon Pugh committed e39364b on 2826388-check-hostmaster
    Issue #2826388: Check for "hostmaster" using root and URI, not just "...
Jon Pugh’s picture

helmo’s picture

Check in https://github.com/aegir-project/provision/pull/10 is green and it makes sense.

So +1 ... but we could improve it a bit by adding a utility function e.g. 'provision_is_hostmaster_site()'

  • Jon Pugh committed 07e9a91 on 2826388-check-hostmaster
    Issue #2826388: Move logic to a new function:...
Jon Pugh’s picture

Great idea, done!

  • Jon Pugh committed 07e9a91 on 7.x-3.x
    Issue #2826388: Move logic to a new function:...
  • Jon Pugh authored b5851a3 on 7.x-3.x
    Merge pull request #10 from aegir-project/2826388-check-hostmaster...
  • Jon Pugh committed e39364b on 7.x-3.x
    Issue #2826388: Check for "hostmaster" using root and URI, not just "...
Jon Pugh’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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