Installing plugins inside docker container

Problem:
I’m trying to use the docker for the main foreman server to run in our environment. I’d like to be able to use the following plugins (all of these are added to the Gemfile.local.rb file BEFORE building the image):

  • gem “foreman_discovery”
  • gem “foreman_ansible”
  • gem “foreman_remote_execution”

The good news is, they are installed! The bad news… regardless of plugin, it seems to throw errors around when either visiting the Settings page:

Oops, we’re sorry but something went wrong undefined method `call’ for :Array

Or managing ansible roles:

Oops, we’re sorry but something went wrong PG::UndefinedTable: ERROR: relation “ansible_roles” does not exist LINE 8: WHERE a.attrelid = ‘“ansible_roles”’::regclass ^

I should also note that I’m using Ohad’s Foreman on K8S scripts GitHub - ohadlevy/foreman-kube: Kubernetes support for Foreman project but simply used my own image with the installed plugin gems. This project also contains a init job, which inits, creates and seeds the database (so I’m a bit confused on the UndefinedTable error)

To be clear, I’ve never installed a plugin the gem way actually… but it seems to be the only way?

Expected outcome:
I expected that these plugins probably should work :stuck_out_tongue: Or at least correctly run a DB migration? Again, I’m probably overlooking the obvious here

Foreman and Proxy versions:
Nightly build of 2.5.0 (which might be the issue already :stuck_out_tongue: )

Foreman and Proxy plugin versions:

  • foreman_discovery: 16.3.4
  • foreman_ansible: 6.2.0
  • foreman_remote_execution: 4.3.1

Distribution and version:
The dockerfile script in the official repo

Other relevant data:

I’ll try to do actually do the same using a 2.4 build… who knows :slight_smile:

Hi,
the missing table is strange, I would expect plugin migrations to run as well but I’d need to try that build myself to tell for sure what is going on.

There have been attempts to run Foreman in containers, but we currently do not have a supported way how to do that. I have been looking into images with plugins as well, there is some work in progress, but not yet complete.

2 Likes

I’ve retried with a complete fresh build, on 2.4 this time, and the result seems to be the same, except for the settings page which seems to work again. However, this time I tried to look at the logging from the seed job:

2021-04-21T08:48:07 [I|app|] Rails cache backend: Redis
=> Booting Puma
=> Rails 6.0.3.6 application starting in production
=> Run rails server --help for more startup options
2021-04-21T08:48:08 [W|app|] Creating scope :completer_scope. Overwriting existing method Location.completer_scope.
2021-04-21T08:48:08 [W|app|] Creating scope :completer_scope. Overwriting existing method Organization.completer_scope.
2021-04-21T08:48:28 [I|app|] Seeding /home/foreman/db/seeds.d/010-calibrate_bcrypt_cost.rb
2021-04-21T08:48:29 [I|app|] Seeding /home/foreman/db/seeds.d/020-permissions_list.rb
2021-04-21T08:48:29 [I|app|] Seeding /home/foreman/db/seeds.d/020-roles_list.rb
2021-04-21T08:48:29 [I|app|] Seeding /home/foreman/db/seeds.d/030-auth_sources.rb
2021-04-21T08:48:29 [I|app|] Seeding /home/foreman/db/seeds.d/030-permissions.rb
2021-04-21T08:48:29 [I|app|] Seeding /home/foreman/db/seeds.d/035-admin.rb
2021-04-21T08:48:29 [I|app|] Seeding /home/foreman/db/seeds.d/040-roles.rb
2021-04-21T08:48:29 [I|app|] Seeding /home/foreman/db/seeds.d/050-taxonomies.rb
2021-04-21T08:48:29 [I|app|] Seeding /home/foreman/db/seeds.d/060-architectures.rb
2021-04-21T08:48:29 [I|app|] Seeding /home/foreman/db/seeds.d/070-provisioning_templates.rb
2021-04-21T08:48:32 [I|app|] Seeding /home/foreman/db/seeds.d/080-partition_tables.rb
2021-04-21T08:48:32 [I|app|] Seeding /home/foreman/db/seeds.d/090-report_templates.rb
2021-04-21T08:48:32 [I|app|] Template Subscription - General Report requires plugin katello, skipping import.
2021-04-21T08:48:32 [I|app|] Template Host - Last Checkin requires plugin katello, skipping import.
2021-04-21T08:48:32 [I|app|] Template Host - Registered Content Hosts requires plugin katello, skipping import.
2021-04-21T08:48:32 [I|app|] Template Host - compare content hosts packages requires plugin katello, skipping import.
2021-04-21T08:48:32 [I|app|] Template Subscription - Entitlement Report requires plugin katello, skipping import.
2021-04-21T08:48:32 [I|app|] Template Host - Applicable Errata requires plugin katello, skipping import.
2021-04-21T08:48:32 [I|app|] Template Host - Applied Errata requires plugin katello, skipping import.
2021-04-21T08:48:32 [I|app|] Seeding /home/foreman/vendor/ruby/2.7.0/gems/foreman_remote_execution-4.3.1/db/seeds.d/100-assign_features_with_templates.rb
2021-04-21T08:48:32 [I|app|] Seeding /home/foreman/db/seeds.d/100-installation_media.rb
2021-04-21T08:48:32 [I|app|] Seeding /home/foreman/db/seeds.d/110-smart_proxy_features.rb
2021-04-21T08:48:33 [I|app|] Seeding /home/foreman/db/seeds.d/130-compute_profiles.rb
2021-04-21T08:48:33 [I|app|] Seeding /home/foreman/db/seeds.d/150-bookmarks.rb
2021-04-21T08:48:33 [I|app|] Seeding /home/foreman/db/seeds.d/160-mail_notifications.rb
2021-04-21T08:48:33 [I|app|] Seeding /home/foreman/db/seeds.d/170-notification_blueprints.rb
2021-04-21T08:48:33 [I|app|] Seeding /home/foreman/db/seeds.d/180-common_parameters.rb
2021-04-21T08:48:33 [I|app|] Seeding /home/foreman/vendor/ruby/2.7.0/gems/foreman-tasks-4.1.0/db/seeds.d/20-foreman_tasks_permissions.rb
2021-04-21T08:48:33 [I|app|] Seeding /home/foreman/vendor/ruby/2.7.0/gems/foreman_remote_execution-4.3.1/db/seeds.d/20-permissions.rb
2021-04-21T08:48:33 [I|app|] Seeding /home/foreman/vendor/ruby/2.7.0/gems/foreman-tasks-4.1.0/db/seeds.d/30-notification_blueprints.rb
2021-04-21T08:48:33 [I|app|] Seeding /home/foreman/vendor/ruby/2.7.0/gems/foreman_remote_execution-4.3.1/db/seeds.d/50-notification_blueprints.rb
2021-04-21T08:48:33 [I|app|] Seeding /home/foreman/vendor/ruby/2.7.0/gems/foreman_discovery-16.3.4/db/seeds.d/50_discovery_templates.rb
2021-04-21T08:48:33 [I|app|] Seeding /home/foreman/vendor/ruby/2.7.0/gems/foreman-tasks-4.1.0/db/seeds.d/60-dynflow_proxy_feature.rb
2021-04-21T08:48:33 [I|app|] Seeding /home/foreman/vendor/ruby/2.7.0/gems/foreman_remote_execution-4.3.1/db/seeds.d/60-ssh_proxy_feature.rb
2021-04-21T08:48:33 [I|app|] Seeding /home/foreman/vendor/ruby/2.7.0/gems/foreman_discovery-16.3.4/db/seeds.d/60_discovery_proxy_feature.rb
2021-04-21T08:48:33 [I|app|] Seeding /home/foreman/vendor/ruby/2.7.0/gems/foreman-tasks-4.1.0/db/seeds.d/61-foreman_tasks_bookmarks.rb
2021-04-21T08:48:33 [E|app|] Error while attempting to seed database, please run foreman-rake db:seed manually!
2021-04-21T08:48:33 [E|app|] /home/foreman/vendor/ruby/2.7.0/gems/foreman-tasks-4.1.0/db/seeds.d/61-foreman_tasks_bookmarks.rb:10:in block (2 levels) in <top (required)>': undefined method format_errors’ for main:Object (NoMethodError)
| from /home/foreman/vendor/ruby/2.7.0/gems/foreman-tasks-4.1.0/db/seeds.d/61-foreman_tasks_bookmarks.rb:6:in each' | from /home/foreman/vendor/ruby/2.7.0/gems/foreman-tasks-4.1.0/db/seeds.d/61-foreman_tasks_bookmarks.rb:6:in block in <top (required)>’
| from /home/foreman/vendor/ruby/2.7.0/gems/audited-4.10.0/lib/audited/auditor.rb:395:in without_auditing' | from /home/foreman/vendor/ruby/2.7.0/gems/foreman-tasks-4.1.0/db/seeds.d/61-foreman_tasks_bookmarks.rb:1:in <top (required)>’
| from /home/foreman/vendor/ruby/2.7.0/gems/activesupport-6.0.3.6/lib/active_support/dependencies.rb:318:in load' | from /home/foreman/vendor/ruby/2.7.0/gems/activesupport-6.0.3.6/lib/active_support/dependencies.rb:318:in block in load’
| from /home/foreman/vendor/ruby/2.7.0/gems/activesupport-6.0.3.6/lib/active_support/dependencies.rb:291:in load_dependency' | from /home/foreman/vendor/ruby/2.7.0/gems/activesupport-6.0.3.6/lib/active_support/dependencies.rb:318:in load’
| from /home/foreman/app/services/foreman_seeder.rb:46:in block (2 levels) in execute' | from /home/foreman/app/models/concerns/foreman/thread_session.rb:108:in as’
| from /home/foreman/app/models/concerns/foreman/thread_session.rb:114:in as_anonymous_admin' | from /home/foreman/app/services/foreman_seeder.rb:45:in block in execute’
| from /home/foreman/app/services/foreman_seeder.rb:39:in each' | from /home/foreman/app/services/foreman_seeder.rb:39:in execute’
| from /home/foreman/config/initializers/seeds.rb:13:in block (2 levels) in <top (required)>' | from /home/foreman/vendor/ruby/2.7.0/gems/activesupport-6.0.3.6/lib/active_support/lazy_load_hooks.rb:68:in block in execute_hook’
| from /home/foreman/vendor/ruby/2.7.0/gems/activesupport-6.0.3.6/lib/active_support/lazy_load_hooks.rb:61:in with_execution_control' | from /home/foreman/vendor/ruby/2.7.0/gems/activesupport-6.0.3.6/lib/active_support/lazy_load_hooks.rb:66:in execute_hook’
| from /home/foreman/vendor/ruby/2.7.0/gems/activesupport-6.0.3.6/lib/active_support/lazy_load_hooks.rb:52:in block in run_load_hooks' | from /home/foreman/vendor/ruby/2.7.0/gems/activesupport-6.0.3.6/lib/active_support/lazy_load_hooks.rb:51:in each’
| from /home/foreman/vendor/ruby/2.7.0/gems/activesupport-6.0.3.6/lib/active_support/lazy_load_hooks.rb:51:in run_load_hooks' | from /home/foreman/vendor/ruby/2.7.0/gems/railties-6.0.3.6/lib/rails/application/finisher.rb:129:in block in module:Finisher
| from /home/foreman/vendor/ruby/2.7.0/gems/railties-6.0.3.6/lib/rails/initializable.rb:32:in instance_exec' | from /home/foreman/vendor/ruby/2.7.0/gems/railties-6.0.3.6/lib/rails/initializable.rb:32:in run’
| from /home/foreman/vendor/ruby/2.7.0/gems/railties-6.0.3.6/lib/rails/initializable.rb:61:in block in run_initializers' | from /usr/share/ruby/tsort.rb:228:in block in tsort_each’
| from /usr/share/ruby/tsort.rb:350:in block (2 levels) in each_strongly_connected_component' | from /usr/share/ruby/tsort.rb:431:in each_strongly_connected_component_from’
| from /usr/share/ruby/tsort.rb:349:in block in each_strongly_connected_component' | from /usr/share/ruby/tsort.rb:347:in each’
| from /usr/share/ruby/tsort.rb:347:in call' | from /usr/share/ruby/tsort.rb:347:in each_strongly_connected_component’
| from /usr/share/ruby/tsort.rb:226:in tsort_each' | from /usr/share/ruby/tsort.rb:205:in tsort_each’
| from /home/foreman/vendor/ruby/2.7.0/gems/railties-6.0.3.6/lib/rails/initializable.rb:60:in run_initializers' | from /home/foreman/vendor/ruby/2.7.0/gems/railties-6.0.3.6/lib/rails/application.rb:363:in initialize!’
| from /home/foreman/vendor/ruby/2.7.0/gems/railties-6.0.3.6/lib/rails/railtie.rb:190:in public_send' | from /home/foreman/vendor/ruby/2.7.0/gems/railties-6.0.3.6/lib/rails/railtie.rb:190:in method_missing’
| from /home/foreman/config/environment.rb:5:in <top (required)>' | from /home/foreman/vendor/ruby/2.7.0/gems/polyglot-0.3.5/lib/polyglot.rb:65:in require’
| from /home/foreman/vendor/ruby/2.7.0/gems/polyglot-0.3.5/lib/polyglot.rb:65:in require' | from /home/foreman/vendor/ruby/2.7.0/gems/activesupport-6.0.3.6/lib/active_support/dependencies.rb:324:in block in require’
| from /home/foreman/vendor/ruby/2.7.0/gems/activesupport-6.0.3.6/lib/active_support/dependencies.rb:291:in load_dependency' | from /home/foreman/vendor/ruby/2.7.0/gems/activesupport-6.0.3.6/lib/active_support/dependencies.rb:324:in require’
| from config.ru:5:in block in <main>' | from /home/foreman/vendor/ruby/2.7.0/gems/rack-2.2.3/lib/rack/builder.rb:116:in eval’
| from /home/foreman/vendor/ruby/2.7.0/gems/rack-2.2.3/lib/rack/builder.rb:116:in new_from_string' | from /home/foreman/vendor/ruby/2.7.0/gems/rack-2.2.3/lib/rack/builder.rb:105:in load_file’
| from /home/foreman/vendor/ruby/2.7.0/gems/rack-2.2.3/lib/rack/builder.rb:66:in parse_file' | from /home/foreman/vendor/ruby/2.7.0/gems/rack-2.2.3/lib/rack/server.rb:349:in build_app_and_options_from_config’
| from /home/foreman/vendor/ruby/2.7.0/gems/rack-2.2.3/lib/rack/server.rb:249:in app' | from /home/foreman/vendor/ruby/2.7.0/gems/rack-2.2.3/lib/rack/server.rb:422:in wrapped_app’
| from /home/foreman/vendor/ruby/2.7.0/gems/rack-2.2.3/lib/rack/server.rb:312:in block in start' | from /home/foreman/vendor/ruby/2.7.0/gems/rack-2.2.3/lib/rack/server.rb:379:in handle_profiling’
| from /home/foreman/vendor/ruby/2.7.0/gems/rack-2.2.3/lib/rack/server.rb:311:in start' | from /home/foreman/vendor/ruby/2.7.0/gems/railties-6.0.3.6/lib/rails/commands/server/server_command.rb:39:in start’
| from /home/foreman/vendor/ruby/2.7.0/gems/railties-6.0.3.6/lib/rails/commands/server/server_command.rb:147:in block in perform' | from /home/foreman/vendor/ruby/2.7.0/gems/railties-6.0.3.6/lib/rails/commands/server/server_command.rb:138:in tap’
| from /home/foreman/vendor/ruby/2.7.0/gems/railties-6.0.3.6/lib/rails/commands/server/server_command.rb:138:in perform' | from /home/foreman/vendor/ruby/2.7.0/gems/thor-1.1.0/lib/thor/command.rb:27:in run’
| from /home/foreman/vendor/ruby/2.7.0/gems/thor-1.1.0/lib/thor/invocation.rb:127:in invoke_command' | from /home/foreman/vendor/ruby/2.7.0/gems/thor-1.1.0/lib/thor.rb:392:in dispatch’
| from /home/foreman/vendor/ruby/2.7.0/gems/railties-6.0.3.6/lib/rails/command/base.rb:69:in perform' | from /home/foreman/vendor/ruby/2.7.0/gems/railties-6.0.3.6/lib/rails/command.rb:46:in invoke’
| from /home/foreman/vendor/ruby/2.7.0/gems/railties-6.0.3.6/lib/rails/commands.rb:18:in <top (required)>' | from /home/foreman/vendor/ruby/2.7.0/gems/activesupport-6.0.3.6/lib/active_support/dependencies.rb:324:in require’
| from /home/foreman/vendor/ruby/2.7.0/gems/activesupport-6.0.3.6/lib/active_support/dependencies.rb:324:in block in require' | from /home/foreman/vendor/ruby/2.7.0/gems/activesupport-6.0.3.6/lib/active_support/dependencies.rb:291:in load_dependency’
| from /home/foreman/vendor/ruby/2.7.0/gems/activesupport-6.0.3.6/lib/active_support/dependencies.rb:324:in require' | from bin/rails:9:in

So it looks like something in foreman tasks in going wrong, which results in the other scripts no running properly which results in that error. I’ve not explicitly installed foreman-tasks plugin (v4.1 btw) so it’s a dependency, I’ll see if I can find a way around somehow and I’ll keep you posted

I have a similar issue reported at Bug #31736: ERROR: index "dynflow_actions_execution_plan_uuid_id_index" does not exist - Foreman

1 Like

Hi Ohad,

I just now solved my exact issue, being that I accidently forgot to change the Jobs image as well :frowning:
Anyway, I’ll provide all my input as I’m learning, perhaps give it a go to create a helm chart even.

Thank you for your effort on this!

2 Likes

hmm… at first I though I did something wrong, but then I created the setup job using the sha and still get the same error, I’m guessing I’m missing another step that you worked around?

oc logs job/setup -f
`/` is not writable.
Bundler will use `/tmp/bundler20210422-1-15do9ml1' as your home directory temporarily.
2021-04-22T08:14:19 [I|app|] Rails cache backend: File
Database 'foreman' already exists
rake aborted!
Sequel::DatabaseError: PG::UndefinedObject: ERROR:  index "dynflow_actions_execution_plan_uuid_id_index" does not exist
/home/foreman/vendor/ruby/2.7.0/gems/sequel-5.43.0/lib/sequel/adapters/postgres.rb:156:in `exec'
/home/foreman/vendor/ruby/2.7.0/gems/sequel-5.43.0/lib/sequel/adapters/postgres.rb:156:in `block in execute_query'
/home/foreman/vendor/ruby/2.7.0/gems/sequel-5.43.0/lib/sequel/database/logging.rb:43:in `log_connection_yield'
/home/foreman/vendor/ruby/2.7.0/gems/sequel-5.43.0/lib/sequel/adapters/postgres.rb:156:in `execute_query'
/home/foreman/vendor/ruby/2.7.0/gems/sequel-5.43.0/lib/sequel/adapters/postgres.rb:144:in `block in execute'
/home/foreman/vendor/ruby/2.7.0/gems/sequel-5.43.0/lib/sequel/adapters/postgres.rb:120:in `check_disconnect_errors'
/home/foreman/vendor/ruby/2.7.0/gems/sequel-5.43.0/lib/sequel/adapters/postgres.rb:144:in `execute'
/home/foreman/vendor/ruby/2.7.0/gems/sequel-5.43.0/lib/sequel/adapters/postgres.rb:500:in `_execute'
/home/foreman/vendor/ruby/2.7.0/gems/sequel-5.43.0/lib/sequel/adapters/postgres.rb:318:in `block (2 levels) in execute'
/home/foreman/vendor/ruby/2.7.0/gems/sequel-5.43.0/lib/sequel/adapters/postgres.rb:522:in `check_database_errors'
/home/foreman/vendor/ruby/2.7.0/gems/sequel-5.43.0/lib/sequel/adapters/postgres.rb:318:in `block in execute'
/home/foreman/vendor/ruby/2.7.0/gems/sequel-5.43.0/lib/sequel/connection_pool/threaded.rb:88:in `hold'
/home/foreman/vendor/ruby/2.7.0/gems/sequel-5.43.0/lib/sequel/database/connecting.rb:269:in `synchronize'
/home/foreman/vendor/ruby/2.7.0/gems/sequel-5.43.0/lib/sequel/adapters/postgres.rb:318:in `execute'
/home/foreman/vendor/ruby/2.7.0/gems/sequel-5.43.0/lib/sequel/database/query.rb:50:in `execute_dui'
/home/foreman/vendor/ruby/2.7.0/gems/sequel-5.43.0/lib/sequel/database/query.rb:43:in `execute_ddl'
/home/foreman/vendor/ruby/2.7.0/gems/sequel-5.43.0/lib/sequel/database/schema_methods.rb:424:in `block in apply_alter_table'
/home/foreman/vendor/ruby/2.7.0/gems/sequel-5.43.0/lib/sequel/database/schema_methods.rb:424:in `each'
/home/foreman/vendor/ruby/2.7.0/gems/sequel-5.43.0/lib/sequel/database/schema_methods.rb:424:in `apply_alter_table'
/home/foreman/vendor/ruby/2.7.0/gems/sequel-5.43.0/lib/sequel/database/schema_methods.rb:437:in `apply_alter_table_generator'
/home/foreman/vendor/ruby/2.7.0/gems/sequel-5.43.0/lib/sequel/database/schema_methods.rb:70:in `alter_table'
/home/foreman/vendor/ruby/2.7.0/gems/dynflow-1.4.7/lib/dynflow/persistence_adapters/sequel_migrations/020_drop_duplicate_indices.rb:4:in `block (2 levels) in <top (required)>'
/home/foreman/vendor/ruby/2.7.0/gems/sequel-5.43.0/lib/sequel/extensions/migration.rb:110:in `instance_exec'
/home/foreman/vendor/ruby/2.7.0/gems/sequel-5.43.0/lib/sequel/extensions/migration.rb:110:in `apply'
/home/foreman/vendor/ruby/2.7.0/gems/sequel-5.43.0/lib/sequel/extensions/migration.rb:563:in `block (2 levels) in run'
/home/foreman/vendor/ruby/2.7.0/gems/sequel-5.43.0/lib/sequel/database/transactions.rb:258:in `_transaction'
/home/foreman/vendor/ruby/2.7.0/gems/sequel-5.43.0/lib/sequel/database/transactions.rb:233:in `block in transaction'
/home/foreman/vendor/ruby/2.7.0/gems/sequel-5.43.0/lib/sequel/connection_pool/threaded.rb:92:in `hold'
/home/foreman/vendor/ruby/2.7.0/gems/sequel-5.43.0/lib/sequel/database/connecting.rb:269:in `synchronize'
/home/foreman/vendor/ruby/2.7.0/gems/sequel-5.43.0/lib/sequel/database/transactions.rb:195:in `transaction'
/home/foreman/vendor/ruby/2.7.0/gems/sequel-5.43.0/lib/sequel/extensions/migration.rb:479:in `checked_transaction'
/home/foreman/vendor/ruby/2.7.0/gems/sequel-5.43.0/lib/sequel/extensions/migration.rb:562:in `block in run'
/home/foreman/vendor/ruby/2.7.0/gems/sequel-5.43.0/lib/sequel/extensions/migration.rb:559:in `each'
/home/foreman/vendor/ruby/2.7.0/gems/sequel-5.43.0/lib/sequel/extensions/migration.rb:559:in `run'
/home/foreman/vendor/ruby/2.7.0/gems/sequel-5.43.0/lib/sequel/extensions/migration.rb:406:in `run'
/home/foreman/vendor/ruby/2.7.0/gems/dynflow-1.4.7/lib/dynflow/persistence_adapters/sequel.rb:254:in `migrate_db'
/home/foreman/lib/tasks/dynflow.rake:23:in `block (2 levels) in <top (required)>'
/home/foreman/lib/tasks/dynflow.rake:42:in `block (2 levels) in <top (required)>'
/home/foreman/vendor/ruby/2.7.0/gems/rake-13.0.3/exe/rake:27:in `<top (required)>'
/usr/share/gems/gems/bundler-2.1.4/lib/bundler/cli/exec.rb:63:in `load'
/usr/share/gems/gems/bundler-2.1.4/lib/bundler/cli/exec.rb:63:in `kernel_load'
/usr/share/gems/gems/bundler-2.1.4/lib/bundler/cli/exec.rb:28:in `run'
/usr/share/gems/gems/bundler-2.1.4/lib/bundler/cli.rb:476:in `exec'
/usr/share/gems/gems/bundler-2.1.4/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/usr/share/gems/gems/bundler-2.1.4/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
/usr/share/gems/gems/bundler-2.1.4/lib/bundler/vendor/thor/lib/thor.rb:399:in `dispatch'
/usr/share/gems/gems/bundler-2.1.4/lib/bundler/cli.rb:30:in `dispatch'
/usr/share/gems/gems/bundler-2.1.4/lib/bundler/vendor/thor/lib/thor/base.rb:476:in `start'
/usr/share/gems/gems/bundler-2.1.4/lib/bundler/cli.rb:24:in `start'
/usr/share/gems/gems/bundler-2.1.4/libexec/bundle:46:in `block in <top (required)>'
/usr/share/gems/gems/bundler-2.1.4/lib/bundler/friendly_errors.rb:123:in `with_friendly_errors'
/usr/share/gems/gems/bundler-2.1.4/libexec/bundle:34:in `<top (required)>'
//bin/bundle:23:in `load'
//bin/bundle:23:in `<main>'

