Skip to content

Commit

Permalink
Merge branch 'uyuni-project:master' into bulk_scc_system_register
Browse files Browse the repository at this point in the history
  • Loading branch information
rjpmestre authored Sep 25, 2023
2 parents e3474d9 + 166cb08 commit 26aae51
Show file tree
Hide file tree
Showing 17 changed files with 48 additions and 30 deletions.
9 changes: 9 additions & 0 deletions python/billingdataservice/billing-data-service.changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
-------------------------------------------------------------------
Tue Sep 19 15:14:02 CEST 2023 - rosuna@suse.com

- version 4.4.1-1
* require csp-billing-adapter service
* add required dependencies to package and service
* change billing api datastructure
* show data for managed systems and monitored systems

-------------------------------------------------------------------
Tue May 09 13:43:10 CEST 2023 - mc@suse.de

Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

2 changes: 1 addition & 1 deletion python/billingdataservice/billing-data-service.spec
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@


Name: billing-data-service
Version: 0.1
Version: 4.4.1
Release: 1
Summary: Server to request billing information
License: GPL-2.0-only
Expand Down
2 changes: 1 addition & 1 deletion rel-eng/packages/billing-data-service
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.1-1 python/billingdataservice/
4.4.1-1 python/billingdataservice/
2 changes: 1 addition & 1 deletion rel-eng/packages/susemanager
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.4.7-1 susemanager/
4.4.8-1 susemanager/
8 changes: 5 additions & 3 deletions susemanager/bin/server-migrator.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ echo
read -n 1 -s -r -p "Press any key to start the migration or CTRL+C to cancel...";
echo

NEW_VERSION_ID=15.4
NEW_VERSION_ID=15.5

CHECK_OS=$(cat /etc/os-release | grep PRETTY_NAME)

Expand Down Expand Up @@ -56,8 +56,10 @@ if [[ "${CURRENT_VERSION_ID}" != "\"${NEW_VERSION_ID}\"" ]]; then
fi

echo "==================================================================="
echo "OS migrated successfully, now please migrate to the new postgres version "
echo "by running /usr/lib/susemanager/bin/pg-migrate-x-to-y.sh"
echo "OS migrated successfully"
#TODO Upgrade from 15.4 to 15.5 will not migrate postgres
#echo "Now please migrate to the new postgres version "
#echo "by running /usr/lib/susemanager/bin/pg-migrate-x-to-y.sh"
echo
echo "Reboot system afterwards."
echo "==================================================================="
6 changes: 6 additions & 0 deletions susemanager/susemanager.changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
-------------------------------------------------------------------
Tue Sep 19 15:15:06 CEST 2023 - rosuna@suse.com

- version 4.4.8-1
* Update server-migrator to dist-upgrade to openSUSE 15.5

-------------------------------------------------------------------
Mon Sep 18 14:40:08 CEST 2023 - rosuna@suse.com

Expand Down
2 changes: 1 addition & 1 deletion susemanager/susemanager.spec
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
%global debug_package %{nil}

Name: susemanager
Version: 4.4.7
Version: 4.4.8
Release: 1
Summary: SUSE Manager specific scripts
License: GPL-2.0-only
Expand Down
6 changes: 3 additions & 3 deletions testsuite/features/init_clients/proxy_branch_network.feature
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,8 @@ Feature: Setup Uyuni for Retail branch network
When I follow "States" in the content area
And I click on "Apply Highstate"
And I wait until event "Apply highstate scheduled by admin" is completed
# This also triggers a "Package List Refresh" event that will fail
# because the Salt connexion is disoriented after those changes
Then service "dhcpd" is enabled on "proxy"
And service "dhcpd" is active on "proxy"
And service "named" is enabled on "proxy"
Expand All @@ -201,10 +203,8 @@ Feature: Setup Uyuni for Retail branch network
@proxy
@private_net
Scenario: Disable repositories after installing branch services
Given the Salt master can reach "proxy"
When I disable repositories after installing branch server
# WORKAROUND: the following event fails because the proxy needs 10 minutes to become responsive again
# And I wait until event "Package List Refresh scheduled by (system)" is completed
And I wait for "700" seconds

@proxy
@private_net
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -197,11 +197,11 @@ Feature: PXE boot a Retail terminal
When I wait until I see the name of "pxeboot_minion", refreshing the page
And I follow this "pxeboot_minion" link
# Workaround: Increase timeout temporarily get rid of timeout issues
And I wait at most 350 seconds until event "Apply states [saltboot] scheduled by (system)" is completed
And I wait at most 350 seconds until event "Apply states [saltboot]" is completed
And I follow "Software" in the content area
And I follow "Software Channels" in the content area
And I wait until radio button "SLE-Product-SLES15-SP4-Pool for x86_64" is checked, refreshing the page
And I wait until event "Package List Refresh scheduled by (system)" is completed
And I wait until event "Package List Refresh" is completed
Then "pxeboot_minion" should have been reformatted

