Bug #9368
closed
Unable to create new container
Added by Martin Hovmöller over 9 years ago.
Updated over 9 years ago.
Description
Trying to create new container the error message "Mysql2::Error: Table 'puppet.docker_container_wizard_states' doesn't exist: SHOW FULL FIELDS FROM `docker_container_wizard_states`" is returned.
I've tried running foreman-rake db:migrate, which fails with the message
"Mysql2::Error: Duplicate column name 'repository_name': ALTER TABLE `containers` ADD `repository_name` varchar(255)"
Checking the database, I can see the table containers:
mysql> show tables;
+----------------------------------------+
| Tables_in_puppet |
+----------------------------------------+
[...]
| containers |
However, the table is empty:
select * from containers;
Empty set (0.00 sec)
- Project changed from Foreman to Docker
Could you provide the version of foreman_docker that you're using please? Either check Adminster > About > Plugins, run foreman-rake plugins
or check for the package.
(The latest version is 1.1.0)
ruby193-rubygem-foreman_docker-1.1.0-1.el6.noarch
- Description updated (diff)
It looks like the db/migrate/20141209182008_remove_docker_tables.rb migration failed the first time. It might be that /var/log/foreman/db_migrate.log* recorded the details, if it hasn't rotated by now.
But otherwise I'd suggest you edit /opt/rh/ruby193/root/usr/share/gems/gems/foreman_docker-1.1.0/db/migrate/20141209182008_remove_docker_tables.rb and comment out the change_table block near the top, then re-run foreman-rake db:migrate and see if it gets any further.
Commenting out the change_table block seems to have worked.
The migrate worked fine after the change, I added it back afterword and ran another migrate which went through without errors (and seems to taken no action).
The new container feature now works.
Thank you for the help.
Just FYI, I could not find any reference to the error in any db_migrate log except for the one I've already posted.
- Status changed from New to Closed
Also available in: Atom
PDF