Bug #9368

Unable to create new container

Added by Martin Hovmöller over 7 years ago. Updated over 7 years ago.

Target version:
Bugzilla link:
Pull request:
Fixed in Releases:
Found in Releases:


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)


#1 Updated by Dominic Cleal over 7 years ago

  • 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)

#2 Updated by Martin Hovmöller over 7 years ago


#3 Updated by Dominic Cleal over 7 years ago

  • 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.

#4 Updated by Martin Hovmöller over 7 years ago

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.

#5 Updated by Martin Hovmöller over 7 years ago

  • Status changed from New to Closed

Also available in: Atom PDF