Scenario: Check connection from terminal to branch server
Expand Down
4 changes: 2 additions & 2 deletions testsuite/features/step_definitions/command_steps.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1171,10 +1171,10 @@
os_version = node.os_version.gsub('-SP', '.')
os_family = node.os_family
# TODO: Check why tools_update_repo is not available on the openSUSE minion
repositories = 'tools_pool_repo'
repositories = os_family =~ /^opensuse/ ? 'tools_pool_repo' : 'tools_pool_repo tools_update_repo'
if os_family =~ /^opensuse/ || os_family =~ /^sles/
if product != 'Uyuni'
repositories.concat(' tools_update_repo tools_additional_repo')
repositories.concat(' tools_additional_repo')
# Needed because in SLES15SP3 and openSUSE 15.3 and higher, firewalld will replace this package.
# But the tools_update_repo's priority doesn't allow to cope with the obsoletes option from firewalld.
if os_version.to_f >= 15.3
Expand Down
11 changes: 6 additions & 5 deletions testsuite/features/step_definitions/salt_steps.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,15 @@

Given(/^the Salt master can reach "(.*?)"$/) do |minion|
system_name = get_system_name(minion)
server = get_target('server')
start = Time.now
# 300 is the default 1st keepalive interval for the minion
# where it realizes the connection is stuck
repeat_until_timeout(timeout: 300, retries: 3, message: "Master can not communicate with #{minion}", report_result: true) do
out, _code = get_target('server').run("salt #{system_name} test.ping")
# 700 seconds is the maximum time it takes the proxy to recover after being redefined for Retail
# 300 seconds would be the default first keepalive interval for the minion before it realizes the connection is stuck
repeat_until_timeout(timeout: 700, message: "Master can not communicate with #{minion}", report_result: true) do
out, _code = server.run("salt #{system_name} test.ping", check_errors: false)
if out.include?(system_name) && out.include?('True')
finished = Time.now
log "Took #{finished.to_i - start.to_i} seconds to contact the minion"
log "It took #{finished.to_i - start.to_i} seconds to contact the minion"
break
end
sleep 1
Expand Down
13 changes: 7 additions & 6 deletions testsuite/podman_runner/07_manager_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,13 @@ sudo -i podman exec uyuni-server-all-in-one-test bash -c "/usr/bin/spacewalk-sch

# Make sure latest sql migration scripts have been executed for both the main and the reporting database
available_schemas=("spacewalk" "reportdb")
for schema in ${available_schemas[@]}; do
specfile=$(find ${src_dir}/schema/${schema}/ -name *.spec)
# Use Perl extended regexp and look-around assertions to extract only the values from the spec properties
schema_name=$(grep -oP "Name:\s+\K(.*)$" ${specfile})
schema_version=$(grep -oP "Version:\s+\K(.*)$" ${specfile})
for schema in "${available_schemas[@]}"; do
specfile=$(find "${src_dir}/schema/${schema}/" -name '*.spec')
# Get the package name from the spec using Perl extended regexp and look-around assertions to extract only its value
schema_name=$(grep -oP "Name:\s+\K(.*)$" "${specfile}")
# Check the version of the package installed in the podman container
schema_version=$(sudo -i podman exec uyuni-server-all-in-one-test rpm -q --queryformat '%{version}' "${schema_name}")

# Run the missing migrations and only those, to ensure no script is out of place
sudo -i podman exec uyuni-server-all-in-one-test bash -c "/testsuite/podman_runner/run_db_migrations.sh ${schema_name} ${schema_version}"
done

5 changes: 4 additions & 1 deletion testsuite/podman_runner/run_db_migrations.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@ else
exit 1
fi

for i in $(find ${upgrade_dir} -name "$1-$2-to-*"); do
# Including all sub-folders of the upgrade dir that comes after the one called "${schema_name}-${schema_version}-to-..."
# This should make sure we apply all the scripts meant to be executed on top of the current schema version.
# It probably won't happen often that we have multiple pending directories, but it could happen in case of re-tagging
for i in $(find ${upgrade_dir} -name "$1-*-to-*" | sed -n "/$1-$2-to-.*$/,$ p"); do
echo $(basename $i)
for j in $(find $i -name *.sql); do
echo -e "\t$(basename $j)"; spacewalk-sql ${additional_params} $j | sed 's/^/\t\t/';
Expand Down

0 comments on commit 26aae51

Please sign in to comment.