Im not sure if this is an Octopus issue directly or not but I will start here. When following the http://omega8.cc/import-your-sites-to-aegir-in-8-easy-steps-109 there is the step to use migrate to rename the site which is a good idea anyway to make sure that you will be able to migrate the site afterwards. However, I keep getting a PDOException due to a duplicate entry which results in a fail. It also leaves behind a new folder under the new domain name and a duplicate db. Here is the full log:

Log message
Task starts processing
Running: /data/disk/USER_/tools/drush/drush.php @mysite.example.com provision-migrate '@platform_mysite' '@test.mysite.example.com' --backend 2>&1
Bootstrap to phase 0.
Drush bootstrap phase : _drush_bootstrap_drush()
Load alias @mysite.example.com
Loading drushrc "/data/disk/USER_/static/mysite/sites/mysite.example.com/drushrc.php" into "site" scope.
Bootstrap to phase 1.
Drush bootstrap phase : _drush_bootstrap_drupal_root()
Loading drushrc "/data/disk/USER_/static/mysite/drushrc.php" into "drupal" scope.
Initialized Drupal 7.9 root directory at /data/disk/USER_/static/mysite
Found command: provision-migrate (commandfile=provision)
Initializing drush commandfile: drush_make
Initializing drush commandfile: drush_make_d_o
Initializing drush commandfile: provision
Load alias @server_master
Loading mysql driver for the db service
Loading nginx driver for the http service
Load alias @platform_mysite
Initializing drush commandfile: user
Including /data/disk/USER_/.drush/provision_civicrm/migrate.provision.inc
Including /data/disk/USER_/.drush/provision/db/migrate.provision.inc
Including /data/disk/USER_/.drush/provision/http/migrate.provision.inc
Including /data/disk/USER_/.drush/provision/platform/migrate.provision.inc
Drush bootstrap phase : _drush_bootstrap_drupal_site()
Initialized Drupal site mysite.example.com at sites/mysite.example.com
Loading drushrc "/data/disk/USER_/static/mysite/sites/mysite.example.com/drushrc.php" into "site" scope.
Putting site under maintenance
Template loaded: /data/disk/USER_/.drush/provision/platform/provision_drupal_settings.tpl.php
Changed permissions of /data/disk/USER_/static/mysite/sites/mysite.example.com/settings.php to 640
Generated config Drupal settings.php file
Changed permissions of /data/disk/USER_/static/mysite/sites/mysite.example.com/settings.php to 440
Change group ownership of /data/disk/USER_/static/mysite/sites/mysite.example.com/settings.php to www-data
Including /data/disk/USER_/.drush/provision/db/backup.provision.inc
Including /data/disk/USER_/.drush/provision/platform/backup.provision.inc
Drush bootstrap phase : _drush_bootstrap_drupal_configuration()
Adding sites directory to /data/disk/USER_/backups/mysite.example.com-20111129.151603.tar.gz
Deleted mysql dump from sites directory
Backed up site up to /data/disk/USER_/backups/mysite.example.com-20111129.151603.tar.gz.
Client backup directory for admin path /data/disk/USER_/clients/admin/backups exists.
Client backup directory for admin ownership of /data/disk/USER_/clients/admin/backups has been changed to USER_.
Client backup directory for admin permissions of /data/disk/USER_/clients/admin/backups have been changed to 750.
Client backup directory for admin path /data/disk/USER_/clients/admin/backups is writable.
Created symlink /data/disk/USER_/backups/mysite.example.com-20111129.151603.tar.gz to /data/disk/USER_/clients/admin/backups/mysite.example.com-20111129.151603.tar.gz
Running: /data/disk/USER_/tools/drush/drush.php --context_type='site' -... (Expand)
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_master
Loading mysql driver for the db service
Loading nginx driver for the http service
Load alias @platform_mysite
Initializing drush commandfile: user
Load alias @test.mysite.example.com
Template loaded: /data/disk/USER_/.drush/provision/provision_drushrc_alias.tpl.php
Generated config Drush configuration file
Changed permissions of /data/disk/USER_/.drush/test.mysite.example.com.alias.drushrc.php to 440
Command dispatch complete
Peak memory usage was 10.73 MB
Running: /data/disk/USER_/tools/drush/drush.php --old_uri='mysite.example.com' @test.mysite.example.com provision-deploy '/data/disk/USER_/backups/mysite.example.com-20111129.151603.tar.gz' --backend 2>&1
Bootstrap to phase 0.
Drush bootstrap phase : _drush_bootstrap_drush()
Load alias @test.mysite.example.com
Bootstrap to phase 1.
Drush bootstrap phase : _drush_bootstrap_drupal_root()
Loading drushrc "/data/disk/USER_/static/mysite/drushrc.php" into "drupal" scope.
Initialized Drupal 7.9 root directory at /data/disk/USER_/static/mysite
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_master
Loading mysql driver for the db service
Loading nginx driver for the http service
Load alias @platform_mysite
Initializing drush commandfile: user
Including /data/disk/USER_/.drush/provision/db/deploy.provision.inc
Including /data/disk/USER_/.drush/provision/http/deploy.provision.inc
Including /data/disk/USER_/.drush/provision/platform/deploy.provision.inc
Deploying site from /data/disk/USER_/backups/mysite.example.com-20111129.151603.tar.gz
Granting privileges to testmysiteexamplec@server.rdxt.com on testmysiteexamplec
Created testmysiteexamplec database
Running: gunzip -c /data/disk/USER_/backups/mysite.example.com-20111129.151603.tar.gz | tar pxf - in /data/disk/USER_/static/mysite/sites/test.mysite.example.com
Successfully extracted the contents of /data/disk/USER_/static/mysite/sites/test.mysite.example.com
Template loaded: /data/disk/USER_/.drush/provision/provision_drushrc_site.tpl.php
Changed permissions of /data/disk/USER_/static/mysite/sites/test.mysite.example.com/drushrc.php to 640
Generated config Site Drush configuration file
Changed permissions of /data/disk/USER_/static/mysite/sites/test.mysite.example.com/drushrc.php to 440
Drush bootstrap phase : _drush_bootstrap_drupal_site()
Initialized Drupal site test.mysite.example.com at sites/test.mysite.example.com
Loading drushrc "/data/disk/USER_/static/mysite/sites/test.mysite.example.com/drushrc.php" into "site" scope.
Template loaded: /data/disk/USER_/.drush/provision/platform/provision_drupal_settings.tpl.php
Changed permissions of /data/disk/USER_/static/mysite/sites/test.mysite.example.com/settings.php to 640
Generated config Drupal settings.php file
Changed permissions of /data/disk/USER_/static/mysite/sites/test.mysite.example.com/settings.php to 440
Change group ownership of /data/disk/USER_/static/mysite/sites/test.mysite.example.com/settings.php to www-data
Found database dump at /data/disk/USER_/static/mysite/sites/test.mysite.example.com/database.sql.
Database dump at /data/disk/USER_/static/mysite/sites/test.mysite.example.com/database.sql is readable
Importing database using command: mysql --defaults-file=/dev/fd/3 --force testmysiteexamplec
Template loaded: /data/disk/USER_/.drush/provision/platform/provision_drupal_sites.tpl.php
Generated config Drupal sites.php file
Changed permissions of /data/disk/USER_/static/mysite/sites/sites.php to 644
Changed permissions of sites/test.mysite.example.com to 755
Changed permissions of sites/test.mysite.example.com/themes to 2775
Changed permissions of sites/test.mysite.example.com/modules to 2775
Changed permissions of sites/test.mysite.example.com/libraries to 2775
Changed permissions of sites/test.mysite.example.com/files to 2770
Changed permissions of sites/test.mysite.example.com/files/tmp to 2770
Changed permissions of sites/test.mysite.example.com/files/images to 2770
Changed permissions of sites/test.mysite.example.com/files/pictures to 2770
Changed permissions of sites/test.mysite.example.com/files/css to 2770
Changed permissions of sites/test.mysite.example.com/files/js to 2770
Changed permissions of sites/test.mysite.example.com/files/advagg_css to 2770
Changed permissions of sites/test.mysite.example.com/files/advagg_js to 2770
Changed permissions of sites/test.mysite.example.com/files/ctools to 2770
Changed permissions of sites/test.mysite.example.com/files/imagecache to 2770
Changed permissions of sites/test.mysite.example.com/files/locations to 2770
Changed permissions of sites/test.mysite.example.com/files/xmlsitemap to 2770
Changed permissions of sites/test.mysite.example.com/files/deployment to 2770
Changed permissions of sites/test.mysite.example.com/private to 2770
Changed permissions of sites/test.mysite.example.com/private/files to 2770
Changed permissions of sites/test.mysite.example.com/private/temp to 2770
Changed permissions of sites/test.mysite.example.com/files/styles to 2770
Changed group ownership of sites/test.mysite.example.com/files/tmp to www-data
Changed group ownership of sites/test.mysite.example.com/files/images to www-data
Changed group ownership of sites/test.mysite.example.com/files/pictures to www-data
Changed group ownership of sites/test.mysite.example.com/files/css to www-data
Changed group ownership of sites/test.mysite.example.com/files/js to www-data
Changed group ownership of sites/test.mysite.example.com/files/advagg_css to www-data
Changed group ownership of sites/test.mysite.example.com/files/advagg_js to www-data
Changed group ownership of sites/test.mysite.example.com/files/ctools to www-data
Changed group ownership of sites/test.mysite.example.com/files/imagecache to www-data
Changed group ownership of sites/test.mysite.example.com/files/locations to www-data
Changed group ownership of sites/test.mysite.example.com/files/xmlsitemap to www-data
Changed group ownership of sites/test.mysite.example.com/files/deployment to www-data
Changed group ownership of sites/test.mysite.example.com/private to www-data
Changed group ownership of sites/test.mysite.example.com/private/files to www-data
Changed group ownership of sites/test.mysite.example.com/private/temp to www-data
Changed group ownership of sites/test.mysite.example.com/files/styles to www-data
Removed dump file /data/disk/USER_/static/mysite/sites/test.mysite.example.com/database.sql after restoring from it
Template loaded: /data/disk/USER_/.drush/provision/http/nginx/vhost.tpl.php
Generated config virtual host configuration file
nginx on server.rdxt.com has been restarted
Running: /data/disk/USER_/tools/drush/drush.php @test.mysite.example.com updatedb --backend 2>&1
Bootstrap to phase 0.
Drush bootstrap phase : _drush_bootstrap_drush()
Load alias @test.mysite.example.com
Loading drushrc "/data/disk/USER_/static/mysite/sites/test.mysite.example.com/drushrc.php" into "site" scope.
Bootstrap to phase 2.
Drush bootstrap phase : _drush_bootstrap_drupal_root()
Loading drushrc "/data/disk/USER_/static/mysite/drushrc.php" into "drupal" scope.
Initialized Drupal 7.9 root directory at /data/disk/USER_/static/mysite
Drush bootstrap phase : _drush_bootstrap_drupal_site()
Initialized Drupal site test.mysite.example.com at sites/test.mysite.example.com
Loading drushrc "/data/disk/USER_/static/mysite/sites/test.mysite.example.com/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_master
Loading mysql driver for the db service
Loading nginx driver for the http service
Load alias @platform_mysite
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 56.37 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/mysite.example.com to sites/test.mysite.example.com
Found install profile standard
Found install profile testing
Found install profile minimal
Found 121 modules
Found 7 themes
Cleared all caches
Rebuilt node type cache
WD registry: PDOException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'FeedsCSVParser-class' for key 'PRIMARY': INSERT INTO {registry} (name, type, filename, module, weight) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4); Array ( [:db_insert_placeholder_0] => FeedsCSVParser [:db_insert_placeholder_1] => class [:db_insert_placeholder_2] => sites/test.mysite.example.com/modules/feeds/plugins/FeedsCSVParser.inc [:db_insert_placeholder_3] => feeds [:db_insert_placeholder_4] => 0 ) in _registry_parse_file() (line 179 of /data/disk/USER_/static/mysite/includes/registry.inc).
WD php: PDOException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'FeedsCSVParser-class' for key 'PRIMARY': INSERT INTO {registry} (name, type, filename, module, weight) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4); Array ( [:db_insert_placeholder_0] => FeedsCSVParser [:db_insert_placeholder_1] => class [:db_insert_placeholder_2] => sites/test.mysite.example.com/modules/feeds/plugins/FeedsCSVParser.inc [:db_insert_placeholder_3] => feeds [:db_insert_placeholder_4] => 0 ) in _registry_parse_file() (line 179 of /data/disk/USER_/static/mysite/includes/registry.inc).
Drush command terminated abnormally due to an unrecoverable error.
Running: /data/disk/USER_/tools/drush/drush.php --platform='@platform_mysite' provision-save '@mysite.example.com' --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_master
Loading mysql driver for the db service
Loading nginx driver for the http service
Initializing drush commandfile: user
Load alias @mysite.example.com
Loading drushrc "/data/disk/USER_/static/mysite/sites/mysite.example.com/drushrc.php" into "site" scope.
Load alias @platform_mysite
Template loaded: /data/disk/USER_/.drush/provision/provision_drushrc_alias.tpl.php
Changed permissions of /data/disk/USER_/.drush/mysite.example.com.alias.drushrc.php to 640
Generated config Drush configuration file
Changed permissions of /data/disk/USER_/.drush/mysite.example.com.alias.drushrc.php to 440
Command dispatch complete
Peak memory usage was 12.25 MB
Changes made in drush_provision_drupal_provision_migrate have been rolled back.
Bringing site out of maintenance
Template loaded: /data/disk/USER_/.drush/provision/platform/provision_drupal_settings.tpl.php
Changed permissions of /data/disk/USER_/static/mysite/sites/mysite.example.com/settings.php to 640
Generated config Drupal settings.php file
Changed permissions of /data/disk/USER_/static/mysite/sites/mysite.example.com/settings.php to 440
Change group ownership of /data/disk/USER_/static/mysite/sites/mysite.example.com/settings.php to www-data
Removed unused migration site package
Template loaded: /data/disk/USER_/.drush/provision/http/nginx/vhost.tpl.php
Generated config virtual host configuration file
nginx on server.rdxt.com has been restarted
Changes made in drush_provision_drupal_pre_provision_migrate have been rolled back.
Template loaded: /data/disk/USER_/.drush/provision/http/nginx/vhost.tpl.php
Generated config virtual host configuration file
Changes made in drush_http_pre_provision_migrate have been rolled back.
Command dispatch complete
Peak memory usage was 18.09 MB
Command dispatch complete
Peak memory usage was 28.56 MB

Comments

omega8cc’s picture

Category: bug » support
Status: Active » Closed (works as designed)

This is not BOA or Aegir issue at all.

Aegir is designed to fail when something like that happens.

You need to fix your database by removing duplicate keys before you will be able to manage this site with Aegir, and it is not really Aegir, but Drupal (and database integrity) requirement.

7wonders’s picture

Thanks. I fixed it by copying the table through chive and then truncating the original table followed by re-importing the copy. I think its because I did a direct db dump instead of using backup_migrate.

juampynr’s picture

corentin’s picture

Hi 7wonders, Did you really got this fixed ? If so could detail what you did exactly ? thanks cx

juampynr’s picture