I can't seem to import a remote site. The 'importing a site' wizard seems to work fine, retrieving a listing of remote sites, and prompting for the local platform on which to import the site. However, the 'Import remote site' task itself fails. I've included the entire task log below. I don't really know where to start debugging this. Any help is greatly appreciated.

Log message
Task starts processing
Running: /usr/share/drush/drush.php @server_prodo8local provision-remote_import --backend 2>&1
The external command could not be executed due to an application error.
Bootstrap to phase 0.
Drush bootstrap phase : _drush_bootstrap_drush()
Load alias @server_prodo8local
Bootstrap to phase 0.
Found command: provision-remote_import (commandfile=remote_import)
Initializing drush commandfile: drush_make
Initializing drush commandfile: drush_make_d_o
Initializing drush commandfile: provision
Load alias @server_master
Loading apache driver for the http service
Loading hostmaster driver for the remote_import service
Initializing drush commandfile: user
Running: ssh -o PasswordAuthentication=no 'aegir'@'prod.o8.local' 'drush @test.o8.local '\''provision-backup'\'' --backend 2>&1' 2>&1
Bootstrap to phase 0.
Drush bootstrap phase : _drush_bootstrap_drush()
Load alias @test.o8.local
Loading drushrc "/var/aegir/platforms/drupal-7.14/sites/test.o8.local/drushrc.php" into "site" scope.
Bootstrap to phase 1.
Drush bootstrap phase : _drush_bootstrap_drupal_root()
Loading drushrc "/var/aegir/platforms/drupal-7.14/drushrc.php" into "drupal" scope.
Initialized Drupal 7.14 root directory at /var/aegir/platforms/drupal-7.14
Found command: provision-backup (commandfile=provision)
Initializing drush commandfile: drush_make
Initializing drush commandfile: drush_make_d_o
Initializing drush commandfile: provision
Load alias @server_localhost
Load alias @server_master
Loading apache driver for the http service
Loading mysql driver for the db service
Load alias @platform_drupal714
Initializing drush commandfile: user
Including /usr/share/drush/commands/provision/db/backup.provision.inc
Including /usr/share/drush/commands/provision/platform/backup.provision.inc
Drush bootstrap phase : _drush_bootstrap_drupal_site()
Initialized Drupal site test.o8.local at sites/test.o8.local
Loading drushrc "/var/aegir/platforms/drupal-7.14/sites/test.o8.local/drushrc.php" into "site" scope.
Drush bootstrap phase : _drush_bootstrap_drupal_configuration()
Adding sites directory to /var/aegir/backups/test.o8.local-20120627.163044.tar.gz
Temporarily uncloaking database credentials for backup
Template loaded: /usr/share/drush/commands/provision/platform/provision_drupal_settings.tpl.php
Changed permissions of /var/aegir/platforms/drupal-7.14/sites/test.o8.local/settings.php to 640
Generated config Drupal settings.php file
Changed permissions of /var/aegir/platforms/drupal-7.14/sites/test.o8.local/settings.php to 440
Change group ownership of /var/aegir/platforms/drupal-7.14/sites/test.o8.local/settings.php to www-data
Re-cloaking database credentials after backup
Template loaded: /usr/share/drush/commands/provision/platform/provision_drupal_settings.tpl.php
Changed permissions of /var/aegir/platforms/drupal-7.14/sites/test.o8.local/settings.php to 640
Generated config Drupal settings.php file
Changed permissions of /var/aegir/platforms/drupal-7.14/sites/test.o8.local/settings.php to 440
Change group ownership of /var/aegir/platforms/drupal-7.14/sites/test.o8.local/settings.php to www-data
Deleted mysql dump from sites directory
Backed up site up to /var/aegir/backups/test.o8.local-20120627.163044.tar.gz.
Client backup directory for admin path /var/aegir/clients/admin/backups exists.
Client backup directory for admin ownership of /var/aegir/clients/admin/backups has been changed to aegir.
Client backup directory for admin permissions of /var/aegir/clients/admin/backups have been changed to 750.
Client backup directory for admin path /var/aegir/clients/admin/backups is writable.
Created symlink /var/aegir/clients/admin/backups/test.o8.local-20120627.163044.tar.gz to /var/aegir/backups/test.o8.local-20120627.163044.tar.gz
Template loaded: /usr/share/drush/commands/provision/provision_drushrc_site.tpl.php
Changed permissions of /var/aegir/platforms/drupal-7.14/sites/test.o8.local/drushrc.php to 640
Generated config Site Drush configuration file
Changed permissions of /var/aegir/platforms/drupal-7.14/sites/test.o8.local/drushrc.php to 440
Command dispatch complete
Peak memory usage was 14.09 MB
Load alias @hostmaster
Loading drushrc "/var/aegir/hostmaster-6.x-1.9/sites/dev.o8.local/drushrc.php" into "site" scope.
Could not find provision alias named: server_localhost
Trying to get property of non-object db.drush.inc:45
Could not find provision alias named: platform_drupal714
Drush command terminated abnormally due to an unrecoverable error. Error: Call to a member function get_services() on a non-object in /usr/share/drush/commands/provision/provision.context.inc, line 395
Output from failed command : Fatal error: Call to a member function get_services() on a non-object in /usr/share/drush/commands/provision/provision.context.inc on line 395
Command dispatch complete
Peak memory usage was 26.41 MB
CommentFileSizeAuthor
#11 hardcode_backup_path.patch784 bytesergonlogic
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