Caused by:
PG::UndefinedObject: ERROR:  index "dynflow_actions_execution_plan_uuid_id_index" does not exist
/home/foreman/vendor/ruby/2.7.0/gems/sequel-5.43.0/lib/sequel/adapters/postgres.rb:156:in `exec'
/home/foreman/vendor/ruby/2.7.0/gems/sequel-5.43.0/lib/sequel/adapters/postgres.rb:156:in `block in execute_query'
/home/foreman/vendor/ruby/2.7.0/gems/sequel-5.43.0/lib/sequel/database/logging.rb:43:in `log_connection_yield'
/home/foreman/vendor/ruby/2.7.0/gems/sequel-5.43.0/lib/sequel/adapters/postgres.rb:156:in `execute_query'
/home/foreman/vendor/ruby/2.7.0/gems/sequel-5.43.0/lib/sequel/adapters/postgres.rb:144:in `block in execute'
/home/foreman/vendor/ruby/2.7.0/gems/sequel-5.43.0/lib/sequel/adapters/postgres.rb:120:in `check_disconnect_errors'
/home/foreman/vendor/ruby/2.7.0/gems/sequel-5.43.0/lib/sequel/adapters/postgres.rb:144:in `execute'
/home/foreman/vendor/ruby/2.7.0/gems/sequel-5.43.0/lib/sequel/adapters/postgres.rb:500:in `_execute'
/home/foreman/vendor/ruby/2.7.0/gems/sequel-5.43.0/lib/sequel/adapters/postgres.rb:318:in `block (2 levels) in execute'
/home/foreman/vendor/ruby/2.7.0/gems/sequel-5.43.0/lib/sequel/adapters/postgres.rb:522:in `check_database_errors'
/home/foreman/vendor/ruby/2.7.0/gems/sequel-5.43.0/lib/sequel/adapters/postgres.rb:318:in `block in execute'
/home/foreman/vendor/ruby/2.7.0/gems/sequel-5.43.0/lib/sequel/connection_pool/threaded.rb:88:in `hold'
/home/foreman/vendor/ruby/2.7.0/gems/sequel-5.43.0/lib/sequel/database/connecting.rb:269:in `synchronize'
/home/foreman/vendor/ruby/2.7.0/gems/sequel-5.43.0/lib/sequel/adapters/postgres.rb:318:in `execute'
/home/foreman/vendor/ruby/2.7.0/gems/sequel-5.43.0/lib/sequel/database/query.rb:50:in `execute_dui'
/home/foreman/vendor/ruby/2.7.0/gems/sequel-5.43.0/lib/sequel/database/query.rb:43:in `execute_ddl'
/home/foreman/vendor/ruby/2.7.0/gems/sequel-5.43.0/lib/sequel/database/schema_methods.rb:424:in `block in apply_alter_table'
/home/foreman/vendor/ruby/2.7.0/gems/sequel-5.43.0/lib/sequel/database/schema_methods.rb:424:in `each'
/home/foreman/vendor/ruby/2.7.0/gems/sequel-5.43.0/lib/sequel/database/schema_methods.rb:424:in `apply_alter_table'
/home/foreman/vendor/ruby/2.7.0/gems/sequel-5.43.0/lib/sequel/database/schema_methods.rb:437:in `apply_alter_table_generator'
/home/foreman/vendor/ruby/2.7.0/gems/sequel-5.43.0/lib/sequel/database/schema_methods.rb:70:in `alter_table'
/home/foreman/vendor/ruby/2.7.0/gems/dynflow-1.4.7/lib/dynflow/persistence_adapters/sequel_migrations/020_drop_duplicate_indices.rb:4:in `block (2 levels) in <top (required)>'
/home/foreman/vendor/ruby/2.7.0/gems/sequel-5.43.0/lib/sequel/extensions/migration.rb:110:in `instance_exec'
/home/foreman/vendor/ruby/2.7.0/gems/sequel-5.43.0/lib/sequel/extensions/migration.rb:110:in `apply'
/home/foreman/vendor/ruby/2.7.0/gems/sequel-5.43.0/lib/sequel/extensions/migration.rb:563:in `block (2 levels) in run'
/home/foreman/vendor/ruby/2.7.0/gems/sequel-5.43.0/lib/sequel/database/transactions.rb:258:in `_transaction'
/home/foreman/vendor/ruby/2.7.0/gems/sequel-5.43.0/lib/sequel/database/transactions.rb:233:in `block in transaction'
/home/foreman/vendor/ruby/2.7.0/gems/sequel-5.43.0/lib/sequel/connection_pool/threaded.rb:92:in `hold'
/home/foreman/vendor/ruby/2.7.0/gems/sequel-5.43.0/lib/sequel/database/connecting.rb:269:in `synchronize'
/home/foreman/vendor/ruby/2.7.0/gems/sequel-5.43.0/lib/sequel/database/transactions.rb:195:in `transaction'
/home/foreman/vendor/ruby/2.7.0/gems/sequel-5.43.0/lib/sequel/extensions/migration.rb:479:in `checked_transaction'
/home/foreman/vendor/ruby/2.7.0/gems/sequel-5.43.0/lib/sequel/extensions/migration.rb:562:in `block in run'
/home/foreman/vendor/ruby/2.7.0/gems/sequel-5.43.0/lib/sequel/extensions/migration.rb:559:in `each'
/home/foreman/vendor/ruby/2.7.0/gems/sequel-5.43.0/lib/sequel/extensions/migration.rb:559:in `run'
/home/foreman/vendor/ruby/2.7.0/gems/sequel-5.43.0/lib/sequel/extensions/migration.rb:406:in `run'
/home/foreman/vendor/ruby/2.7.0/gems/dynflow-1.4.7/lib/dynflow/persistence_adapters/sequel.rb:254:in `migrate_db'
/home/foreman/lib/tasks/dynflow.rake:23:in `block (2 levels) in <top (required)>'
/home/foreman/lib/tasks/dynflow.rake:42:in `block (2 levels) in <top (required)>'
/home/foreman/vendor/ruby/2.7.0/gems/rake-13.0.3/exe/rake:27:in `<top (required)>'
/usr/share/gems/gems/bundler-2.1.4/lib/bundler/cli/exec.rb:63:in `load'
/usr/share/gems/gems/bundler-2.1.4/lib/bundler/cli/exec.rb:63:in `kernel_load'
/usr/share/gems/gems/bundler-2.1.4/lib/bundler/cli/exec.rb:28:in `run'
/usr/share/gems/gems/bundler-2.1.4/lib/bundler/cli.rb:476:in `exec'
/usr/share/gems/gems/bundler-2.1.4/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/usr/share/gems/gems/bundler-2.1.4/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
/usr/share/gems/gems/bundler-2.1.4/lib/bundler/vendor/thor/lib/thor.rb:399:in `dispatch'
/usr/share/gems/gems/bundler-2.1.4/lib/bundler/cli.rb:30:in `dispatch'
/usr/share/gems/gems/bundler-2.1.4/lib/bundler/vendor/thor/lib/thor/base.rb:476:in `start'
/usr/share/gems/gems/bundler-2.1.4/lib/bundler/cli.rb:24:in `start'
/usr/share/gems/gems/bundler-2.1.4/libexec/bundle:46:in `block in <top (required)>'
/usr/share/gems/gems/bundler-2.1.4/lib/bundler/friendly_errors.rb:123:in `with_friendly_errors'
/usr/share/gems/gems/bundler-2.1.4/libexec/bundle:34:in `<top (required)>'
//bin/bundle:23:in `load'
//bin/bundle:23:in `<main>'
Tasks: TOP => dynflow:migrate
(See full trace by running task with --trace)
1 Like

did anyone saw this before? @aruzicka ?

Nope, that’s new to me

Hi, I’ve also looked but could not determine what I’ve done differently compared to the original scripts (except for adding plugins…)… If I learn something new, on the subject, I’ll let you know