Project

General

Profile

Actions

Bug #17703

closed

"Wrong Number of Arguments" Upgrading From 3.2 to 3.2.1

Added by Jason Nance almost 8 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Installer
Target version:
Difficulty:
trivial
Triaged:
Fixed in Releases:
Found in Releases:

Description

Upgrading from Katello 3.2 to 3.2.1 yields the following error:

# foreman-installer --scenario katello --upgrade --verbose
[ INFO 2016-12-15 19:01:26 verbose] Executing hooks in group pre_migrations
[ INFO 2016-12-15 19:01:26 verbose] All hooks in group pre_migrations finished
[ INFO 2016-12-15 19:01:26 verbose] Executing hooks in group boot
[ INFO 2016-12-15 19:01:26 verbose] All hooks in group boot finished
[ INFO 2016-12-15 19:01:26 verbose] Executing hooks in group init
[ INFO 2016-12-15 19:01:26 verbose] All hooks in group init finished
[ INFO 2016-12-15 19:01:26 verbose] Loading default values from puppet modules...
[ INFO 2016-12-15 19:01:26 verbose] ... finished
[ INFO 2016-12-15 19:01:26 verbose] Executing hooks in group pre_values
[ INFO 2016-12-15 19:01:26 verbose] All hooks in group pre_values finished
[ INFO 2016-12-15 19:01:26 verbose] Executing hooks in group pre_validations
[ INFO 2016-12-15 19:01:26 verbose] All hooks in group pre_validations finished
[ INFO 2016-12-15 19:01:26 verbose] Running validation checks
[ INFO 2016-12-15 19:01:26 verbose] Executing hooks in group pre_commit
[ INFO 2016-12-15 19:01:26 verbose] All hooks in group pre_commit finished
[ INFO 2016-12-15 19:01:26 verbose] Executing hooks in group pre
Upgrading...
[ INFO 2016-12-15 19:01:26 verbose] Upgrading...
Upgrade Step: stop_services...
[ INFO 2016-12-15 19:01:26 verbose] Upgrade Step: stop_services...
Redirecting to /bin/systemctl stop  foreman-tasks.service

Redirecting to /bin/systemctl stop  httpd.service

Redirecting to /bin/systemctl stop  pulp_workers.service

Redirecting to /bin/systemctl stop  foreman-proxy.service

Redirecting to /bin/systemctl stop  pulp_streamer.service

Redirecting to /bin/systemctl stop  pulp_resource_manager.service

Redirecting to /bin/systemctl stop  pulp_celerybeat.service

Redirecting to /bin/systemctl stop  smart_proxy_dynflow_core.service

Redirecting to /bin/systemctl stop  tomcat.service

Redirecting to /bin/systemctl stop  squid.service

Redirecting to /bin/systemctl stop  qdrouterd.service

Redirecting to /bin/systemctl stop  qpidd.service

Success!

Upgrade Step: start_databases...
[ INFO 2016-12-15 19:01:38 verbose] Upgrade Step: start_databases...
Redirecting to /bin/systemctl start  mongod.service

Redirecting to /bin/systemctl start  postgresql.service

Success!

Upgrade Step: update_http_conf...
[ INFO 2016-12-15 19:01:48 verbose] Upgrade Step: update_http_conf...

Upgrade Step: migrate_pulp...
[ INFO 2016-12-15 19:01:48 verbose] Upgrade Step: migrate_pulp...

1492

