Actions
Bug #22926
closedforeman-rake foreman_tasks:cleanup fails due to PG::UndefinedFunction: ERROR: operator does not exist: character varying = uuid
Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Description
Originally caught during "Upgrade Step: remove_registration_tasks..."
But even simple foreman_tasks:cleanup task trigger the issue.
foreman-1.18.0-0.develop.201803121639gitb9ec31b.el7.noarch
katello-3.7.0-1.nightly.el7.noarch
tfm-rubygem-foreman-tasks-0.12.1-1.fm1_18.el7.noarch
# foreman-rake foreman_tasks:cleanup /opt/theforeman/tfm/root/usr/share/gems/gems/sequel-4.20.0/lib/sequel/database/schema_generator.rb:19: warning: constant ::Fixnum is deprecated /opt/theforeman/tfm/root/usr/share/gems/gems/sequel-4.20.0/lib/sequel/database/schema_generator.rb:19: warning: constant ::Bignum is deprecated /usr/share/foreman/lib/foreman.rb:8: warning: already initialized constant Foreman::UUID_REGEXP /usr/share/foreman/lib/foreman.rb:8: warning: previous definition of UUID_REGEXP was here /usr/share/foreman/lib/core_extensions.rb:182: warning: already initialized constant ActiveSupport::MessageEncryptor::DEFAULT_CIPHER /opt/rh/tfm-ror51/root/usr/share/gems/gems/activesupport-5.1.4/lib/active_support/message_encryptor.rb:22: warning: previous definition of DEFAULT_CIPHER was here The PGconn, PGresult, and PGError constants are deprecated, and will be removed as of version 1.0. You should use PG::Connection, PG::Result, and PG::Error instead, respectively. Called from /opt/theforeman/tfm/root/usr/share/gems/gems/polyglot-0.3.5/lib/polyglot.rb:65:in `require' rake aborted! ActiveRecord::StatementInvalid: PG::UndefinedFunction: ERROR: operator does not exist: character varying = uuid LINE 1: ...cations" LEFT JOIN foreman_tasks_tasks ON task_id = foreman_... ^ HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts. : SELECT COUNT(*) FROM "job_invocations" LEFT JOIN foreman_tasks_tasks ON task_id = foreman_tasks_tasks.id WHERE (task_id IS NOT NULL and foreman_tasks_tasks.id IS NULL) /opt/rh/tfm-ror51/root/usr/share/gems/gems/activerecord-5.1.4/lib/active_record/connection_adapters/postgresql_adapter.rb:614:in `async_exec' /opt/rh/tfm-ror51/root/usr/share/gems/gems/activerecord-5.1.4/lib/active_record/connection_adapters/postgresql_adapter.rb:614:in `block (2 levels) in exec_no_cache' /opt/rh/tfm-ror51/root/usr/share/gems/gems/activesupport-5.1.4/lib/active_support/dependencies/interlock.rb:46:in `block in permit_concurrent_loads' /opt/rh/tfm-ror51/root/usr/share/gems/gems/activesupport-5.1.4/lib/active_support/concurrency/share_lock.rb:185:in `yield_shares' /opt/rh/tfm-ror51/root/usr/share/gems/gems/activesupport-5.1.4/lib/active_support/dependencies/interlock.rb:45:in `permit_concurrent_loads' /opt/rh/tfm-ror51/root/usr/share/gems/gems/activerecord-5.1.4/lib/active_record/connection_adapters/postgresql_adapter.rb:613:in `block in exec_no_cache' /opt/rh/tfm-ror51/root/usr/share/gems/gems/activerecord-5.1.4/lib/active_record/connection_adapters/abstract_adapter.rb:612:in `block (2 levels) in log' /opt/rh/tfm-ror51/root/usr/share/gems/gems/activerecord-5.1.4/lib/active_record/connection_adapters/abstract_adapter.rb:611:in `block in log' /opt/rh/tfm-ror51/root/usr/share/gems/gems/activesupport-5.1.4/lib/active_support/notifications/instrumenter.rb:21:in `instrument' /opt/rh/tfm-ror51/root/usr/share/gems/gems/activerecord-5.1.4/lib/active_record/connection_adapters/abstract_adapter.rb:603:in `log' /opt/rh/tfm-ror51/root/usr/share/gems/gems/activerecord-5.1.4/lib/active_record/connection_adapters/postgresql_adapter.rb:612:in `exec_no_cache' /opt/rh/tfm-ror51/root/usr/share/gems/gems/activerecord-5.1.4/lib/active_record/connection_adapters/postgresql_adapter.rb:599:in `execute_and_clear' /opt/rh/tfm-ror51/root/usr/share/gems/gems/activerecord-5.1.4/lib/active_record/connection_adapters/postgresql/database_statements.rb:79:in `exec_query' /opt/rh/tfm-ror51/root/usr/share/gems/gems/activerecord-5.1.4/lib/active_record/connection_adapters/abstract/database_statements.rb:371:in `select' /opt/rh/tfm-ror51/root/usr/share/gems/gems/activerecord-5.1.4/lib/active_record/connection_adapters/abstract/database_statements.rb:42:in `select_all' /opt/rh/tfm-ror51/root/usr/share/gems/gems/activerecord-5.1.4/lib/active_record/connection_adapters/abstract/query_cache.rb:97:in `select_all' /opt/rh/tfm-ror51/root/usr/share/gems/gems/activerecord-5.1.4/lib/active_record/relation/calculations.rb:253:in `execute_simple_calculation' /opt/rh/tfm-ror51/root/usr/share/gems/gems/activerecord-5.1.4/lib/active_record/relation/calculations.rb:209:in `perform_calculation' /opt/rh/tfm-ror51/root/usr/share/gems/gems/activerecord-5.1.4/lib/active_record/relation/calculations.rb:118:in `calculate' /opt/rh/tfm-ror51/root/usr/share/gems/gems/activerecord-5.1.4/lib/active_record/relation/calculations.rb:41:in `count' /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_remote_execution-1.4.5/app/models/concerns/foreman_remote_execution/foreman_tasks_cleaner_extensions.rb:17:in `delete' /opt/theforeman/tfm/root/usr/share/gems/gems/foreman-tasks-0.12.1/lib/foreman_tasks/cleaner.rb:21:in `block in run' /opt/theforeman/tfm/root/usr/share/gems/gems/foreman-tasks-0.12.1/lib/foreman_tasks/cleaner.rb:20:in `each' /opt/theforeman/tfm/root/usr/share/gems/gems/foreman-tasks-0.12.1/lib/foreman_tasks/cleaner.rb:20:in `run' /opt/theforeman/tfm/root/usr/share/gems/gems/foreman-tasks-0.12.1/lib/foreman_tasks/tasks/cleanup.rake:37:in `block (3 levels) in <top (required)>'
Actions