-
Notifications
You must be signed in to change notification settings - Fork 148
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
BZ#2188239 - better detect already migrated PostgreSQL data #1071
Conversation
Thank you for contributing to the Leapp project!Please note that every PR needs to comply with the Leapp Guidelines and must pass all tests in order to be mergeable.
To launch regression testing public members of oamg organization can leave the following comment:
Please open ticket in case you experience technical problem with the CI. (RH internal only) Note: In case there are problems with tests not being triggered automatically on new PR/commit or pending for a long time, please consider rerunning the CI by commenting leapp-ci build (might require several comments). If the problem persists, contact leapp-infra. |
/rerun |
Copr build succeeded: https://copr.fedorainfracloud.org/coprs/build/5812223 |
.../system_upgrade/el7toel8/actors/satellite_upgrade_check/libraries/satellite_upgrade_check.py
Outdated
Show resolved
Hide resolved
Testing Farm request for RHEL-8.6-rhui/5812223 regression testing has been created. |
Testing Farm request for RHEL-7.9-rhui/5812223 regression testing has been created. |
Testing Farm request for RHEL-8.6.0-Nightly/5812223 regression testing has been created. |
Testing Farm request for RHEL-8.8.0-Nightly/5812223 regression testing has been created. |
Testing Farm request for RHEL-7.9-ZStream/5812223 regression testing has been created. |
Testing Farm request for RHEL-7.9-ZStream/5812223 regression testing has been created. |
this doesn't look like a related error? |
@evgeni It is unrelated, yeah, sorry about that. It has emerged recently and we are actively investigating it. |
@lpramuk Hi Lukas, can you (or someone) test it before the merge and confirm it works as expected? |
@@ -48,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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@evgeni hmm...not sure how the msg will look like in various web UIs. From our experience, new-lines does not look always so good as in the .txt file. But it can be kept as it is, just letting you know that we already changed some texts in the past (rarely..) as they looked very weird. e.g. autowrapping plays a role here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm. waiting for @lpramuk for the feedback about the testing for now.
/packit build |
Users can (and in some cases have to) manually move the PostgreSQL data to the new location. In the case when they would completely delete the old location, the facts code would previously error out: Traceback (most recent call last): File "/usr/lib64/python2.7/multiprocessing/process.py", line 258, in _bootstrap self.run() File "/usr/lib64/python2.7/multiprocessing/process.py", line 114, in run self._target(*self._args, **self._kwargs) File "/usr/lib/python2.7/site-packages/leapp/repository/actor_definition.py", line 72, in _do_run actor_instance.run(*args, **kwargs) File "/usr/lib/python2.7/site-packages/leapp/actors/init.py", line 289, in run self.process(*args) File "/usr/share/leapp-repository/repositories/system_upgrade/el7toel8/actors/satellite_upgrade_facts/actor.py", line 96, in process scl_psql_stat = os.stat(POSTGRESQL_SCL_DATA_PATH) OSError: [Errno 2] No such file or directory: '/var/opt/rh/rh-postgresql12/lib/pgsql/data/' However, if the user already has migrated the data, we don't have to do it in the actor and thus can skip all that detection code. Also adjust the report to say the data looks migrated (but still needs a reindex).
Users can (and in some cases have to) manually move the PostgreSQL data to the new location. In the case when they would completely delete the old location, the facts code would previously error out:
However, if the user already has migrated the data, we don't have to do it in the actor and thus can skip all that detection code.
Also adjust the report to say the data looks migrated (but still needs a reindex).