Attempting to connect to localhost:27017
Attempting to connect to localhost:27017
Write concern for Mongo connection: {}
Loading content types.
Loading type descriptors []
Parsing type descriptors
Validating type descriptor syntactic integrity
Validating type descriptor semantic integrity
Loading unit model: docker_blob = pulp_docker.plugins.models:Blob
Loading unit model: docker_manifest = pulp_docker.plugins.models:Manifest
Loading unit model: docker_image = pulp_docker.plugins.models:Image
Loading unit model: docker_tag = pulp_docker.plugins.models:Tag
Loading unit model: puppet_module = pulp_puppet.plugins.db.models:Module
Loading unit model: erratum = pulp_rpm.plugins.db.models:Errata
Loading unit model: distribution = pulp_rpm.plugins.db.models:Distribution
Loading unit model: srpm = pulp_rpm.plugins.db.models:SRPM
Loading unit model: package_group = pulp_rpm.plugins.db.models:PackageGroup
Loading unit model: package_category = pulp_rpm.plugins.db.models:PackageCategory
Loading unit model: iso = pulp_rpm.plugins.db.models:ISO
Loading unit model: package_environment = pulp_rpm.plugins.db.models:PackageEnvironment
Loading unit model: drpm = pulp_rpm.plugins.db.models:DRPM
Loading unit model: package_langpacks = pulp_rpm.plugins.db.models:PackageLangpacks
Loading unit model: rpm = pulp_rpm.plugins.db.models:RPM
Loading unit model: yum_repo_metadata_file = pulp_rpm.plugins.db.models:YumMetadataFile
Updating the database with types []
Found the following type definitions that were not present in the update collection [puppet_module, docker_tag, docker_manifest, docker_blob, erratum, distribution, yum_repo_metadata_file, package_group, package_category, iso, package_environment, drpm, package_langpacks, rpm, srpm, docker_image]
Updating the database with types [puppet_module, drpm, package_langpacks, erratum, docker_blob, docker_manifest, yum_repo_metadata_file, package_group, package_category, iso, package_environment, docker_tag, distribution, rpm, srpm, docker_image]
Content types loaded.
Ensuring the admin role and user are in place.
Admin role and user are in place.
Beginning database migrations.
Migration package pulp.server.db.migrations is up to date at version 24
Migration package pulp_docker.plugins.migrations is up to date at version 2
Migration package pulp_puppet.plugins.migrations is up to date at version 5
Migration package pulp_rpm.plugins.migrations is up to date at version 35
Loading unit model: docker_blob = pulp_docker.plugins.models:Blob
Loading unit model: docker_manifest = pulp_docker.plugins.models:Manifest
Loading unit model: docker_image = pulp_docker.plugins.models:Image
Loading unit model: docker_tag = pulp_docker.plugins.models:Tag
Loading unit model: puppet_module = pulp_puppet.plugins.db.models:Module
Loading unit model: erratum = pulp_rpm.plugins.db.models:Errata
Loading unit model: distribution = pulp_rpm.plugins.db.models:Distribution
Loading unit model: srpm = pulp_rpm.plugins.db.models:SRPM
Loading unit model: package_group = pulp_rpm.plugins.db.models:PackageGroup
Loading unit model: package_category = pulp_rpm.plugins.db.models:PackageCategory
Loading unit model: iso = pulp_rpm.plugins.db.models:ISO
Loading unit model: package_environment = pulp_rpm.plugins.db.models:PackageEnvironment
Loading unit model: drpm = pulp_rpm.plugins.db.models:DRPM
Loading unit model: package_langpacks = pulp_rpm.plugins.db.models:PackageLangpacks
Loading unit model: rpm = pulp_rpm.plugins.db.models:RPM
Loading unit model: yum_repo_metadata_file = pulp_rpm.plugins.db.models:YumMetadataFile
Database migrations complete.

Upgrade Step: start_httpd...
[ INFO 2016-12-15 19:01:50 verbose] Upgrade Step: start_httpd...
Redirecting to /bin/systemctl start  httpd.service

Success!

Upgrade Step: start_qpidd...
[ INFO 2016-12-15 19:01:55 verbose] Upgrade Step: start_qpidd...
Redirecting to /bin/systemctl start  qpidd.service

Redirecting to /bin/systemctl start  qdrouterd.service

Success!

Upgrade Step: start_pulp...
[ INFO 2016-12-15 19:01:55 verbose] Upgrade Step: start_pulp...
Redirecting to /bin/systemctl start  pulp_celerybeat.service

Redirecting to /bin/systemctl start  pulp_resource_manager.service

Redirecting to /bin/systemctl start  pulp_workers.service

Success!

