Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
This happens when Jenkins installs 2.x from head:
[127.0.0.1:2200] out: Duplicate entry '0' for key 'PRIMARY' [warning]
[127.0.0.1:2200] out: query: INSERT INTO hosting_ip_addresses (nid, ip_address) VALUES (4,
[127.0.0.1:2200] out: '127.0.0.1') database.mysqli.inc:134
http://ci.aegirproject.org/job/D%20aegir%206.x-2.x%20install/466/console...
Comments
Comment #1
anarcat CreditAttribution: anarcat commentedfixed in git.
Comment #3
helmo CreditAttribution: helmo commentedSorry to re-open this, but this commit broke my upgrade. from 1.9 to 2.x.
I've had to change the db_add_field line in hosting_server_update_6200() to
Hopefully we can get a Jenkins test up and running for this...
Comment #4
omega8cc CreditAttribution: omega8cc commentedHere is a working/tested fix for this problem: http://drupal.org/node/1932616#comment-7212772
My patch fixes both install and upgrades (at least in my tests).
Comment #5
omega8cc CreditAttribution: omega8cc commentedHere is a working code which fixes all issues we have experienced:
Comment #6
omega8cc CreditAttribution: omega8cc commentedDuplicate issue closed #1958898: Upgrade fatal error
Comment #7
anarcat CreditAttribution: anarcat commentedWe would need a patch here.. But anyways, why do we do a db_add_field() followed by a db_change_field()? helmo seemed to be saying he had a patch to that effect...
Comment #8
anarcat CreditAttribution: anarcat commentedHere's the patch I am working on in tandem with #1932616: IPs deleted from hosting_ip_addresses table on server verify.
I'll test install and upgrade now.
Comment #9
anarcat CreditAttribution: anarcat commentedIt seems this patch works - at least for upgrades, i'll push and let jenkins test the install.
Comment #10
omega8cc CreditAttribution: omega8cc commentedI have used this as a reference: http://api.drupal.org/comment/16549#comment-16549
It fixed the problem for me, so there was no error and upgrade reverted, because it was not possible to do it in a one step.
But how do you test upgrades? From 1.x or at least from 2.x before SSL refactoring?
Note also that this fixes otherwise critical issue with duplicate records - it just removes extra duplicates on the fly.
But, surprise, it doesn't work with InnoDB (at least the XtraDB used in Percona/MariaDB), so it was required to temporarily convert the table to MyISAM to get it working:
Comment #11
anarcat CreditAttribution: anarcat commentedThere doesn't seem to be any warnings in jenkins: http://ci.aegirproject.org/job/D%20aegir%206.x-2.x%20install/479/console...
yay! thanks for your patience all..
Comment #13
lavamind CreditAttribution: lavamind commentedReopening this issue as I've hit the bug upon upgrading from 1.11 to 2.0 via Debian packages, and using a MySQL DB.
Full error log here : http://paste.debian.net/80582/
It seems upon altering the table to use auto_increment (type change to serial), an
id
is immediately and automatically assigned to every row. When running the UPDATE statements (which do not seem to follow any particular ordering) following that, if those happen to match the automatically assigned numbers, no problem, but in my case they did not, hence the error.After applying this patch, the error went away and the updated succeeded. I checked the hosting_ip_addresses table and
id
's were correctly assigned to every entry.Comment #14
anarcat CreditAttribution: anarcat commentedSounds good, we should test on another host before shipping.
Comment #17
helmo CreditAttribution: helmo commentedThis is already in ...
Comment #19
thewilkybarkid CreditAttribution: thewilkybarkid commentedI've just hit the same problem mentioned in #13. Applying that patch let it work the second time.
Comment #21
ergonlogic