ergonlogic’s picture

I believe this is the line that's failing for me: http://drupalcode.org/project/remote_import.git/blob/refs/heads/6.x-1.x:...

ergonlogic’s picture

In fact, just loading the @hostmaster context causes this failure:

...
$hostmaster_context = d('@hostmaster');
 //$local_file = d('@hostmaster')->platform->server->backup_path . '/' . basename($remote_backup_file);
...
ergonlogic’s picture

A bit more debugging:

In provision_context_factory(), called for "@hostmaster", drush_get_context('stdin') returns:

  array(
    'old_url' => 'test.o8.local',
    'new_url' => 'test4.o8.local',
    'platform' => 'platform_drupalonprod',
    'db_server' => 'server_localhost',
    'root' => NULL,
    'uri' => NULL,
 )

... but re-writing platform & db_server to add '@' doesn't appear to help any. :-/

ergonlogic’s picture

While not fixing the underlying problem, a working solution (for a standard Aegir setup, at least) is to just hardcode the backup directory:

    $local_file = '/var/aegir/backups/' . basename($remote_backup_file);

It now imports the site successfully, though it still throws some (apparently harmless) warnings towards the bottom:

Task starts processing
Running: /usr/share/drush/drush.php @server_devo8local provision-remote_import --backend 2>&1
Bootstrap to phase 0.
Drush bootstrap phase : _drush_bootstrap_drush()
Load alias @server_devo8local
Bootstrap to phase 0.
Found command: provision-remote_import (commandfile=remote_import)
Initializing drush commandfile: drush_make
Initializing drush commandfile: drush_make_d_o
Initializing drush commandfile: provision
Load alias @server_master
Loading apache driver for the http service
Loading hostmaster driver for the remote_import service
Initializing drush commandfile: user
Running: ssh -o PasswordAuthentication=no 'aegir'@'dev.o8.local' 'drush @test.o8.local '\''provision-backup'\'' --backend 2>&1' 2>&1
Bootstrap to phase 0.
Drush bootstrap phase : _drush_bootstrap_drush()
Load alias @test.o8.local
Loading drushrc "/var/aegir/platforms/drupal-on-dev/sites/test.o8.local/drushrc.php" into "site" scope.
Bootstrap to phase 1.
Drush bootstrap phase : _drush_bootstrap_drupal_root()
Loading drushrc "/var/aegir/platforms/drupal-on-dev/drushrc.php" into "drupal" scope.
Initialized Drupal 7.14 root directory at /var/aegir/platforms/drupal-on-dev
Found command: provision-backup (commandfile=provision)
Initializing drush commandfile: drush_make
Initializing drush commandfile: drush_make_d_o
Initializing drush commandfile: provision
Load alias @server_localhost
Load alias @server_master
Loading apache driver for the http service
Loading mysql driver for the db service
Load alias @platform_drupalondev
Initializing drush commandfile: user
Including /usr/share/drush/commands/provision/db/backup.provision.inc
Including /usr/share/drush/commands/provision/platform/backup.provision.inc
Drush bootstrap phase : _drush_bootstrap_drupal_site()
Initialized Drupal site test.o8.local at sites/test.o8.local
Loading drushrc "/var/aegir/platforms/drupal-on-dev/sites/test.o8.local/drushrc.php" into "site" scope.
Drush bootstrap phase : _drush_bootstrap_drupal_configuration()
Adding sites directory to /var/aegir/backups/test.o8.local-20120712.180229.tar.gz
Temporarily uncloaking database credentials for backup
Template loaded: /usr/share/drush/commands/provision/platform/provision_drupal_settings.tpl.php
Changed permissions of /var/aegir/platforms/drupal-on-dev/sites/test.o8.local/settings.php to 640
Generated config Drupal settings.php file
Changed permissions of /var/aegir/platforms/drupal-on-dev/sites/test.o8.local/settings.php to 440
Change group ownership of /var/aegir/platforms/drupal-on-dev/sites/test.o8.local/settings.php to www-data
Re-cloaking database credentials after backup
Template loaded: /usr/share/drush/commands/provision/platform/provision_drupal_settings.tpl.php
Changed permissions of /var/aegir/platforms/drupal-on-dev/sites/test.o8.local/settings.php to 640
Generated config Drupal settings.php file
Changed permissions of /var/aegir/platforms/drupal-on-dev/sites/test.o8.local/settings.php to 440
Change group ownership of /var/aegir/platforms/drupal-on-dev/sites/test.o8.local/settings.php to www-data
Deleted mysql dump from sites directory
Backed up site up to /var/aegir/backups/test.o8.local-20120712.180229.tar.gz.
Client backup directory for admin path /var/aegir/clients/admin/backups exists.
Client backup directory for admin ownership of /var/aegir/clients/admin/backups has been changed to aegir.
Client backup directory for admin permissions of /var/aegir/clients/admin/backups have been changed to 750.
Client backup directory for admin path /var/aegir/clients/admin/backups is writable.
Created symlink /var/aegir/clients/admin/backups/test.o8.local-20120712.180229.tar.gz to /var/aegir/backups/test.o8.local-20120712.180229.tar.gz
Template loaded: /usr/share/drush/commands/provision/provision_drushrc_site.tpl.php
Changed permissions of /var/aegir/platforms/drupal-on-dev/sites/test.o8.local/drushrc.php to 640
Generated config Site Drush configuration file
Changed permissions of /var/aegir/platforms/drupal-on-dev/sites/test.o8.local/drushrc.php to 440
Command dispatch complete
Peak memory usage was 14.08 MB
/var/aegir/backups/test.o8.local-20120712.180229.tar.gz has been fetched from remote server dev.o8.local.
Running: ssh -o PasswordAuthentication=no 'aegir'@'dev.o8.local' 'drush provision-backup_delete '\''/var/aegir/backups/test.o8.local-20120712.180229.tar.gz'\'' --backend 2>&1' 2>&1
Bootstrap to phase 0.
Drush bootstrap phase : _drush_bootstrap_drush()
Bootstrap to phase 0.
Found command: provision-backup_delete (commandfile=provision)
Initializing drush commandfile: drush_make
Initializing drush commandfile: drush_make_d_o
Initializing drush commandfile: provision
Load alias @self
Load alias @server_master
Loading apache driver for the http service
Initializing drush commandfile: user
Including /usr/share/drush/commands/provision/platform/backup_delete.provision.inc
Removed backup file /var/aegir/backups/test.o8.local-20120712.180229.tar.gz
Command dispatch complete
Peak memory usage was 10.59 MB
Load alias @platform_drupalonprod
Running: ssh -o PasswordAuthentication=no 'aegir'@'dev.o8.local' 'drush @test.o8.local '\''php-eval'\'' '\''drush_backend_set_result(d()->options);'\'' --backend 2>&1' 2>&1
Bootstrap to phase 0.
Drush bootstrap phase : _drush_bootstrap_drush()
Load alias @test.o8.local
Loading drushrc "/var/aegir/platforms/drupal-on-dev/sites/test.o8.local/drushrc.php" into "site" scope.
Drush bootstrap phase : _drush_bootstrap_drupal_root()
Loading drushrc "/var/aegir/platforms/drupal-on-dev/drushrc.php" into "drupal" scope.
Initialized Drupal 7.14 root directory at /var/aegir/platforms/drupal-on-dev
Drush bootstrap phase : _drush_bootstrap_drupal_site()
Initialized Drupal site test.o8.local at sites/test.o8.local
Loading drushrc "/var/aegir/platforms/drupal-on-dev/sites/test.o8.local/drushrc.php" into "site" scope.
Drush bootstrap phase : _drush_bootstrap_drupal_configuration()
Drush bootstrap phase : _drush_bootstrap_drupal_database()
Successfully connected to the Drupal database.
Drush bootstrap phase : _drush_bootstrap_drupal_full()
Drush bootstrap phase : _drush_bootstrap_drupal_login()
Successfully logged into Drupal as Anonymous (uid=0)
Found command: php-eval (commandfile=core)
Initializing drush commandfile: drush_make
Initializing drush commandfile: drush_make_d_o
Initializing drush commandfile: provision
Load alias @server_localhost
Load alias @server_master
Loading apache driver for the http service
Loading mysql driver for the db service
Load alias @platform_drupalondev
Initializing drush commandfile: user
Command dispatch complete
Peak memory usage was 31.99 MB
Running: /usr/share/drush/drush.php --context_type='site' --uri='test4.o8.local' --platform='@platform_drupalonprod' --root='/var/aegir/platforms/drupal-on-prod' --db_server='@server_localhost' --profile='standard' --language='en' provision-save '@test4.o8.local' --backend 2>&1
Bootstrap to phase 0.
Drush bootstrap phase : _drush_bootstrap_drush()
Bootstrap to phase 0.
Found command: provision-save (commandfile=provision)
Initializing drush commandfile: drush_make
Initializing drush commandfile: drush_make_d_o
Initializing drush commandfile: provision
Load alias @self
Load alias @server_localhost
Load alias @server_master
Loading apache driver for the http service
Loading mysql driver for the db service
Load alias @platform_drupalonprod
Initializing drush commandfile: user
Load alias @test4.o8.local
Template loaded: /usr/share/drush/commands/provision/provision_drushrc_alias.tpl.php
Generated config Drush configuration file
Changed permissions of /var/aegir/.drush/test4.o8.local.alias.drushrc.php to 440
Command dispatch complete
Peak memory usage was 10.81 MB
Running: /usr/share/drush/drush.php --old_uri='test.o8.local' @test4.o8.local provision-deploy '/var/aegir/backups/test.o8.local-20120712.180229.tar.gz' --backend 2>&1
Bootstrap to phase 0.
Drush bootstrap phase : _drush_bootstrap_drush()
Load alias @test4.o8.local
Bootstrap to phase 1.
Drush bootstrap phase : _drush_bootstrap_drupal_root()
Loading drushrc "/var/aegir/platforms/drupal-on-prod/drushrc.php" into "drupal" scope.
Initialized Drupal 7.14 root directory at /var/aegir/platforms/drupal-on-prod
Found command: provision-deploy (commandfile=provision)
Initializing drush commandfile: drush_make
Initializing drush commandfile: drush_make_d_o
Initializing drush commandfile: provision
Load alias @server_localhost
Load alias @server_master
Loading apache driver for the http service
Loading mysql driver for the db service
Load alias @platform_drupalonprod
Initializing drush commandfile: user
Including /usr/share/drush/commands/provision/db/deploy.provision.inc
Including /usr/share/drush/commands/provision/http/deploy.provision.inc
Including /usr/share/drush/commands/provision/platform/deploy.provision.inc
Deploying site from /var/aegir/backups/test.o8.local-20120712.180229.tar.gz
Undefined index: pass db.drush.inc:365
Undefined index: pass db.drush.inc:365
Granting privileges to test4o8local@localhost on test4o8local
Undefined index: pass db.drush.inc:365
Created test4o8local database
Running: gunzip -c /var/aegir/backups/test.o8.local-20120712.180229.tar.gz | tar pxf - in /var/aegir/platforms/drupal-on-prod/sites/test4.o8.local
Successfully extracted the contents of /var/aegir/platforms/drupal-on-prod/sites/test4.o8.local
Changed group ownership of files in /var/aegir/platforms/drupal-on-prod/sites/test4.o8.local/files to www-data
Template loaded: /usr/share/drush/commands/provision/provision_drushrc_site.tpl.php
Changed permissions of /var/aegir/platforms/drupal-on-prod/sites/test4.o8.local/drushrc.php to 640
Generated config Site Drush configuration file
Changed permissions of /var/aegir/platforms/drupal-on-prod/sites/test4.o8.local/drushrc.php to 440
Drush bootstrap phase : _drush_bootstrap_drupal_site()
Initialized Drupal site test4.o8.local at sites/test4.o8.local
Loading drushrc "/var/aegir/platforms/drupal-on-prod/sites/test4.o8.local/drushrc.php" into "site" scope.
Template loaded: /usr/share/drush/commands/provision/platform/provision_drupal_settings.tpl.php
Changed permissions of /var/aegir/platforms/drupal-on-prod/sites/test4.o8.local/settings.php to 640
Generated config Drupal settings.php file
Changed permissions of /var/aegir/platforms/drupal-on-prod/sites/test4.o8.local/settings.php to 440
Change group ownership of /var/aegir/platforms/drupal-on-prod/sites/test4.o8.local/settings.php to www-data
Found database dump at /var/aegir/platforms/drupal-on-prod/sites/test4.o8.local/database.sql.
Database dump at /var/aegir/platforms/drupal-on-prod/sites/test4.o8.local/database.sql is readable
Importing database using command: mysql --defaults-file=/dev/fd/3 test4o8local
Template loaded: /usr/share/drush/commands/provision/platform/provision_drupal_sites.tpl.php
Generated config Drupal sites.php file
Changed permissions of /var/aegir/platforms/drupal-on-prod/sites/sites.php to 644
Changed permissions of sites/test4.o8.local to 755
Changed permissions of sites/test4.o8.local/themes to 2775
Changed permissions of sites/test4.o8.local/modules to 2775
Changed permissions of sites/test4.o8.local/libraries to 2775
Changed permissions of sites/test4.o8.local/files to 2770
Changed permissions of sites/test4.o8.local/files/tmp to 2770
Changed permissions of sites/test4.o8.local/files/images to 2770
Changed permissions of sites/test4.o8.local/files/pictures to 2770
Changed permissions of sites/test4.o8.local/files/css to 2770
Changed permissions of sites/test4.o8.local/files/js to 2770
Changed permissions of sites/test4.o8.local/files/ctools to 2770
Changed permissions of sites/test4.o8.local/files/imagecache to 2770
Changed permissions of sites/test4.o8.local/files/locations to 2770
Changed permissions of sites/test4.o8.local/private to 2770
Changed permissions of sites/test4.o8.local/private/files to 2770
Changed permissions of sites/test4.o8.local/private/temp to 2770
Changed group ownership of sites/test4.o8.local/files to www-data
Changed group ownership of sites/test4.o8.local/files/tmp to www-data
Changed group ownership of sites/test4.o8.local/files/images to www-data
Changed group ownership of sites/test4.o8.local/files/pictures to www-data
Changed group ownership of sites/test4.o8.local/files/css to www-data
Changed group ownership of sites/test4.o8.local/files/js to www-data
Changed group ownership of sites/test4.o8.local/files/ctools to www-data
Changed group ownership of sites/test4.o8.local/files/imagecache to www-data
Changed group ownership of sites/test4.o8.local/files/locations to www-data
Changed group ownership of sites/test4.o8.local/private to www-data
Changed group ownership of sites/test4.o8.local/private/files to www-data
Changed group ownership of sites/test4.o8.local/private/temp to www-data
Removed dump file /var/aegir/platforms/drupal-on-prod/sites/test4.o8.local/database.sql after restoring from it
Template loaded: /usr/share/drush/commands/provision/http/apache/vhost.tpl.php
Generated config virtual host configuration file
apache on prod has been restarted
Running: /usr/share/drush/drush.php @test4.o8.local updatedb --backend 2>&1
Bootstrap to phase 0.
Drush bootstrap phase : _drush_bootstrap_drush()
Load alias @test4.o8.local
Loading drushrc "/var/aegir/platforms/drupal-on-prod/sites/test4.o8.local/drushrc.php" into "site" scope.
Bootstrap to phase 2.
Drush bootstrap phase : _drush_bootstrap_drupal_root()
Loading drushrc "/var/aegir/platforms/drupal-on-prod/drushrc.php" into "drupal" scope.
Initialized Drupal 7.14 root directory at /var/aegir/platforms/drupal-on-prod
Drush bootstrap phase : _drush_bootstrap_drupal_site()
Initialized Drupal site test4.o8.local at sites/test4.o8.local
Loading drushrc "/var/aegir/platforms/drupal-on-prod/sites/test4.o8.local/drushrc.php" into "site" scope.
Found command: updatedb (commandfile=core)
Initializing drush commandfile: drush_make
Initializing drush commandfile: drush_make_d_o
Initializing drush commandfile: provision
Load alias @server_localhost
Load alias @server_master
Loading apache driver for the http service
Loading mysql driver for the db service
Load alias @platform_drupalonprod
Initializing drush commandfile: user
Drush bootstrap phase : _drush_bootstrap_drupal_configuration()
Drush bootstrap phase : _drush_bootstrap_drupal_database()
Successfully connected to the Drupal database.
Drush bootstrap phase : _drush_bootstrap_drupal_full()
No database updates required
Finished performing updates.
Command dispatch complete
Peak memory usage was 36.96 MB
Drush bootstrap phase : _drush_bootstrap_drupal_configuration()
Drush bootstrap phase : _drush_bootstrap_drupal_database()
Successfully connected to the Drupal database.
Drush bootstrap phase : _drush_bootstrap_drupal_full()
Changed paths from sites/test4.o8.local to sites/test4.o8.local
Found install profile testing
Found install profile standard
Found install profile minimal
Found 104 modules
Found 4 themes
Cleared all caches
Rebuilt node type cache
Rebuilt code registry
Rebuilt theme cache
Rebuilt menu cache
Command dispatch complete
Peak memory usage was 41 MB
Running: /usr/share/drush/drush.php @test4.o8.local provision-verify --backend 2>&1
Bootstrap to phase 0.
Drush bootstrap phase : _drush_bootstrap_drush()
Load alias @test4.o8.local
Loading drushrc "/var/aegir/platforms/drupal-on-prod/sites/test4.o8.local/drushrc.php" into "site" scope.
Bootstrap to phase 0.
Found command: provision-verify (commandfile=provision)
Initializing drush commandfile: drush_make
Initializing drush commandfile: drush_make_d_o
Initializing drush commandfile: provision
Load alias @server_localhost
Load alias @server_master
Loading apache driver for the http service
Loading mysql driver for the db service
Load alias @platform_drupalonprod
Initializing drush commandfile: user
Including /usr/share/drush/commands/provision/dns/verify.provision.inc
Including /usr/share/drush/commands/provision/platform/backupmigrate/verify.provision.inc
Including /usr/share/drush/commands/provision/platform/verify.provision.inc
Drush bootstrap phase : _drush_bootstrap_drupal_root()
Loading drushrc "/var/aegir/platforms/drupal-on-prod/drushrc.php" into "drupal" scope.
Initialized Drupal 7.14 root directory at /var/aegir/platforms/drupal-on-prod
Drush bootstrap phase : _drush_bootstrap_drupal_site()
Initialized Drupal site test4.o8.local at sites/test4.o8.local
Loading drushrc "/var/aegir/platforms/drupal-on-prod/sites/test4.o8.local/drushrc.php" into "site" scope.
Template loaded: /usr/share/drush/commands/provision/platform/provision_drupal_settings.tpl.php
Changed permissions of /var/aegir/platforms/drupal-on-prod/sites/test4.o8.local/settings.php to 640
Generated config Drupal settings.php file
Changed permissions of /var/aegir/platforms/drupal-on-prod/sites/test4.o8.local/settings.php to 440
Change group ownership of /var/aegir/platforms/drupal-on-prod/sites/test4.o8.local/settings.php to www-data
Drush bootstrap phase : _drush_bootstrap_drupal_configuration()
Drush bootstrap phase : _drush_bootstrap_drupal_database()
Successfully connected to the Drupal database.
Drush bootstrap phase : _drush_bootstrap_drupal_full()
Found install profile testing
Found install profile standard
Found install profile minimal
Found 104 modules
Found 4 themes
Changed permissions of sites/test4.o8.local to 755
Changed permissions of sites/test4.o8.local/themes to 2775
Changed permissions of sites/test4.o8.local/modules to 2775
Changed permissions of sites/test4.o8.local/libraries to 2775
Changed permissions of sites/test4.o8.local/files to 2770
Changed permissions of sites/test4.o8.local/files/tmp to 2770
Changed permissions of sites/test4.o8.local/files/images to 2770
Changed permissions of sites/test4.o8.local/files/pictures to 2770
Changed permissions of sites/test4.o8.local/files/css to 2770
Changed permissions of sites/test4.o8.local/files/js to 2770
Changed permissions of sites/test4.o8.local/files/ctools to 2770
Changed permissions of sites/test4.o8.local/files/imagecache to 2770
Changed permissions of sites/test4.o8.local/files/locations to 2770
Changed permissions of sites/test4.o8.local/private to 2770
Changed permissions of sites/test4.o8.local/private/files to 2770
Changed permissions of sites/test4.o8.local/private/temp to 2770
Changed group ownership of sites/test4.o8.local/files to www-data
Changed group ownership of sites/test4.o8.local/files/tmp to www-data
Changed group ownership of sites/test4.o8.local/files/images to www-data
Changed group ownership of sites/test4.o8.local/files/pictures to www-data
Changed group ownership of sites/test4.o8.local/files/css to www-data
Changed group ownership of sites/test4.o8.local/files/js to www-data
Changed group ownership of sites/test4.o8.local/files/ctools to www-data
Changed group ownership of sites/test4.o8.local/files/imagecache to www-data
Changed group ownership of sites/test4.o8.local/files/locations to www-data
Changed group ownership of sites/test4.o8.local/private to www-data
Changed group ownership of sites/test4.o8.local/private/files to www-data
Changed group ownership of sites/test4.o8.local/private/temp to www-data
Template loaded: /usr/share/drush/commands/provision/platform/provision_drupal_sites.tpl.php
Generated config Drupal sites.php file
Changed permissions of /var/aegir/platforms/drupal-on-prod/sites/sites.php to 644
Template loaded: /usr/share/drush/commands/provision/platform/provision_drupal_settings.tpl.php
Changed permissions of /var/aegir/platforms/drupal-on-prod/sites/test4.o8.local/settings.php to 640
Generated config Drupal settings.php file
Changed permissions of /var/aegir/platforms/drupal-on-prod/sites/test4.o8.local/settings.php to 440
Change group ownership of /var/aegir/platforms/drupal-on-prod/sites/test4.o8.local/settings.php to www-data
Template loaded: /usr/share/drush/commands/provision/http/apache/vhost.tpl.php
Generated config virtual host configuration file
apache on prod has been restarted
Cleared all caches
Rebuilt node type cache
Rebuilt code registry
Rebuilt theme cache
Rebuilt menu cache
Template loaded: /usr/share/drush/commands/provision/provision_drushrc_site.tpl.php
Changed permissions of /var/aegir/platforms/drupal-on-prod/sites/test4.o8.local/drushrc.php to 640
Generated config Site Drush configuration file
Changed permissions of /var/aegir/platforms/drupal-on-prod/sites/test4.o8.local/drushrc.php to 440
Command dispatch complete
Peak memory usage was 40.92 MB
Running: /usr/share/drush/drush.php --remote_import_import @hostmaster hosting-import '@test4.o8.local' --backend 2>&1
Bootstrap to phase 0.
Drush bootstrap phase : _drush_bootstrap_drush()
Load alias @hostmaster
Loading drushrc "/var/aegir/hostmaster-6.x-1.9/sites/prod.o8.local/drushrc.php" into "site" scope.
Bootstrap to phase 5.
Drush bootstrap phase : _drush_bootstrap_drupal_root()
Loading drushrc "/var/aegir/hostmaster-6.x-1.9/drushrc.php" into "drupal" scope.
Initialized Drupal 6.26 root directory at /var/aegir/hostmaster-6.x-1.9
Drush bootstrap phase : _drush_bootstrap_drupal_site()
Initialized Drupal site prod.o8.local at sites/prod.o8.local
Loading drushrc "/var/aegir/hostmaster-6.x-1.9/sites/prod.o8.local/drushrc.php" into "site" scope.
Drush bootstrap phase : _drush_bootstrap_drupal_configuration()
Drush bootstrap phase : _drush_bootstrap_drupal_database()
Successfully connected to the Drupal database.
Drush bootstrap phase : _drush_bootstrap_drupal_full()
Bootstrap to phase 5.
Found command: hosting-import (commandfile=hosting)
Initializing drush commandfile: drush_make
Initializing drush commandfile: drush_make_d_o
Initializing drush commandfile: provision
Load alias @server_localhost
Load alias @server_master
Loading apache driver for the http service
Loading mysql driver for the db service
Load alias @platform_hostmaster
Initializing drush commandfile: user
Load alias @test4.o8.local
Loading drushrc "/var/aegir/platforms/drupal-on-prod/sites/test4.o8.local/drushrc.php" into "site" scope.
Load alias @platform_drupalonprod
Importing @test4.o8.local
Context @server_localhost already has an associated node. Updating server node 4 instead.
Context hosting_site has been imported. Updated server node 4.
Context @platform_drupalonprod already has an associated node. Updating platform node 83 instead.
Context @server_master already has an associated node. Updating server node 2 instead.
Context hosting_site has been imported. Updated server node 2.
Context hosting_site has been imported. Updated platform node 83.
Undefined variable: platform hosting_site.drush.inc:31
Trying to get property of non-object hosting_site.drush.inc:39
Undefined property: stdClass::$uid hosting.module:192
Undefined property: stdClass::$ip_addresses hosting.ip.inc:43
Undefined property: stdClass::$site_status hosting_site.nodeapi.inc:153
Undefined property: stdClass::$verified hosting_site.nodeapi.inc:153
Context hosting_site has been imported. Updated site node 168.
Command dispatch complete
Peak memory usage was 25.56 MB
Command dispatch complete
Peak memory usage was 13.68 MB
Command dispatch complete
Peak memory usage was 26.39 MB
ergonlogic’s picture

