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

Fix persisting the Cobbler UID in the database via XML-RPC createSystemRecord #6676

Closed

Conversation

SchoolGuy
Copy link
Contributor

@SchoolGuy SchoolGuy commented Mar 2, 2023

What does this PR change?

TODO

GUI diff

No difference.

  • DONE

Documentation

  • No documentation needed: only internal and user invisible changes

  • DONE

Test coverage

Links

Fixes #
Tracks # add downstream PR, if any

  • 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

github-actions bot commented Mar 3, 2023

Suggested tests to cover this Pull Request
  • srv_rename_hostname
  • allcli_sanity
  • srv_cobbler_profile
  • srv_monitoring
  • srv_distro_cobbler
  • proxy_cobbler_pxeboot
  • srv_cobbler_distro
  • minkvm_guests
  • proxy_branch_network
  • minssh_salt_install_package
  • min_deblike_monitoring
  • srv_power_management
  • min_salt_mgrcompat_state
  • allcli_software_channels_dependencies
  • allcli_system_group
  • srv_docker_cve_audit
  • min_empty_system_profiles
  • srv_restart
  • min_ansible_control_node
  • srv_reportdb
  • srv_power_management_redfish
  • min_retracted_patches
  • min_bootstrap_negative
  • srv_user_configuration_salt_states
  • min_activationkey
  • allcli_reboot
  • min_bootstrap_ssh_key
  • srv_manage_activationkey
  • min_rhlike_salt
  • min_salt_formulas_advanced
  • srv_manage_channels_page
  • min_deblike_salt_install_package
  • buildhost_docker_build_image
  • min_salt_migration
  • srv_custom_system_info
  • min_recurring_action
  • proxy_as_pod_basic_tests
  • minssh_bootstrap_api
  • srv_advanced_search
  • min_salt_minion_details
  • min_salt_lock_packages
  • srv_scc_user_credentials
  • min_deblike_openscap_audit
  • min_rhlike_ssh
  • min_check_patches_install
  • min_virthost
  • srv_datepicker
  • srv_power_management_api
  • min_salt_openscap_audit
  • 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
  • min_timezone
  • min_bootstrap_api
  • min_bootstrap_reactivation
  • min_rhlike_monitoring
  • min_salt_user_states
  • 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
  • srv_group_union_intersection
  • min_cve_audit
  • min_rhlike_remote_command
  • allcli_action_chain
  • min_salt_pkgset_beacon
  • proxy_retail_pxeboot_and_mass_import
  • buildhost_bootstrap
  • min_rhlike_openscap_audit
  • min_bootstrap_script
  • srv_virtual_host_manager
  • proxy_register_as_minion_with_script
  • min_cve_id_new_syntax
  • min_deblike_ssh
  • min_salt_install_package
  • min_config_state_channel
  • min_salt_minions_page
  • srv_menu
  • min_monitoring
  • min_change_software_channel
  • min_action_chain
  • min_deblike_remote_command
  • minssh_action_chain
  • sle_ssh_minion
  • 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
  • srv_first_settings
  • srv_cobbler_buildiso

@SchoolGuy
Copy link
Contributor Author

The PR is working as expected in a test environment. Thus I will now start writing Unit Tests with Mockito (as discussed internally).

@SchoolGuy SchoolGuy force-pushed the fix/xml-rpc-createSystemRecord branch 2 times, most recently from 63efc3b to b92a1e8 Compare April 6, 2023 09:40
@SchoolGuy
Copy link
Contributor Author

Git History is clean and Sonarlint should be happy about this PR. Tests need fixing as they are skeletons only at the moment.

@SchoolGuy SchoolGuy force-pushed the fix/xml-rpc-createSystemRecord branch from b92a1e8 to 33b6522 Compare May 24, 2023 13:05
@SchoolGuy SchoolGuy force-pushed the fix/xml-rpc-createSystemRecord branch 2 times, most recently from 31c6484 to c6b8bb7 Compare May 31, 2023 08:26
@SchoolGuy
Copy link
Contributor Author

The tests are missing atm. Other then that manual validation by me was successful. A Java squad member should try to finish the currently 6 failing tests.

@nodeg
Copy link
Member

nodeg commented Oct 2, 2023

Any updates on this?

@ycedres
Copy link
Contributor

ycedres commented Oct 4, 2023

@nodeg I'm currently working on getting this PR in shape so it can be merged.

This commit addresses a regression that was introduced in 92e5a19.

When the server object is not passed to CobblerSystemCreateCommand the Cobbler UID is not persisted in the database which leads to Cobbler rejecting the API requests that SUSE Manager does.

This doesn't happen via the UI since it passes the server object via a different constructor than the XML-RPC API.
@ycedres ycedres force-pushed the fix/xml-rpc-createSystemRecord branch from c6b8bb7 to 8355538 Compare October 5, 2023 09:35
@nodeg
Copy link
Member

nodeg commented Oct 9, 2023

Thank you for the update, Yeray!

@meaksh
Copy link
Member

meaksh commented Oct 23, 2023

Closing in favor of #7738

@meaksh meaksh closed this Oct 23, 2023
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.

5 participants