Drupal 10, the latest version of the open-source digital experience platform with even more features, is here.Here are some notes on recent upgrades I've done using the .debs, and some of the challenges I've faced. Note that the more difficult ones are not vanilla Aegir installs, but have a custom makefile, or Aegir1-style Provision extensions that had to live *in* the 'provision' directory (remote_import). I'm marking this as a 'support request' for the time-being, as at least one of these is due to human error. Also, we may want to move it to the 'Documentation' component at some point...
The hardest one to recover from involved using a custom makefile. Now unfortunately, the way we'd built this makefile was to include aegir.make via raw git output. Unfortunately, it pointed to the 6.x-1.x branch of provision. So we ended up with a 2.x backend and a 1.x frontend. Anyway, needless to say, it took a couple hours to first discover the nature of the mistake, and the fully recover. I don't think there's anything the packaging can do about that, except perhaps a prominent warning to pay special attention to any custom makefiles.
Another one had a failure due to a 'duplicate function definition' error early on in the process, apparently due to remote_import being in the provision directory. This resulted in the site being rolled-back to the 1.x platform, but remaining inaccessible. I suspect this was due to the lack of the link to aegir.conf, since the .deb install didn't complete. Once I moved remote_import out of the way, I could confirm that aegir-provision2 installed properly, but started getting errors during the front-end install:
Executing hosting_server_update_6200 [success]
Duplicate entry '1' for key 'PRIMARY' [warning]
query: UPDATE hosting_ip_addresses SET id=1 WHERE nid=4 AND
ip_address='127.0.0.1' database.mysqli.inc:134
Duplicate entry '2' for key 'PRIMARY' [warning]
query: UPDATE hosting_ip_addresses SET id=2 WHERE nid=4 AND
ip_address='127.0.0.1' database.mysqli.inc:134
Duplicate entry '3' for key 'PRIMARY' [warning]
query: UPDATE hosting_ip_addresses SET id=3 WHERE nid=10 AND
ip_address='54.208.11.76' database.mysqli.inc:134
Duplicate entry '4' for key 'PRIMARY' [warning]
query: UPDATE hosting_ip_addresses SET id=4 WHERE nid=81 AND
ip_address='54.208.16.119' database.mysqli.inc:134
Duplicate entry '5' for key 'PRIMARY' [warning]
query: UPDATE hosting_ip_addresses SET id=5 WHERE nid=96 AND
ip_address='54.235.219.240' database.mysqli.inc:134
Duplicate entry '6' for key 'PRIMARY' [warning]
query: UPDATE hosting_ip_addresses SET id=6 WHERE nid=93 AND
ip_address='54.235.219.240' database.mysqli.inc:134
Duplicate entry '7' for key 'PRIMARY' [warning]
query: UPDATE hosting_ip_addresses SET id=7 WHERE nid=98 AND
ip_address='54.235.219.240' database.mysqli.inc:134
Duplicate entry '8' for key 'PRIMARY' [warning]
query: UPDATE hosting_ip_addresses SET id=8 WHERE nid=104 AND
ip_address='107.21.249.26' database.mysqli.inc:134
Duplicate entry '9' for key 'PRIMARY' [warning]
query: UPDATE hosting_ip_addresses SET id=9 WHERE nid=108 AND
ip_address='54.235.219.240' database.mysqli.inc:134
Duplicate entry '10' for key 'PRIMARY' [warning]
query: UPDATE hosting_ip_addresses SET id=10 WHERE nid=451 AND
ip_address='54.208.11.76' database.mysqli.inc:134
Duplicate entry '11' for key 'PRIMARY' [warning]
query: UPDATE hosting_ip_addresses SET id=11 WHERE nid=454 AND
ip_address='54.208.11.76' database.mysqli.inc:134
ALTER TABLE {hosting_ip_addresses} DROP INDEX vid [success]
ALTER TABLE {hosting_ip_addresses} DROP vid [success]
ALTER TABLE {hosting_ip_addresses} ADD `id` INT unsigned [success]
auto_increment DEFAULT NULL, ADD PRIMARY KEY (id)
ALTER TABLE {hosting_ip_addresses} CHANGE `id` `id` INT unsigned NOT [success]
NULL auto_increment
UPDATE {hosting_ip_addresses} SET id=0 WHERE nid=2 AND [success]
ip_address='54.208.11.76'
UPDATE {hosting_ip_addresses} SET id=1 WHERE nid=4 AND [error]
ip_address='127.0.0.1'
UPDATE {hosting_ip_addresses} SET id=2 WHERE nid=4 AND [error]
ip_address='127.0.0.1'
UPDATE {hosting_ip_addresses} SET id=3 WHERE nid=10 AND [error]
ip_address='54.208.11.76'
UPDATE {hosting_ip_addresses} SET id=4 WHERE nid=81 AND [error]
ip_address='54.208.16.119'
UPDATE {hosting_ip_addresses} SET id=5 WHERE nid=96 AND [error]
ip_address='54.235.219.240'
UPDATE {hosting_ip_addresses} SET id=6 WHERE nid=93 AND [error]
ip_address='54.235.219.240'
UPDATE {hosting_ip_addresses} SET id=7 WHERE nid=98 AND [error]
ip_address='54.235.219.240'
UPDATE {hosting_ip_addresses} SET id=8 WHERE nid=104 AND [error]
ip_address='107.21.249.26'
UPDATE {hosting_ip_addresses} SET id=9 WHERE nid=108 AND [error]
ip_address='54.235.219.240'
UPDATE {hosting_ip_addresses} SET id=10 WHERE nid=451 AND [error]
ip_address='54.208.11.76'
UPDATE {hosting_ip_addresses} SET id=11 WHERE nid=454 AND [error]
ip_address='54.208.11.76'
ALTER TABLE {hosting_ip_addresses} ADD INDEX nid (nid) [success]
'all' cache was cleared in [success]
/var/aegir/hostmaster-6.x-2.0-rc2#test.poetic.aegirvps.net
Finished performing updates. [ok]
Drush was not able to start (bootstrap) the Drupal database. [error]
Hint: This may occur when Drush is trying to:
* bootstrap a site that has not been installed or does not have a
configured database. In this case you can select another site with a
working database setup by specifying the URI to use with the --uri
parameter on the command line. See `drush topic docs-aliases` for
details.
Temporarily commenting-out the following line in hosting_server_update_6200() allowed the install to complete:
$ret[] = update_sql("UPDATE {hosting_ip_addresses} SET id=$i WHERE nid={$row->nid} AND ip_address='{$row->ip_address}'");
All of these upgrades had difficulties with getting the hosting-queued service running, so I'll document that separately.










Comments
Comment #1
anarcat CreditAttribution: anarcat commentedThis was an upgrade from 1.9?
Comment #2
ergonlogicI'd previously updated 1.9->1.10. this happened on the upgrade from 1.10-2.0-rc2
Comment #3
Dane Powell CreditAttribution: Dane Powell commentedI also got the hosting_ip_addresses error on upgrading from 1.10 to 2.0-rc4, and had to use the workaround in OP.
Comment #4
Dane Powell CreditAttribution: Dane Powell commentedIs there any way that this error or workaround could have resulted in #2102455: Frontend missing after upgrade? It's the only significant error I encountered during the upgrade process, so I have to wonder if it's connected.
Comment #5
anarcat CreditAttribution: anarcat commentedI don't understand how those ip_addresses errors can happen, looking at the code:
the "id" field is *new* - if you get duplicated rows, it's because that code ran twice, and it should have failed at the add_field too, actually.
i am not sure what we can do to help you here. :)
Comment #6
ergonlogicWell, I think most of this probably stemmed from the initial problem with the broken custom makefile, and the oddity of having to install some provision extensions within the provision directory itself.
I updated http://community.aegirproject.org/upgrading/path with some additional advice that covers the pitfalls I fell into here, so I'm closing this issue.
Comment #7
j0nathan CreditAttribution: j0nathan commentedI am trying to upgrade from 1.10 to 2.0-rc5 and having these "UPDATE hosting_ip_addresses" errors on my local machine with basic aegir installation from debian packages on ubuntu.
I think these errors should be fixed instead of "works as designed". Don't you ?
Comment #8
j0nathan CreditAttribution: j0nathan commentedI have no custom makefile for aegir.
I don't know why and since when, before the upgrade, the packages for aegir 1.10 where not installed as per synaptic.
Before the upgrade and at this moment too, when I access my local webserver, it shows the page from apache /var/www/index.html instead of my usual aegir frontend.
Actually these packages are installed:
I'm lost.
Comment #9
helmo CreditAttribution: helmo commentedIn "iF aegir2-hostmaster", the F stands for "halF-conf". So i guess that something went wrong during the installation of that package. Resulting in a broken/missing hostmaster site.
Does /var/aegir/hostmaster-6.x-2.0-rc5 have a valid drupal installation?
Related?
#2118857: upgrading from 1.x ditches a /var/aegir symlink
#1930670: Duplicate entry 0 for key PRIMARY in hosting_ip_addresses when installing / upgrading
The full logs might help...
Comment #10
j0nathan CreditAttribution: j0nathan commentedIt seems so.
Comment #11
j0nathan CreditAttribution: j0nathan commentedI just did "apt-get install aegir2" and now I have access to the aegir frontend.
Comment #12
j0nathan CreditAttribution: j0nathan commentedIt works for me now.
I mark the support request as fixed.
Feel free to reopen if needed.