I have 2 brand new servers with BOA 2.0.3 install (virtually identical, including platforms for o1 users). Was able to add a remote server and list sites on o1 but not import them. I'm getting drush command error.

Running: /data/disk/o1/tools/drush/drush.php @server_server[remote] provision-remote_import --backend 2>&1
The external command could not be executed due to an application error.

snip

Could not find provision alias named: server_localhost
Trying to get property of non-object db.php:12
Could not find provision alias named: platform_Drupal7142S001
Drush command terminated abnormally due to an unrecoverable error. Error: Call to a member function get_services() on a non-object in /data/disk/o1/.drush/provision/Provision/Context.php, line 293
Output from failed command : Fatal error: Call to a member function get_services() on a non-object in /data/disk/o1/.drush/provision/Provision/Context.php on line 293

Also, the instructions in the docs are somewhat confusing or incomplete.
There's no directory 003 on a fresh install.
You should also chmod 700 .ssh and chmod 600 authorized_key on the target server or the keys wouldn't work.

Comments

omega8cc’s picture

Project: Barracuda » Octopus
Component: Code » Documentation

We will try to review those docs again, but they were written from our working, well tested how-to we have used w/o issues many times. We don't include obvious stuff like chmod for ssh files, since basic sysadmin experience is listed as a requirement on the project page, but we may need to check if all the rest is up to date. The 003 directory is an example (of course).

omega8cc’s picture

Status: Active » Closed (works as designed)
nebel54’s picture

I experienced the same issues on three instances of octopus/aegir. Here is a more detailed description, and a (dirty) workaround which solved the issue in my case: #1663066: Can't import remote site

omega8cc’s picture

@Nebel54 This may happen when you have the Provision extension installed both on the source and target (which is expected when both source and target were installed with BOA). We should probably add it in the docs that you should remove the extension from the source server. We never experienced the issue in our test when using the extension only on the target server.

nebel54’s picture

Thanks for your reply - it's a weird issue.

I did delete the drush-extension on the source-server:
o1@harald:~$ mv .drush/provision/remote_import ~/backup/provision/

and the remote_import function does not show up anymore when doing drush | grep "remote". But the result is the same when I start an import:
Could not find provision alias named: server_localhost

The frontend (hosting_remote_import) isn't enabled either.

omega8cc’s picture

Component: Documentation » Code
Category: support » bug
Status: Closed (works as designed) » Needs work

Hmm, weird. Thanks for testing. I guess we should try to reproduce this again then.

lsolesen’s picture

I am having exactly the same problem on my install. I removed the remote_import beforehand, but has the same problems.

Basically, I setup BOA as explained here http://larsolesen.dk/node/357 --> and then I got the remote server to verify by following http://drupalcode.org/project/barracuda.git/blob/HEAD:/docs/REMOTE.txt and a couple of notes on http://larsolesen.dk/node/358.

I will try to investigate further soon.

nebel54’s picture

@Isolesen: As mentioned in my comment #3, you can apply a workaround until the source of the problem is found:

On Target Server edit:
/data/disk/o1/.drush/provision/remote_import/hostmaster/hostmaster_service.inc

and replace the line 91:

$local_file = d('@hostmaster')->platform->server->backup_path . '/' . basename($remote_backup_file);

with:

$local_file = '/data/disk/o1/backups/' . basename($remote_backup_file);

This works for me.

lsolesen’s picture

Confirmed that this manual workaround will resolve the issue.

mrP’s picture

I had the same error as well going between two BOA-2.0.5 servers. #8 did the trick for me as well.

omega8cc’s picture

Component: Code » Documentation
Status: Needs work » Closed (works as designed)
StatusFileSize
new197.72 KB

Yes, it does work. I just tried it again and it works without any code modifications, as long as you really follow the how-to. Note that I have tested it only between two remote instances where both of them use the same Aegir system username (default Octopus o1). And it just works:

pp

omega8cc’s picture

StatusFileSize
new173.72 KB
new185.09 KB
new88.96 KB
new90.3 KB
new263.6 KB
new170.34 KB
new90.07 KB
new168.51 KB
new151.79 KB
new147.91 KB

And once again, this time step-by-step another site migrated between those remote Octopus instances - no code modified.

The how-to followed:

http://drupalcode.org/project/octopus.git/blob/HEAD:/docs/REMOTE.txt

The code used on the target only:

https://github.com/omega8cc/remote_import/tree/6.x-2.x
https://github.com/omega8cc/hosting_remote_import

12

13

14

16

17

18

19

20

21

22

drurian’s picture

Awesome! I'll try it again with the newer versions of Barracuda and post my results.

drurian’s picture

Status: Closed (works as designed) » Needs review

I followed the instructions and still got the same errors. I wonder if it's related to this http://drupal.org/node/1896184
The fix in #8 works.

omega8cc’s picture

Status: Needs review » Closed (works as designed)

Please don't re-open this issue. We have tested it many times already, and as long as your are using BOA stack and you strictly follow the how-to, it just works. We have tested this between a few different servers in the last few months and it always worked, also with BOA-2.0.6-dev. If you are experiencing issues, it is not related to this how-to and properly used modules.

snlnz’s picture

I followed #8 and it saved me so much hassle.

I was pulling my hair out trying to follow the documentation correctly. I do have a different username than the default o1 examples on both hosts but they're identical and I followed instructions line for line carefully with no joy.

After editing the file in #8 it all worked perfectly.
I have to admit this process could do with some work, not a lot but a little bit of massaging would make moving sites from one place to another an absolute breeze. I'd love to see this functionality work out of the box where you can check a box to designate source/target machine without having to go into code and remove drush extensions etc.

It's also a shame you can't bulk migrate all sites from one instance to another, that would be awesome.

Thanks Nebel54 and omega8cc saved so much time, absolutely stoked :)

omega8cc’s picture

Personally I believe it is way too complex and, as experience shows, confusing method, even if it just works in all our tests.

I can only guess that some folks don't really follow the screenshots for adding the remote server properly: http://drupalcode.org/project/octopus.git/blob/HEAD:/docs/REMOTE.txt#l109

No idea what else would break things. We simply documented our tested many times workflow and as you can see above, it always works.

We plan to add a command line only utility to make migrations between instances easy.

It will automate all steps from the how-to, but of course will need some configuration, because there will be no fancy web-based lists to choose the site and the target platform etc.

snlnz’s picture

Agreed, though a cl version would be far more flexible with batching multiple sites :)
I'd be happy to test and report usage if you advise when something is in head.

tx again.

drurian’s picture

I had no luck with 2.0.5 after multiple attempts so I tried the latest head. It worked like a charm! Thanks everyone!

I look forward to the command line utility. I've notice a few drush commands but I assume they won't work now?