If it is in iteration 9, the last occurrence must not be empty.
All the information I sent you in the previous message was taken directly from the Foreman server via the command line using the hammer command. Therefore, the fields without information were presented by the Foreman system itself, that is, it does not have this information saved.
When you look at the details, what is the start at date and time?
As I explained in the previous answer, when we create a synchronization plan, Foreman creates the recurrence plan and also creates a task with scheduled status. When the sync plan is executed, then in Foreman’s task list, we will have a specific task for the sp_rocky_linux9 sync plan. What happens is that the schedule is not being executed or invoked.
This is not surprising. When tasks run (and that’s what we’re looking for), their state updates don’t actually mention the sync plan name.
Exactly, the plans are not being executed according to the schedule made. And the logs for the month of June, when the last sync plan execution occurred, are no longer available due to log rotation.
This is quite strange.
Here is the same situation, as the sync plans are not being executed, we have no traces in the logs or in journalctl. When I run the plan sync manually, it happens successfully.
What appears in /var/log/foreman/production.log when you receive this?
When I try to disable the sp_rocky_linux9 sync plan via the web interface.
An error occurred saving the Sync Plan: undefined method `frozen=’ for nil:NilClass
When I try to change the start date of the sp_rocky_linux9 sync plan via the web interface.
An error occurred saving the Sync Plan: undefined method `cancel’ for nil:NilClass
See below the log excerpt from production.log when I tried to perform the operations described above.
2024-07-16T12:56:34 [I|app|163eaaee] Started PUT "/katello/api/v2/organizations/4/sync_plans/9" for 172.28.16.32 at 2024-07-16 12:56:34 -0300
2024-07-16T12:56:34 [I|app|163eaaee] Processing by Katello::Api::V2::SyncPlansController#update as HTML
2024-07-16T12:56:34 [I|app|163eaaee] Parameters: {"id"=>"9", "organization_id"=>"4", "name"=>"sp_rocky_linux9", "description"=>"Repos para o Produto Rocky Linux 9", "interval"=>"daily", "next_sync"=>"2024-06-26 22:30:00 -0300", "sync_date"=>"Wednesday, July 17, 2024 at 10:30:00 PM", "created_at"=>"2024-06-17 15:00:39 -0300", "updated_at"=>"2024-06-18 12:54:30 -0300", "enabled"=>true, "foreman_tasks_recurring_logic_id"=>46, "cron_expression"=>nil, "products"=>[{"id"=>35, "cp_id"=>"878577181345", "name"=>"Rocky Linux 9", "label"=>"rocky_linux_9", "description"=>"Distribuição Linux downstream compatível com RHEL", "sync_state"=>"Syncing Complete.", "last_sync"=>"2024-07-12 14:21:35 -0300", "last_sync_words"=>"4 days", "repository_count"=>45}], "permissions"=>{"view_sync_plans"=>true, "edit_sync_plans"=>true, "destroy_sync_plans"=>true}, "syncDate"=>"2024-07-18T01:30:00.000Z", "syncTime"=>"2024-06-19T01:30:00.000Z", "api_version"=>"v2", "sync_plan"=>{"id"=>"9", "name"=>"sp_rocky_linux9", "description"=>"Repos para o Produto Rocky Linux 9", "sync_date"=>"Wednesday, July 17, 2024 at 10:30:00 PM", "interval"=>"daily", "organization_id"=>"4", "created_at"=>"2024-06-17 15:00:39 -0300", "updated_at"=>"2024-06-18 12:54:30 -0300", "foreman_tasks_recurring_logic_id"=>46, "cron_expression"=>nil}}
2024-07-16T12:56:34 [I|aud|163eaaee] Katello::SyncPlan (9) update event on sync_date 2024-06-18 22:30:00 -0300, 2024-07-17 22:30:00 -0300
2024-07-16T12:56:34 [I|aud|163eaaee] Katello::SyncPlan (9) update event on foreman_tasks_recurring_logic_id 46, 56
2024-07-16T12:56:34 [E|app|163eaaee] NoMethodError: undefined method `cancel' for nil:NilClass
163eaaee | /usr/share/gems/gems/dynflow-1.8.3/lib/dynflow/execution_plan.rb:311:in `block in cancel'
163eaaee | /usr/share/gems/gems/dynflow-1.8.3/lib/dynflow/execution_plan.rb:311:in `tap'
163eaaee | /usr/share/gems/gems/dynflow-1.8.3/lib/dynflow/execution_plan.rb:311:in `cancel'
163eaaee | /usr/share/gems/gems/foreman-tasks-9.1.1/app/models/foreman_tasks/task/dynflow_task.rb:32:in `cancel'
163eaaee | /usr/share/gems/gems/activerecord-6.1.7.8/lib/active_record/relation/delegation.rb:88:in `each'
163eaaee | /usr/share/gems/gems/activerecord-6.1.7.8/lib/active_record/relation/delegation.rb:88:in `each'
163eaaee | /usr/share/gems/gems/foreman-tasks-9.1.1/app/models/foreman_tasks/recurring_logic.rb:95:in `cancel'
163eaaee | /usr/share/gems/gems/katello-4.12.1/app/models/katello/sync_plan.rb:87:in `block in update_attributes_with_logics!'
163eaaee | /usr/share/gems/gems/activerecord-6.1.7.8/lib/active_record/connection_adapters/abstract/database_statements.rb:320:in `block in transaction'
163eaaee | /usr/share/gems/gems/activerecord-6.1.7.8/lib/active_record/connection_adapters/abstract/transaction.rb:319:in `block in within_new_transaction'
163eaaee | /usr/share/gems/gems/activesupport-6.1.7.8/lib/active_support/concurrency/load_interlock_aware_monitor.rb:26:in `block (2 levels) in synchronize'
163eaaee | /usr/share/gems/gems/activesupport-6.1.7.8/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `handle_interrupt'
163eaaee | /usr/share/gems/gems/activesupport-6.1.7.8/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `block in synchronize'
163eaaee | /usr/share/gems/gems/activesupport-6.1.7.8/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `handle_interrupt'
163eaaee | /usr/share/gems/gems/activesupport-6.1.7.8/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `synchronize'
163eaaee | /usr/share/gems/gems/activerecord-6.1.7.8/lib/active_record/connection_adapters/abstract/transaction.rb:317:in `within_new_transaction'
163eaaee | /usr/share/gems/gems/activerecord-6.1.7.8/lib/active_record/connection_adapters/abstract/database_statements.rb:320:in `transaction'
163eaaee | /usr/share/gems/gems/activerecord-6.1.7.8/lib/active_record/transactions.rb:209:in `transaction'
163eaaee | /usr/share/gems/gems/activerecord-6.1.7.8/lib/active_record/transactions.rb:290:in `transaction'
163eaaee | /usr/share/gems/gems/katello-4.12.1/app/models/katello/sync_plan.rb:77:in `update_attributes_with_logics!'
163eaaee | /usr/share/gems/gems/katello-4.12.1/app/controllers/katello/api/v2/sync_plans_controller.rb:79:in `update'
163eaaee | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_controller/metal/basic_implicit_render.rb:6:in `send_action'
163eaaee | /usr/share/gems/gems/actionpack-6.1.7.8/lib/abstract_controller/base.rb:228:in `process_action'
163eaaee | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_controller/metal/rendering.rb:30:in `process_action'
163eaaee | /usr/share/gems/gems/actionpack-6.1.7.8/lib/abstract_controller/callbacks.rb:42:in `block in process_action'
163eaaee | /usr/share/gems/gems/activesupport-6.1.7.8/lib/active_support/callbacks.rb:117:in `block in run_callbacks'
163eaaee | /usr/share/foreman/app/controllers/concerns/foreman/controller/timezone.rb:10:in `set_timezone'
163eaaee | /usr/share/gems/gems/activesupport-6.1.7.8/lib/active_support/callbacks.rb:126:in `block in run_callbacks'
163eaaee | /usr/share/foreman/app/models/concerns/foreman/thread_session.rb:32:in `clear_thread'
163eaaee | /usr/share/gems/gems/activesupport-6.1.7.8/lib/active_support/callbacks.rb:126:in `block in run_callbacks'
163eaaee | /usr/share/foreman/app/controllers/concerns/foreman/controller/topbar_sweeper.rb:12:in `set_topbar_sweeper_controller'
163eaaee | /usr/share/gems/gems/activesupport-6.1.7.8/lib/active_support/callbacks.rb:126:in `block in run_callbacks'
163eaaee | /usr/share/gems/gems/audited-5.4.3/lib/audited/sweeper.rb:16:in `around'
163eaaee | /usr/share/gems/gems/activesupport-6.1.7.8/lib/active_support/callbacks.rb:126:in `block in run_callbacks'
163eaaee | /usr/share/gems/gems/audited-5.4.3/lib/audited/sweeper.rb:16:in `around'
163eaaee | /usr/share/gems/gems/activesupport-6.1.7.8/lib/active_support/callbacks.rb:126:in `block in run_callbacks'
163eaaee | /usr/share/gems/gems/activesupport-6.1.7.8/lib/active_support/callbacks.rb:137:in `run_callbacks'
163eaaee | /usr/share/gems/gems/actionpack-6.1.7.8/lib/abstract_controller/callbacks.rb:41:in `process_action'
163eaaee | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_controller/metal/rescue.rb:22:in `process_action'
163eaaee | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_controller/metal/instrumentation.rb:34:in `block in process_action'
163eaaee | /usr/share/gems/gems/activesupport-6.1.7.8/lib/active_support/notifications.rb:203:in `block in instrument'
163eaaee | /usr/share/gems/gems/activesupport-6.1.7.8/lib/active_support/notifications/instrumenter.rb:24:in `instrument'
163eaaee | /usr/share/gems/gems/activesupport-6.1.7.8/lib/active_support/notifications.rb:203:in `instrument'
163eaaee | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_controller/metal/instrumentation.rb:33:in `process_action'
163eaaee | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_controller/metal/params_wrapper.rb:249:in `process_action'
163eaaee | /usr/share/gems/gems/activerecord-6.1.7.8/lib/active_record/railties/controller_runtime.rb:27:in `process_action'
163eaaee | /usr/share/gems/gems/katello-4.12.1/app/controllers/katello/concerns/api/api_controller.rb:46:in `process_action'
163eaaee | /usr/share/gems/gems/actionpack-6.1.7.8/lib/abstract_controller/base.rb:165:in `process'
163eaaee | /usr/share/gems/gems/actionview-6.1.7.8/lib/action_view/rendering.rb:39:in `process'
163eaaee | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_controller/metal.rb:190:in `dispatch'
163eaaee | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_controller/metal.rb:254:in `dispatch'
163eaaee | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_dispatch/routing/route_set.rb:50:in `dispatch'
163eaaee | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_dispatch/routing/route_set.rb:33:in `serve'
163eaaee | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_dispatch/routing/mapper.rb:19:in `block in <class:Constraints>'
163eaaee | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_dispatch/routing/mapper.rb:49:in `serve'
163eaaee | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_dispatch/journey/router.rb:50:in `block in serve'
163eaaee | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_dispatch/journey/router.rb:32:in `each'
163eaaee | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_dispatch/journey/router.rb:32:in `serve'
163eaaee | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_dispatch/routing/route_set.rb:842:in `call'
163eaaee | /usr/share/gems/gems/railties-6.1.7.8/lib/rails/engine.rb:539:in `call'
163eaaee | /usr/share/gems/gems/railties-6.1.7.8/lib/rails/railtie.rb:207:in `public_send'
163eaaee | /usr/share/gems/gems/railties-6.1.7.8/lib/rails/railtie.rb:207:in `method_missing'
163eaaee | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_dispatch/routing/mapper.rb:20:in `block in <class:Constraints>'
163eaaee | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_dispatch/routing/mapper.rb:49:in `serve'
163eaaee | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_dispatch/journey/router.rb:50:in `block in serve'
163eaaee | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_dispatch/journey/router.rb:32:in `each'
163eaaee | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_dispatch/journey/router.rb:32:in `serve'
163eaaee | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_dispatch/routing/route_set.rb:842:in `call'
163eaaee | /usr/share/gems/gems/katello-4.12.1/lib/katello/middleware/organization_created_enforcer.rb:18:in `call'
163eaaee | /usr/share/gems/gems/katello-4.12.1/lib/katello/middleware/event_daemon.rb:10:in `call'
163eaaee | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_dispatch/middleware/static.rb:24:in `call'
163eaaee | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_dispatch/middleware/static.rb:24:in `call'
163eaaee | /usr/share/gems/gems/apipie-dsl-2.6.2/lib/apipie_dsl/static_dispatcher.rb:67:in `call'
163eaaee | /usr/share/gems/gems/apipie-rails-1.3.0/lib/apipie/static_dispatcher.rb:74:in `call'
163eaaee | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_dispatch/middleware/static.rb:24:in `call'
163eaaee | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_dispatch/middleware/static.rb:24:in `call'
163eaaee | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_dispatch/middleware/static.rb:24:in `call'
163eaaee | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_dispatch/middleware/static.rb:24:in `call'
163eaaee | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_dispatch/middleware/static.rb:24:in `call'
163eaaee | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_dispatch/middleware/static.rb:24:in `call'
163eaaee | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_dispatch/middleware/static.rb:24:in `call'
163eaaee | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_dispatch/middleware/static.rb:24:in `call'
163eaaee | /usr/share/foreman/lib/foreman/middleware/libvirt_connection_cleaner.rb:9:in `call'
163eaaee | /usr/share/foreman/lib/foreman/middleware/telemetry.rb:10:in `call'
163eaaee | /usr/share/gems/gems/apipie-rails-1.3.0/lib/apipie/middleware/checksum_in_headers.rb:27:in `call'
163eaaee | /usr/share/gems/gems/rack-2.2.8.1/lib/rack/tempfile_reaper.rb:15:in `call'
163eaaee | /usr/share/gems/gems/rack-2.2.8.1/lib/rack/etag.rb:27:in `call'
163eaaee | /usr/share/gems/gems/rack-2.2.8.1/lib/rack/conditional_get.rb:40:in `call'
163eaaee | /usr/share/gems/gems/rack-2.2.8.1/lib/rack/head.rb:12:in `call'
163eaaee | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_dispatch/http/permissions_policy.rb:22:in `call'
163eaaee | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_dispatch/http/content_security_policy.rb:19:in `call'
163eaaee | /usr/share/foreman/lib/foreman/middleware/logging_context_session.rb:22:in `call'
163eaaee | /usr/share/gems/gems/rack-2.2.8.1/lib/rack/session/abstract/id.rb:266:in `context'
163eaaee | /usr/share/gems/gems/rack-2.2.8.1/lib/rack/session/abstract/id.rb:260:in `call'
163eaaee | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_dispatch/middleware/cookies.rb:697:in `call'
163eaaee | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_dispatch/middleware/callbacks.rb:27:in `block in call'
163eaaee | /usr/share/gems/gems/activesupport-6.1.7.8/lib/active_support/callbacks.rb:98:in `run_callbacks'
163eaaee | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_dispatch/middleware/callbacks.rb:26:in `call'
163eaaee | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_dispatch/middleware/actionable_exceptions.rb:18:in `call'
163eaaee | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_dispatch/middleware/debug_exceptions.rb:29:in `call'
163eaaee | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_dispatch/middleware/show_exceptions.rb:33:in `call'
163eaaee | /usr/share/gems/gems/railties-6.1.7.8/lib/rails/rack/logger.rb:37:in `call_app'
163eaaee | /usr/share/gems/gems/railties-6.1.7.8/lib/rails/rack/logger.rb:28:in `call'
163eaaee | /usr/share/gems/gems/sprockets-rails-3.4.2/lib/sprockets/rails/quiet_assets.rb:13:in `call'
163eaaee | /usr/share/foreman/lib/foreman/middleware/logging_context_request.rb:11:in `call'
163eaaee | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_dispatch/middleware/remote_ip.rb:81:in `call'
163eaaee | /usr/share/gems/gems/request_store-1.6.0/lib/request_store/middleware.rb:19:in `call'
163eaaee | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_dispatch/middleware/request_id.rb:26:in `call'
163eaaee | /usr/share/gems/gems/katello-4.12.1/lib/katello/prevent_json_parsing.rb:12:in `call'
163eaaee | /usr/share/gems/gems/rack-2.2.8.1/lib/rack/method_override.rb:24:in `call'
163eaaee | /usr/share/gems/gems/rack-2.2.8.1/lib/rack/runtime.rb:22:in `call'
163eaaee | /usr/share/gems/gems/activesupport-6.1.7.8/lib/active_support/cache/strategy/local_cache_middleware.rb:29:in `call'
163eaaee | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_dispatch/middleware/executor.rb:14:in `call'
163eaaee | /usr/share/gems/gems/rack-2.2.8.1/lib/rack/sendfile.rb:110:in `call'
163eaaee | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_dispatch/middleware/ssl.rb:77:in `call'
163eaaee | /usr/share/gems/gems/actionpack-6.1.7.8/lib/action_dispatch/middleware/host_authorization.rb:142:in `call'
163eaaee | /usr/share/gems/gems/secure_headers-6.5.0/lib/secure_headers/middleware.rb:11:in `call'
163eaaee | /usr/share/gems/gems/railties-6.1.7.8/lib/rails/engine.rb:539:in `call'
163eaaee | /usr/share/gems/gems/railties-6.1.7.8/lib/rails/railtie.rb:207:in `public_send'
163eaaee | /usr/share/gems/gems/railties-6.1.7.8/lib/rails/railtie.rb:207:in `method_missing'
163eaaee | /usr/share/gems/gems/rack-2.2.8.1/lib/rack/urlmap.rb:74:in `block in call'
163eaaee | /usr/share/gems/gems/rack-2.2.8.1/lib/rack/urlmap.rb:58:in `each'
163eaaee | /usr/share/gems/gems/rack-2.2.8.1/lib/rack/urlmap.rb:58:in `call'
163eaaee | /usr/share/gems/gems/puma-6.4.2/lib/puma/configuration.rb:272:in `call'
163eaaee | /usr/share/gems/gems/puma-6.4.2/lib/puma/request.rb:100:in `block in handle_request'
163eaaee | /usr/share/gems/gems/puma-6.4.2/lib/puma/thread_pool.rb:378:in `with_force_shutdown'
163eaaee | /usr/share/gems/gems/puma-6.4.2/lib/puma/request.rb:99:in `handle_request'
163eaaee | /usr/share/gems/gems/puma-6.4.2/lib/puma/server.rb:464:in `process_client'
163eaaee | /usr/share/gems/gems/puma-6.4.2/lib/puma/server.rb:245:in `block in run'
163eaaee | /usr/share/gems/gems/puma-6.4.2/lib/puma/thread_pool.rb:155:in `block in spawn_thread'
163eaaee | /usr/share/gems/gems/logging-2.3.1/lib/logging/diagnostic_context.rb:474:in `block in create_with_logging_context'
2024-07-16T12:56:34 [I|app|163eaaee] Completed 500 Internal Server Error in 196ms (Views: 0.3ms | ActiveRecord: 86.5ms | Allocations: 31614)