Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[dev.icinga.com #10698] Upgrading icinga2-ido-mysql from 2.3.11 to 2.4.0 yields Duplicate column name 'zone_object_id' #3696

Closed
icinga-migration opened this issue Nov 22, 2015 · 10 comments
Labels

Comments

@icinga-migration
Copy link
Member

@icinga-migration icinga-migration commented Nov 22, 2015

This issue has been migrated from Redmine: https://dev.icinga.com/issues/10698

Created by Felicitus on 2015-11-22 12:28:19 +00:00

Assignee: (none)
Status: Rejected (closed on 2016-08-15 11:03:40 +00:00)
Target Version: (none)
Last Update: 2016-08-15 11:03:40 +00:00 (in Redmine)

Icinga Version: 2.4.0
Backport?: Not yet backported
Include in Changelog: 1

Hi,

I just performed an upgrade from 2.3.11 to 2.4.0 on Debian Jessie using the http://packages.icinga.org/debian repository.

I receive the following error during upgrade:

"mysql said: ERROR 1060 (42S21) at line 14: Duplicate column name 'zone_object_id' "

I'm not sure why this happens, it seems that the upgrade is done twice. I resolved the issue by removing all column additions in the SQL file.

As there is at least one more bug which looks similar (#9951), I believe the upgrade process should be changed.

@icinga-migration
Copy link
Member Author

@icinga-migration icinga-migration commented Nov 25, 2015

Updated by mfriedrich on 2015-11-25 14:14:14 +00:00

  • Status changed from New to Feedback
  • Assigned to set to Felicitus

Are you using the snapshot repositories?

@icinga-migration
Copy link
Member Author

@icinga-migration icinga-migration commented Nov 25, 2015

Updated by Felicitus on 2015-11-25 20:05:18 +00:00

dnsmichi wrote:

Are you using the snapshot repositories?

No.

@icinga-migration
Copy link
Member Author

@icinga-migration icinga-migration commented Nov 27, 2015

Updated by falkowich on 2015-11-27 12:26:09 +00:00

I can confirm this as I tried to update the ubuntu version:

Setting up icinga2-ido-mysql (2.4.1-1~ppa1~trusty1) ...
dbconfig-common: writing config to /etc/dbconfig-common/icinga2-ido-mysql.conf
creating database backup in /var/cache/dbconfig-common/backups/icinga2-ido-mysql_2.3.11-1~ppa1~trusty1.mysql.
applying upgrade sql for 2.3.11-1~ppa1~trusty1 -> 2.4.0.
error encountered processing /usr/share/dbconfig-common/data/icinga2-ido-mysql/upgrade/mysql/2.4.0:
mysql said: ERROR 1060 (42S21) at line 14: Duplicate column name 'zone_object_id'
dbconfig-common: icinga2-ido-mysql configure: retrying.
dbconfig-common: writing config to /etc/dbconfig-common/icinga2-ido-mysql.conf
creating database backup in /var/cache/dbconfig-common/backups/icinga2-ido-mysql_2.3.11-1~ppa1~trusty1.mysql.
applying upgrade sql for 2.3.11-1~ppa1~trusty1 -> 2.4.0.
error encountered processing /usr/share/dbconfig-common/data/icinga2-ido-mysql/upgrade/mysql/2.4.0:
mysql said: ERROR 1060 (42S21) at line 14: Duplicate column name 'zone_object_id'
dbconfig-common: icinga2-ido-mysql configure: aborted.
dbconfig-common: flushing administrative password
dpkg: error processing package icinga2-ido-mysql (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 icinga2-ido-mysql
E: Sub-process /usr/bin/dpkg returned an error code (1)
@icinga-migration
Copy link
Member Author

@icinga-migration icinga-migration commented Nov 27, 2015

Updated by falkowich on 2015-11-27 12:53:00 +00:00

falkowich wrote:

I can confirm this as I tried to update the ubuntu version:

[...]

Update from my corner.
I've updated tree test servers today.
The first server spewed the error above. That is beq, I cut'n pasted the wrong root/passwd the first time.
So if everything works "the first" time, things goes good (atleast for in my test env)..

--
Regards

@icinga-migration
Copy link
Member Author

@icinga-migration icinga-migration commented Nov 27, 2015

Updated by wladik on 2015-11-27 13:55:03 +00:00

I can confirm that this error also occurred on my instance, and for the first time I've typed wrong root password for MySQL server. Skipping upgrade when running again solved it.

@icinga-migration
Copy link
Member Author

@icinga-migration icinga-migration commented Nov 30, 2015

Updated by gbeutner on 2015-11-30 11:42:36 +00:00

  • Status changed from Feedback to Assigned
  • Assigned to changed from Felicitus to formorer

formorer: Can you have a look at this please?

@icinga-migration
Copy link
Member Author

@icinga-migration icinga-migration commented Feb 24, 2016

Updated by mfriedrich on 2016-02-24 21:51:19 +00:00

Hi,

any updates on this? Otherwise I'll close the issue.

Kind regards,
Michael

@icinga-migration
Copy link
Member Author

@icinga-migration icinga-migration commented Mar 12, 2016

Updated by deneu on 2016-03-12 06:45:06 +00:00

Got the same error with actual 2.4.3 release:
icinga2:/usr/share/icinga2-ido-mysql/schema/upgrade # mysql -u root -p icinga < 2.4.0.sql
ERROR 1060 (42S21) at line 14: Duplicate column name 'zone_object_id'

@icinga-migration
Copy link
Member Author

@icinga-migration icinga-migration commented Apr 5, 2016

Updated by karlvanderschyff on 2016-04-05 06:28:05 +00:00

i can confirm that i also have the same problem upgrading with the packages 2.4.3 Duplicate column name 'zone_object_id'

@icinga-migration
Copy link
Member Author

@icinga-migration icinga-migration commented Aug 15, 2016

Updated by gbeutner on 2016-08-15 11:03:40 +00:00

  • Status changed from Assigned to Rejected
  • Assigned to deleted formorer

As far as I can tell from two user installations where I've analyzed this problem the underlying cause for this issue is that those users used the 'mysql.sql' schema from the master branch when creating their database for 2.3.x - which at that point already contained changes for the 2.4 release. I.e. this is not a bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.