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.
Comment | File | Size | Author |
---|---|---|---|
#2 | provision-aegir_api_reset_on_backup-2826770-2.patch | 2.93 KB | colan |
Comments
Comment #2
colanThis 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.
Comment #3
helmo CreditAttribution: helmo at Initfour websolutions commentedIt was introduced in #1027358: Set a variable in settings.php so that modules can check whether the site is in Aegir See #1027358-1: Set a variable in settings.php so that modules can check whether the site is in Aegir item 5 for the reasoning
Comment #4
colanI understand why the variable was introduced. What I don't understand is why backup tasks are supposed to undo it.
Comment #5
helmo CreditAttribution: helmo at Initfour websolutions commentedLets commit.
We discussed this during the scrum, see http://hefring.mig5.net/bot/log/aegir/2016-11-17#T643176
Comment #7
helmo CreditAttribution: helmo at Initfour websolutions commentedcommitted