Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve Taskomatic by removing invalid triggers before start and enhancing logs #7523

Merged
merged 1 commit into from
Sep 29, 2023

Conversation

wweellddeerr
Copy link
Contributor

What does this PR change?

Its core change is to add the TaskoQuartzHelper.removeInvalidTriggers method and call it before starting Taskomatic. This method detects and removes invalid triggers from the Quartz database. In some cases, the Quartz database can become inconsistent, with records in the main QRTZ_TRIGGERS table lacking corresponding entries in any of the possible detail property tables (QRTZ_CRON_TRIGGERS, QRTZ_SIMPLE_TRIGGERS, QRTZ_BLOB_TRIGGERS or QRTZ_SIMPROP_TRIGGERS).

While the exact scenarios leading to this inconsistency may not be clear, this method provides a solution to prevent Taskomatic from failing to start, performing a cleanup of invalid triggers before starting the scheduler. See quartz-scheduler/quartz#85 for additional reference.

It also contains some additional logs for Taskomatic and includes database scripts to create a missing database table for Quartz: qrtz_simprop_triggers.

GUI diff

No difference.

  • DONE

Documentation

  • No documentation needed: only internal and user invisible changes

  • DONE

Test coverage

  • No tests

  • DONE

Links

Fixes https://github.com/SUSE/spacewalk/issues/22195

  • DONE

Changelogs

Make sure the changelogs entries you are adding are compliant with https://github.com/uyuni-project/uyuni/wiki/Contributing#changelogs and https://github.com/uyuni-project/uyuni/wiki/Contributing#uyuni-projectuyuni-repository

If you don't need a changelog check, please mark this checkbox:

  • No changelog needed

If you uncheck the checkbox after the PR is created, you will need to re-run changelog_test (see below)

Re-run a test

If you need to re-run a test, please mark the related checkbox, it will be unchecked automatically once it has re-run:

  • Re-run test "changelog_test"
  • Re-run test "backend_unittests_pgsql"
  • Re-run test "java_pgsql_tests"
  • Re-run test "schema_migration_test_pgsql"
  • Re-run test "susemanager_unittests"
  • Re-run test "javascript_lint"
  • Re-run test "spacecmd_unittests"

@github-actions
Copy link
Contributor

Suggested tests to cover this Pull Request
  • min_recurring_action
  • srv_monitoring
  • minssh_salt_install_package
  • min_deblike_monitoring
  • srv_power_management
  • min_salt_mgrcompat_state
  • srv_check_sync_source_packages
  • srv_sync_products
  • srv_sync_channels
  • proxy_cobbler_pxeboot
  • allcli_software_channels_dependencies
  • allcli_system_group
  • srv_task_status_engine
  • minkvm_guests
  • srv_rename_hostname
  • srv_docker_cve_audit
  • srv_enable_sync_products
  • srv_create_repository
  • min_empty_system_profiles
  • srv_restart
  • srv_delete_channel_from_ui
  • min_ansible_control_node
  • srv_reportdb
  • min_retracted_patches
  • srv_add_rocky8_repositories
  • min_activationkey
  • srv_clone_channel_npn
  • allcli_reboot
  • min_bootstrap_ssh_key
  • min_rhlike_salt
  • min_salt_formulas_advanced
  • srv_handle_software_channels_with_ISS_v2
  • srv_manage_channels_page
  • min_deblike_salt_install_package
  • buildhost_docker_build_image
  • min_salt_migration
  • proxy_as_pod_basic_tests
  • minssh_bootstrap_api
  • srv_advanced_search
  • min_salt_minion_details
  • srv_cobbler_distro
  • min_salt_lock_packages
  • min_deblike_openscap_audit
  • min_rhlike_ssh
  • allcli_update_activationkeys
  • min_check_patches_install
  • min_virthost
  • min_salt_openscap_audit
  • srv_cobbler_sync
  • min_salt_install_with_staging
  • min_move_from_and_to_proxy
  • allcli_config_channel
  • min_project_lotus
  • min_salt_software_states
  • min_config_state_channel_subscriptions
  • srv_payg_ssh_connection
  • min_timezone
  • srv_channels_add
  • min_bootstrap_api
  • min_bootstrap_reactivation
  • min_rhlike_monitoring
  • min_salt_user_states
  • srv_distro_cobbler
  • minssh_ansible_control_node
  • min_rhlike_salt_install_package_and_patch
  • min_config_state_channel_api
  • min_deblike_salt
  • buildhost_docker_auth_registry
  • buildhost_osimage_build_image
  • min_deblike_salt_install_with_staging
  • min_cve_audit
  • srv_channel_api
  • allcli_action_chain
  • min_salt_pkgset_beacon
  • proxy_retail_pxeboot_and_mass_import
  • buildhost_bootstrap
  • proxy_branch_network
  • min_rhlike_openscap_audit
  • min_bootstrap_script
  • srv_virtual_host_manager
  • proxy_register_as_minion_with_script
  • min_cve_id_new_syntax
  • allcli_sanity
  • min_deblike_ssh
  • min_salt_install_package
  • min_config_state_channel
  • srv_change_task_schedule
  • min_salt_minions_page
  • srv_menu
  • min_monitoring
  • min_change_software_channel
  • min_action_chain
  • srv_first_settings
  • minssh_action_chain
  • sle_ssh_minion
  • srv_wait_for_reposync
  • min_salt_formulas
  • allcli_overview_systems_details
  • min_custom_pkg_download_endpoint
  • allcli_software_channels
  • srv_maintenance_windows
  • sle_minion
  • min_ssh_tunnel
  • minssh_move_from_and_to_proxy
  • min_bootstrap_negative
  • srv_user_configuration_salt_states
  • srv_custom_system_info
  • srv_scc_user_credentials
  • srv_group_union_intersection

@wweellddeerr wweellddeerr force-pushed the improve-taskomatic branch 2 times, most recently from 2b0d09d to 3c6b9a1 Compare September 12, 2023 11:41
Copy link
Member

@rjmateus rjmateus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@wweellddeerr wweellddeerr merged commit 0ddff59 into uyuni-project:master Sep 29, 2023
10 of 16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants