Project

General

Profile

Actions

Bug #36101

closed

New foreman install gives 'malformed format string - %(' when deleting a node

Added by Craig Huckabee over 1 year ago. Updated over 1 year ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Difficulty:
Triaged:
No
Fixed in Releases:
Found in Releases:

Description

HostOS: RHEL8
Foreman Version - 3.5.1
ForeMan plugins:
puppetdb
default_hostgroup
puppet

Backtrace from log:
2023-02-14T20:15:04 [I|app|5662c8e2] Deactivating node in PuppetDB: m0007 (m0007)
2023-02-14T20:15:04 [W|app|5662c8e2] Deactivating node m0007 in PuppetDB task failed with the following error: malformed format string - %(
2023-02-14T20:15:04 [I|app|5662c8e2] Backtrace for 'Deactivating node m0007 in PuppetDB task failed with the following error: malformed format string - %(' error (ArgumentError): malformed format string - %(
5662c8e2 | /usr/share/gems/gems/puppetdb_foreman-6.0.1/app/models/concerns/orchestration/puppetdb.rb:26:in `format'
5662c8e2 | /usr/share/gems/gems/puppetdb_foreman-6.0.1/app/models/concerns/orchestration/puppetdb.rb:26:in `rescue in del_puppetdb'
5662c8e2 | /usr/share/gems/gems/puppetdb_foreman-6.0.1/app/models/concerns/orchestration/puppetdb.rb:22:in `del_puppetdb'
5662c8e2 | /usr/share/foreman/app/models/concerns/orchestration.rb:227:in `execute'
5662c8e2 | /usr/share/foreman/app/models/concerns/orchestration.rb:152:in `block in process'
5662c8e2 | /usr/share/foreman/app/models/concerns/orchestration.rb:144:in `each'
5662c8e2 | /usr/share/foreman/app/models/concerns/orchestration.rb:144:in `process'
5662c8e2 | /usr/share/foreman/app/models/concerns/orchestration.rb:60:in `on_destroy'
5662c8e2 | /usr/share/gems/gems/activesupport-6.1.7/lib/active_support/callbacks.rb:427:in `block in make_lambda'
5662c8e2 | /usr/share/gems/gems/activesupport-6.1.7/lib/active_support/callbacks.rb:235:in `block in halting_and_conditional'
5662c8e2 | /usr/share/gems/gems/activesupport-6.1.7/lib/active_support/callbacks.rb:516:in `block in invoke_after'
5662c8e2 | /usr/share/gems/gems/activesupport-6.1.7/lib/active_support/callbacks.rb:516:in `each'
5662c8e2 | /usr/share/gems/gems/activesupport-6.1.7/lib/active_support/callbacks.rb:516:in `invoke_after'
5662c8e2 | /usr/share/gems/gems/activesupport-6.1.7/lib/active_support/callbacks.rb:107:in `run_callbacks'
5662c8e2 | /usr/share/gems/gems/activesupport-6.1.7/lib/active_support/callbacks.rb:824:in `_run_destroy_callbacks'
5662c8e2 | /usr/share/gems/gems/activerecord-6.1.7/lib/active_record/callbacks.rb:439:in `destroy'
5662c8e2 | /usr/share/gems/gems/activerecord-6.1.7/lib/active_record/transactions.rb:294:in `block in destroy'
5662c8e2 | /usr/share/gems/gems/activerecord-6.1.7/lib/active_record/transactions.rb:354:in `block in with_transaction_returning_status'
5662c8e2 | /usr/share/gems/gems/activerecord-6.1.7/lib/active_record/connection_adapters/abstract/database_statements.rb:320:in `block in transaction'
5662c8e2 | /usr/share/gems/gems/activerecord-6.1.7/lib/active_record/connection_adapters/abstract/transaction.rb:319:in `block in within_new_transaction'
5662c8e2 | /usr/share/gems/gems/activesupport-6.1.7/lib/active_support/concurrency/load_interlock_aware_monitor.rb:26:in `block (2 levels) in synchronize'
5662c8e2 | /usr/share/gems/gems/activesupport-6.1.7/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `handle_interrupt'
5662c8e2 | /usr/share/gems/gems/activesupport-6.1.7/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `block in synchronize'
5662c8e2 | /usr/share/gems/gems/activesupport-6.1.7/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `handle_interrupt'
5662c8e2 | /usr/share/gems/gems/activesupport-6.1.7/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `synchronize'
5662c8e2 | /usr/share/gems/gems/activerecord-6.1.7/lib/active_record/connection_adapters/abstract/transaction.rb:317:in `within_new_transaction'
5662c8e2 | /usr/share/gems/gems/activerecord-6.1.7/lib/active_record/connection_adapters/abstract/database_statements.rb:320:in `transaction'
5662c8e2 | /usr/share/gems/gems/activerecord-6.1.7/lib/active_record/transactions.rb:350:in `with_transaction_returning_status'
5662c8e2 | /usr/share/gems/gems/activerecord-6.1.7/lib/active_record/transactions.rb:294:in `destroy'
5662c8e2 | /usr/share/foreman/app/controllers/hosts_controller.rb:129:in `destroy'
5662c8e2 | /usr/share/gems/gems/actionpack-6.1.7/lib/action_controller/metal/basic_implicit_render.rb:6:in `send_action'
5662c8e2 | /usr/share/gems/gems/actionpack-6.1.7/lib/abstract_controller/base.rb:228:in `process_action'
5662c8e2 | /usr/share/gems/gems/actionpack-6.1.7/lib/action_controller/metal/rendering.rb:30:in `process_action'
5662c8e2 | /usr/share/gems/gems/actionpack-6.1.7/lib/abstract_controller/callbacks.rb:42:in `block in process_action'
5662c8e2 | /usr/share/gems/gems/activesupport-6.1.7/lib/active_support/callbacks.rb:117:in `block in run_callbacks'
5662c8e2 | /usr/share/foreman/app/controllers/concerns/foreman/controller/timezone.rb:10:in `set_timezone'
5662c8e2 | /usr/share/gems/gems/activesupport-6.1.7/lib/active_support/callbacks.rb:126:in `block in run_callbacks'
5662c8e2 | /usr/share/foreman/app/models/concerns/foreman/thread_session.rb:32:in `clear_thread'
5662c8e2 | /usr/share/gems/gems/activesupport-6.1.7/lib/active_support/callbacks.rb:126:in `block in run_callbacks'
5662c8e2 | /usr/share/foreman/app/controllers/concerns/foreman/controller/topbar_sweeper.rb:12:in `set_topbar_sweeper_controller'
5662c8e2 | /usr/share/gems/gems/activesupport-6.1.7/lib/active_support/callbacks.rb:126:in `block in run_callbacks'
5662c8e2 | /usr/share/gems/gems/audited-5.0.2/lib/audited/sweeper.rb:16:in `around'
5662c8e2 | /usr/share/gems/gems/activesupport-6.1.7/lib/active_support/callbacks.rb:126:in `block in run_callbacks'
5662c8e2 | /usr/share/gems/gems/audited-5.0.2/lib/audited/sweeper.rb:16:in `around'
5662c8e2 | /usr/share/gems/gems/activesupport-6.1.7/lib/active_support/callbacks.rb:126:in `block in run_callbacks'
5662c8e2 | /usr/share/gems/gems/activesupport-6.1.7/lib/active_support/callbacks.rb:137:in `run_callbacks'
5662c8e2 | /usr/share/gems/gems/actionpack-6.1.7/lib/abstract_controller/callbacks.rb:41:in `process_action'
5662c8e2 | /usr/share/gems/gems/actionpack-6.1.7/lib/action_controller/metal/rescue.rb:22:in `process_action'
5662c8e2 | /usr/share/gems/gems/actionpack-6.1.7/lib/action_controller/metal/instrumentation.rb:34:in `block in process_action'
5662c8e2 | /usr/share/gems/gems/activesupport-6.1.7/lib/active_support/notifications.rb:203:in `block in instrument'
5662c8e2 | /usr/share/gems/gems/activesupport-6.1.7/lib/active_support/notifications/instrumenter.rb:24:in `instrument'
5662c8e2 | /usr/share/gems/gems/activesupport-6.1.7/lib/active_support/notifications.rb:203:in `instrument'
5662c8e2 | /usr/share/gems/gems/actionpack-6.1.7/lib/action_controller/metal/instrumentation.rb:33:in `process_action'
5662c8e2 | /usr/share/gems/gems/actionpack-6.1.7/lib/action_controller/metal/params_wrapper.rb:249:in `process_action'
5662c8e2 | /usr/share/gems/gems/activerecord-6.1.7/lib/active_record/railties/controller_runtime.rb:27:in `process_action'
5662c8e2 | /usr/share/gems/gems/actionpack-6.1.7/lib/abstract_controller/base.rb:165:in `process'
5662c8e2 | /usr/share/gems/gems/actionview-6.1.7/lib/action_view/rendering.rb:39:in `process'
5662c8e2 | /usr/share/gems/gems/actionpack-6.1.7/lib/action_controller/metal.rb:190:in `dispatch'
5662c8e2 | /usr/share/gems/gems/actionpack-6.1.7/lib/action_controller/metal.rb:254:in `dispatch'
5662c8e2 | /usr/share/gems/gems/actionpack-6.1.7/lib/action_dispatch/routing/route_set.rb:50:in `dispatch'
5662c8e2 | /usr/share/gems/gems/actionpack-6.1.7/lib/action_dispatch/routing/route_set.rb:33:in `serve'
5662c8e2 | /usr/share/gems/gems/actionpack-6.1.7/lib/action_dispatch/journey/router.rb:50:in `block in serve'
5662c8e2 | /usr/share/gems/gems/actionpack-6.1.7/lib/action_dispatch/journey/router.rb:32:in `each'
5662c8e2 | /usr/share/gems/gems/actionpack-6.1.7/lib/action_dispatch/journey/router.rb:32:in `serve'
5662c8e2 | /usr/share/gems/gems/actionpack-6.1.7/lib/action_dispatch/routing/route_set.rb:842:in `call'
5662c8e2 | /usr/share/gems/gems/apipie-dsl-2.5.0/lib/apipie_dsl/static_dispatcher.rb:67:in `call'
5662c8e2 | /usr/share/gems/gems/apipie-rails-0.8.2/lib/apipie/static_dispatcher.rb:68:in `call'
5662c8e2 | /usr/share/gems/gems/apipie-rails-0.8.2/lib/apipie/extractor/recorder.rb:137:in `call'
5662c8e2 | /usr/share/gems/gems/actionpack-6.1.7/lib/action_dispatch/middleware/static.rb:24:in `call'
5662c8e2 | /usr/share/foreman/lib/foreman/middleware/libvirt_connection_cleaner.rb:9:in `call'
5662c8e2 | /usr/share/foreman/lib/foreman/middleware/telemetry.rb:10:in `call'
5662c8e2 | /usr/share/gems/gems/apipie-rails-0.8.2/lib/apipie/middleware/checksum_in_headers.rb:27:in `call'
5662c8e2 | /usr/share/gems/gems/rack-2.2.4/lib/rack/tempfile_reaper.rb:15:in `call'
5662c8e2 | /usr/share/gems/gems/rack-2.2.4/lib/rack/etag.rb:27:in `call'
5662c8e2 | /usr/share/gems/gems/rack-2.2.4/lib/rack/conditional_get.rb:40:in `call'
5662c8e2 | /usr/share/gems/gems/rack-2.2.4/lib/rack/head.rb:12:in `call'
5662c8e2 | /usr/share/gems/gems/actionpack-6.1.7/lib/action_dispatch/http/permissions_policy.rb:22:in `call'
5662c8e2 | /usr/share/gems/gems/actionpack-6.1.7/lib/action_dispatch/http/content_security_policy.rb:19:in `call'
5662c8e2 | /usr/share/foreman/lib/foreman/middleware/logging_context_session.rb:22:in `call'
5662c8e2 | /usr/share/gems/gems/rack-2.2.4/lib/rack/session/abstract/id.rb:266:in `context'
5662c8e2 | /usr/share/gems/gems/rack-2.2.4/lib/rack/session/abstract/id.rb:260:in `call'
5662c8e2 | /usr/share/gems/gems/actionpack-6.1.7/lib/action_dispatch/middleware/cookies.rb:689:in `call'
5662c8e2 | /usr/share/gems/gems/actionpack-6.1.7/lib/action_dispatch/middleware/callbacks.rb:27:in `block in call'
5662c8e2 | /usr/share/gems/gems/activesupport-6.1.7/lib/active_support/callbacks.rb:98:in `run_callbacks'
5662c8e2 | /usr/share/gems/gems/actionpack-6.1.7/lib/action_dispatch/middleware/callbacks.rb:26:in `call'
5662c8e2 | /usr/share/gems/gems/actionpack-6.1.7/lib/action_dispatch/middleware/actionable_exceptions.rb:18:in `call'
5662c8e2 | /usr/share/gems/gems/actionpack-6.1.7/lib/action_dispatch/middleware/debug_exceptions.rb:29:in `call'
5662c8e2 | /usr/share/gems/gems/actionpack-6.1.7/lib/action_dispatch/middleware/show_exceptions.rb:33:in `call'
5662c8e2 | /usr/share/gems/gems/railties-6.1.7/lib/rails/rack/logger.rb:37:in `call_app'
5662c8e2 | /usr/share/gems/gems/railties-6.1.7/lib/rails/rack/logger.rb:28:in `call'
5662c8e2 | /usr/share/gems/gems/sprockets-rails-3.4.2/lib/sprockets/rails/quiet_assets.rb:13:in `call'
5662c8e2 | /usr/share/foreman/lib/foreman/middleware/logging_context_request.rb:11:in `call'
5662c8e2 | /usr/share/gems/gems/actionpack-6.1.7/lib/action_dispatch/middleware/remote_ip.rb:81:in `call'
5662c8e2 | /usr/share/gems/gems/actionpack-6.1.7/lib/action_dispatch/middleware/request_id.rb:26:in `call'
5662c8e2 | /usr/share/gems/gems/rack-2.2.4/lib/rack/method_override.rb:24:in `call'
5662c8e2 | /usr/share/gems/gems/rack-2.2.4/lib/rack/runtime.rb:22:in `call'
5662c8e2 | /usr/share/gems/gems/activesupport-6.1.7/lib/active_support/cache/strategy/local_cache_middleware.rb:29:in `call'
5662c8e2 | /usr/share/gems/gems/actionpack-6.1.7/lib/action_dispatch/middleware/executor.rb:14:in `call'
5662c8e2 | /usr/share/gems/gems/rack-2.2.4/lib/rack/sendfile.rb:110:in `call'
5662c8e2 | /usr/share/gems/gems/actionpack-6.1.7/lib/action_dispatch/middleware/ssl.rb:77:in `call'
5662c8e2 | /usr/share/gems/gems/actionpack-6.1.7/lib/action_dispatch/middleware/host_authorization.rb:142:in `call'
5662c8e2 | /usr/share/gems/gems/secure_headers-6.5.0/lib/secure_headers/middleware.rb:11:in `call'
5662c8e2 | /usr/share/gems/gems/railties-6.1.7/lib/rails/engine.rb:539:in `call'
5662c8e2 | /usr/share/gems/gems/railties-6.1.7/lib/rails/railtie.rb:207:in `public_send'
5662c8e2 | /usr/share/gems/gems/railties-6.1.7/lib/rails/railtie.rb:207:in `method_missing'
5662c8e2 | /usr/share/gems/gems/rack-2.2.4/lib/rack/urlmap.rb:74:in `block in call'
5662c8e2 | /usr/share/gems/gems/rack-2.2.4/lib/rack/urlmap.rb:58:in `each'
5662c8e2 | /usr/share/gems/gems/rack-2.2.4/lib/rack/urlmap.rb:58:in `call'
5662c8e2 | /usr/share/gems/gems/puma-5.6.5/lib/puma/configuration.rb:252:in `call'
5662c8e2 | /usr/share/gems/gems/puma-5.6.5/lib/puma/request.rb:77:in `block in handle_request'
5662c8e2 | /usr/share/gems/gems/puma-5.6.5/lib/puma/thread_pool.rb:340:in `with_force_shutdown'
5662c8e2 | /usr/share/gems/gems/puma-5.6.5/lib/puma/request.rb:76:in `handle_request'
5662c8e2 | /usr/share/gems/gems/puma-5.6.5/lib/puma/server.rb:443:in `process_client'
5662c8e2 | /usr/share/gems/gems/puma-5.6.5/lib/puma/thread_pool.rb:147:in `block in spawn_thread'
5662c8e2 | /usr/share/gems/gems/logging-2.3.1/lib/logging/diagnostic_context.rb:474:in `block in create_with_logging_context'
2023-02-14T20:15:04 [W|app|5662c8e2] Rolling back due to a problem: [#<Orchestration::Task:0x00005568cdf2d588 @name="Deactivating node m0007 in PuppetDB", @id="Deactivating node m0007 in PuppetDB", @status="failed", @priority=60, @action=[#<Host::Managed id: 2, name: "m0007", last_compile: nil, last_report: [FILTERED], updated_at: "2023-02-14 15:14:50.212225000 -0500", created_at: "2023-02-14 15:01:08.141615000 -0500", root_pass: nil, architecture_id: nil, operatingsystem_id: nil, ptable_id: nil, medium_id: nil, build: false, comment: nil, disk: nil, installed_at: nil, model_id: nil, hostgroup_id: nil, owner_id: nil, owner_type: nil, enabled: true, puppet_ca_proxy_id: nil, managed: false, use_image: nil, image_file: nil, uuid: nil, compute_resource_id: nil, puppet_proxy_id: nil, certname: nil, image_id: nil, organization_id: nil, location_id: nil, type: "Host::Managed", otp: nil, realm_id: nil, compute_profile_id: nil, provision_method: nil, grub_pass: nil, global_status: 0, lookup_value_matcher: [FILTERED], pxe_loader: nil, initiated_at: nil, build_errors: nil>, :del_puppetdb], @created=1676405704.0948648, @timestamp=2023-02-14 20:15:04.100305613 UTC>]
2023-02-14T20:15:04 [E|app|5662c8e2] Failed to save: Deactivating node m0007 in PuppetDB task failed with the following error: malformed format string - %(

Actions #1

Updated by Craig Huckabee over 1 year ago

  • Found in Releases 3.5.1 added

Direct Curl attempt to delete node gives:

{
"error": {"id":2,"errors":{"base":["Deactivating node m0007 in PuppetDB task failed with the following error: malformed format string - %("]},"full_messages":["Deactivating node m0007 in PuppetDB task failed with the following error: malformed format string - %("]}
}

Actions

Also available in: Atom PDF