I've been trying to import sites from a remote Aegir 3 server via Remote Import. However, when I run the Remote_import_list_sites task to begin the process, I get:

Remote import only supports importing from Aegir 2 or Aegir 3 remotes. The API version received was: 0

It turns out that the "aegir_api" variable on the target hostmaster site is in fact set to zero. When I look at the code that sets this variable, I can see that it gets reset if a backup is in progress.

I can in fact confirm that:

  • Running a hostmaster Backup task consistently sets the variable to 0.
  • Running a hostmaster Verify task consistently sets it back to 3.

So the backup task logic is resetting this and shouldn't be. I don't quite understand the original logic in #1027358: Set a variable in settings.php so that modules can check whether the site is in Aegir . However, it looks like this may have been raised by @omega8.cc in comment #6, but the solution didn't take this into account.

Can anyone provide insight into what that backup checking was about? It shouldn't be necessary to verify the target hostmaster before remotely running an import task. How would a regular user even know to do that? And it would be necessary almost every time given that backups usually run more often than verify tasks.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

colan created an issue. See original summary.

colan’s picture

Status: Active » Needs review
FileSize
2.93 KB

This removes the backup checking assuming there's no good reason to keep it.

Tested on hostmaster D7, but I updated the D6 and D8 templates as well.

colan’s picture

I understand why the variable was introduced. What I don't understand is why backup tasks are supposed to undo it.

helmo’s picture

Status: Needs review » Reviewed & tested by the community

Lets commit.

We discussed this during the scrum, see http://hefring.mig5.net/bot/log/aegir/2016-11-17#T643176

  • helmo committed 3a2d77a on 7.x-3.x authored by colan
    Issue #2826770 by colan: Version setting "aegir_api" getting zeroed...
helmo’s picture

Status: Reviewed & tested by the community » Fixed

committed

Status: Fixed » Closed (fixed)

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