diff --git a/repos/system_upgrade/el7toel8/actors/satellite_upgrade_check/libraries/satellite_upgrade_check.py b/repos/system_upgrade/el7toel8/actors/satellite_upgrade_check/libraries/satellite_upgrade_check.py index 7ab3f2cfd4..49d912ba4b 100644 --- a/repos/system_upgrade/el7toel8/actors/satellite_upgrade_check/libraries/satellite_upgrade_check.py +++ b/repos/system_upgrade/el7toel8/actors/satellite_upgrade_check/libraries/satellite_upgrade_check.py @@ -23,13 +23,17 @@ def satellite_upgrade_check(facts): title = "Satellite PostgreSQL data migration" flags = [] severity = reporting.Severity.MEDIUM + intro_msg = "PostgreSQL on RHEL 8 expects its data in /var/lib/pgsql/data." reindex_msg = textwrap.dedent(""" - After the data has been moved to the new location, all databases will require a REINDEX. - This will happen automatically during the first boot of the system. + PostgreSQL on RHEL 8 requires a rebuild of all database indexes, when using data created on RHEL 7. + This REINDEX will happen automatically during the first boot of the system. """).strip() if not facts.postgresql.scl_pgsql_data: - migration_msg = "Your PostgreSQL data seems to be already migrated." + migration_msg = """ + Your PostgreSQL data seems to be already migrated to the new location. + No further movement will be performed. + """ elif facts.postgresql.same_partition: migration_msg = "Your PostgreSQL data will be automatically migrated." else: @@ -50,7 +54,7 @@ def satellite_upgrade_check(facts): so that the contents of {} are available in /var/lib/pgsql/data. """.format(scl_psql_path, storage_message, scl_psql_path) - summary = "{}\n{}".format(textwrap.dedent(migration_msg).strip(), reindex_msg) + summary = "{}\n{}\n{}".format(intro_msg, textwrap.dedent(migration_msg).strip(), reindex_msg) reporting.create_report([ reporting.Title(title), diff --git a/repos/system_upgrade/el7toel8/actors/satellite_upgrade_check/tests/unit_test_satellite_upgrade_check.py b/repos/system_upgrade/el7toel8/actors/satellite_upgrade_check/tests/unit_test_satellite_upgrade_check.py index b546c9da86..13c160e0e5 100644 --- a/repos/system_upgrade/el7toel8/actors/satellite_upgrade_check/tests/unit_test_satellite_upgrade_check.py +++ b/repos/system_upgrade/el7toel8/actors/satellite_upgrade_check/tests/unit_test_satellite_upgrade_check.py @@ -28,8 +28,10 @@ def test_no_old_data(monkeypatch): assert reporting.create_report.called == 1 expected_title = 'Satellite PostgreSQL data migration' + expected_intro = 'PostgreSQL on RHEL 8 expects its data in /var/lib/pgsql/data.' assert expected_title == reporting.create_report.report_fields['title'] + assert expected_intro in reporting.create_report.report_fields['summary'] def test_migrated_data(monkeypatch): @@ -41,8 +43,8 @@ def test_migrated_data(monkeypatch): assert reporting.create_report.called == 1 expected_title = 'Satellite PostgreSQL data migration' - expected_summary = 'Your PostgreSQL data seems to be already migrated.' - expected_reindex = 'all databases will require a REINDEX' + expected_summary = 'Your PostgreSQL data seems to be already migrated to the new location.' + expected_reindex = 'PostgreSQL on RHEL 8 requires a rebuild of all database indexes' assert expected_title == reporting.create_report.report_fields['title'] assert expected_summary in reporting.create_report.report_fields['summary'] @@ -59,7 +61,7 @@ def test_same_disk(monkeypatch): expected_title = 'Satellite PostgreSQL data migration' expected_summary = 'Your PostgreSQL data will be automatically migrated.' - expected_reindex = 'all databases will require a REINDEX' + expected_reindex = 'PostgreSQL on RHEL 8 requires a rebuild of all database indexes' assert expected_title == reporting.create_report.report_fields['title'] assert expected_summary in reporting.create_report.report_fields['summary'] @@ -77,7 +79,7 @@ def test_different_disk_sufficient_storage(monkeypatch): expected_title = 'Satellite PostgreSQL data migration' expected_summary = 'You currently have enough free storage to move the data' - expected_reindex = 'all databases will require a REINDEX' + expected_reindex = 'PostgreSQL on RHEL 8 requires a rebuild of all database indexes' assert expected_title == reporting.create_report.report_fields['title'] assert expected_summary in reporting.create_report.report_fields['summary']