Status: Active » Needs work

Anarcat and I worked on debugging this, and while we think we've discovered the cause of the problem, we haven't yet found a proper solution. It appears that when Aegir prepares to deploy the backed-up site, that it inherits the remote @hostmaster context. We renamed the importer's server_localhost server (with all the manual edits that entails), and saw that it continued to try and load that alias.

Since we've begun to deploy this on Koumbit's AegirVPSs I started a sandbox project to host the work-around fix mentioned in the previous comment.

omega8cc’s picture

Version: » 6.x-1.x-dev

Make sure that you have remote_import extension only on the target server, or weird things will happen if you have it on both source and target.

lsolesen’s picture

cafuego’s picture

Make sure that you have remote_import extension only on the target server

I'm hitting the same problem on a local-only installation, when attempting to migrate a site from D6 to D7.

cafuego’s picture

So in my case this seems to have been caused by my typoing the platform alias. Perhaps an early check to validate aliases would be a good thing to have ;-)

omega8cc’s picture

Status: Needs work » Closed (works as designed)
ergonlogic’s picture

Status: Closed (works as designed) » Needs work
FileSize
784 bytes

I just tested this on a stock Aegir 1.9 server, installed from the .debs, and with remote_import only on the target server. The same issue occurs.

I've attached a patch that hardcodes the backup path, as described in #4. Obviously this isn't a permanent solution, but at least this'll get it working.

ergonlogic’s picture

I wonder if d('@hostmaster') isn't hitting a cached value from provision_sitealias_get_record(), or maybe just $instances directly in d(). Perhaps we need to add an $invalidate_cache parameter?

ergonlogic’s picture

Version: 6.x-1.x-dev » 6.x-2.x-dev
Status: Needs work » Closed (won't fix)

This appears to work in 6.x-2.x. The patch in #11 will have to suffice for 6.x-1.x.