/usr/share/katello-installer-base/hooks/pre/30-upgrade.rb:84:in `upgrade_step': wrong number of arguments (2 for 1) (ArgumentError)
        from /usr/share/katello-installer-base/hooks/pre/30-upgrade.rb:125:in `block (4 levels) in load'
        from /usr/share/gems/gems/kafo-0.9.8/lib/kafo/hooking.rb:34:in `instance_eval'
        from /usr/share/gems/gems/kafo-0.9.8/lib/kafo/hooking.rb:34:in `block (4 levels) in load'
        from /usr/share/gems/gems/kafo-0.9.8/lib/kafo/hook_context.rb:13:in `instance_exec'
        from /usr/share/gems/gems/kafo-0.9.8/lib/kafo/hook_context.rb:13:in `execute'
        from /usr/share/gems/gems/kafo-0.9.8/lib/kafo/hooking.rb:51:in `block in execute'
        from /usr/share/gems/gems/kafo-0.9.8/lib/kafo/hooking.rb:49:in `each'
        from /usr/share/gems/gems/kafo-0.9.8/lib/kafo/hooking.rb:49:in `execute'
        from /usr/share/gems/gems/kafo-0.9.8/lib/kafo/kafo_configure.rb:408:in `run_installation'
        from /usr/share/gems/gems/kafo-0.9.8/lib/kafo/kafo_configure.rb:147:in `execute'
        from /usr/share/gems/gems/clamp-1.0.0/lib/clamp/command.rb:68:in `run'
        from /usr/share/gems/gems/clamp-1.0.0/lib/clamp/command.rb:133:in `run'
        from /usr/share/gems/gems/kafo-0.9.8/lib/kafo/kafo_configure.rb:154:in `run'
        from /sbin/foreman-installer:8:in `<main>'

RPMs updated to were:

  foreman-installer-katello.noarch 0:3.2.2-2.el7
  katello.noarch 0:3.2.1-1.el7
  katello-common.noarch 0:3.2.1-1.el7
  katello-debug.noarch 0:3.2.1-1.el7
  katello-installer-base.noarch 0:3.2.2-2.el7
  katello-service.noarch 0:3.2.1-1.el7
  tfm-rubygem-hammer_cli_katello.noarch 0:0.1.3-1.el7
  tfm-rubygem-katello.noarch 0:3.2.1.1-1.el7
Actions #1

Updated by Pascal Pascher almost 8 years ago

I have the same issue.

Line 125 in "usr/share/katello-installer-base/hooks/pre/30-upgrade.rb" reads:

upgrade_step :migrate_candlepin, :run_always => true

":run_always => true" seems to be a remnant of the previous 30-upgrade.rb where every upgrade_step had a ":run_always" or ":long_running" option passed. With the 3.2.1 30-upgrade.rb ":migrate_candlepin" is the only upgrade_step with an option and since the function only takes one argument this results in the error seen.

Deleting ", :run_always => true" lets the upgrade continue.

Actions #2

Updated by Anonymous almost 8 years ago

  • Project changed from Installer to Katello
  • Category set to Installer
Actions #3

Updated by Jason Nance almost 8 years ago

If I apply that change and attempt to re-run the upgrade I get further, but things blow up:

Upgrade Step: db_seed...
rake aborted!
RestClient::ResourceNotFound: 404 Resource Not Found
/opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-1.8.0/lib/restclient/abstract_response.rb:74:in `return!'
/opt/theforeman/tfm/root/usr/share/gems/gems/runcible-1.9.0/lib/runcible/base.rb:79:in `block in get_response'
/opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-1.8.0/lib/restclient/request.rb:493:in `call'
/opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-1.8.0/lib/restclient/request.rb:493:in `process_result'
/opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-1.8.0/lib/restclient/request.rb:421:in `block in transmit'
/opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-1.8.0/lib/restclient/request.rb:413:in `transmit'
/opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-1.8.0/lib/restclient/request.rb:176:in `execute'
/opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-1.8.0/lib/restclient/request.rb:41:in `execute'
/opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-1.8.0/lib/restclient/resource.rb:51:in `get'
/opt/theforeman/tfm/root/usr/share/gems/gems/runcible-1.9.0/lib/runcible/base.rb:78:in `get_response'
/opt/theforeman/tfm/root/usr/share/gems/gems/runcible-1.9.0/lib/runcible/base.rb:66:in `call'
/opt/theforeman/tfm/root/usr/share/gems/gems/runcible-1.9.0/lib/runcible/resources/event_notifier.rb:48:in `list'
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.2.1.1/app/models/katello/glue/pulp/repo.rb:32:in `ensure_sync_notification'
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.2.1.1/db/seeds.d/108-ensure_sync_notification.rb:9:in `<top (required)>'
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/dependencies.rb:268:in `load'
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/dependencies.rb:268:in `block in load'
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/dependencies.rb:240:in `load_dependency'
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/dependencies.rb:268:in `load'
/usr/share/foreman/db/seeds.rb:81:in `block in <top (required)>'
/usr/share/foreman/db/seeds.rb:79:in `each'
/usr/share/foreman/db/seeds.rb:79:in `<top (required)>'
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/dependencies.rb:268:in `load'
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/dependencies.rb:268:in `block in load'
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/dependencies.rb:240:in `load_dependency'
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/dependencies.rb:268:in `load'
/opt/rh/sclo-ror42/root/usr/share/gems/gems/railties-4.2.5.1/lib/rails/engine.rb:547:in `load_seed'
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/active_record/tasks/database_tasks.rb:250:in `load_seed'
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/active_record/railties/databases.rake:183:in `block (2 levels) in <top (required)>'
Tasks: TOP => db:seed
(See full trace by running task with --trace)
Seeding /usr/share/foreman/db/seeds.d/03-auth_sources.rb
Seeding /usr/share/foreman/db/seeds.d/03-permissions.rb
Seeding /usr/share/foreman/db/seeds.d/03-roles.rb
Seeding /usr/share/foreman/db/seeds.d/04-admin.rb
Seeding /usr/share/foreman/db/seeds.d/05-taxonomies.rb
Seeding /usr/share/foreman/db/seeds.d/06-architectures.rb
Seeding /usr/share/foreman/db/seeds.d/07-provisioning_templates.rb
Seeding /usr/share/foreman/db/seeds.d/08-partition_tables.rb
Seeding /usr/share/foreman/db/seeds.d/10-installation_media.rb
Seeding /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.2.1.1/db/seeds.d/101-locations.rb
Seeding /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.2.1.1/db/seeds.d/102-organizations.rb
Seeding /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.2.1.1/db/seeds.d/103-provisioning_templates.rb
Seeding /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.2.1.1/db/seeds.d/104-proxy.rb
Seeding /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.2.1.1/db/seeds.d/106-mail_notifications.rb
Seeding /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.2.1.1/db/seeds.d/107-enable_dynflow.rb
Seeding /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.2.1.1/db/seeds.d/108-ensure_sync_notification.rb

Upgrade step db_seed failed. Check logs for more information.

I'm guessing these are two different issues, but wanted to provide the feedback.

Actions #4

Updated by Pascal Pascher almost 8 years ago

Jason Nance, I got stuck with the same error but found a solution that worked for me - see http://projects.theforeman.org/issues/17722. Hope it helps.

Actions #5

Updated by Jason Nance almost 8 years ago

I think this ticket can be marked as a duplicate of 17722 (or vice versa).

The two commits referenced by John Mitsch on the mailing list:

https://github.com/Katello/katello-installer/pull/456/commits/5624de07a7778246c4a8d7d81f8ba2586a172332
https://github.com/Katello/katello-installer/pull/456/commits/1198c19194b6d01c3519452060b7de727deba229

...mostly resolve the issue. After applying those and starting the --upgrade I have to watch /etc/httpd/conf.d for pulp.conf to show up and restart httpd quickly, otherwise the process fails.

Actions #6

Updated by Justin Sherrill almost 8 years ago

  • Status changed from New to Closed
  • Assignee set to John Mitsch
  • Translation missing: en.field_release set to 208
  • Difficulty set to trivial
  • Pull request https://github.com/Katello/katello-installer/pull/456 added
Actions #7

Updated by Jason Nance almost 8 years ago

Do we need to open a separate issue for the "httpd isn't restarting when pulp.conf is being created" part of this issue or did a different change resolve that?

Actions

Also available in: Atom PDF