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

Fixes #33192 - prefer in progress running reports #9518

Merged
merged 1 commit into from Aug 4, 2021

Conversation

jlsherrill
Copy link
Member

for migration progress reporting

@theforeman-bot
Copy link

Issues: #33192

@jlsherrill
Copy link
Member Author

Some of this is (i think) the random order which pulp returns the progress reports. I wasn't able to reproduce in my tests, so this may be more of a thought exercise than anything. The reported progress reporting looked like this:

 {
            "code": "migrating.content",
            "done": 18343,
            "message": "Migrating content to Pulp 3",
            "state": "running",
            "suffix": null,
            "total": 18343
        },
        {
            "code": "migrating.docker.content",
            "done": 11372,
            "message": "Migrating docker content to Pulp 3 docker_blob",
            "state": "completed",
            "suffix": null,
            "total": 11374
        },
        {
            "code": "migrating.rpm.content",
            "done": 121,
            "message": "Migrating rpm content to Pulp 3 distribution",
            "state": "completed",
            "suffix": null,
            "total": 123
        },
        {
            "code": "premigrating.content.general",
            "done": 445,
            "message": "Pre-migrating Pulp 2 PACKAGE_ENVIRONMENT content (general info)",
            "state": "completed",
            "suffix": null,
            "total": 445
        },
        {
            "code": "premigrating.content.general",
            "done": 234003,
            "message": "Pre-migrating Pulp 2 PACKAGE_GROUP content (general info)",
            "state": "completed",
            "suffix": null,
            "total": 234003
        },
        {
            "code": "premigrating.content.detail",
            "done": 234003,
            "message": "Pre-migrating Pulp 2 PACKAGE_GROUP content (detail info)",
            "state": "completed",
            "suffix": null,
            "total": 234003
        },
        {
            "code": "premigrating.content.detail",
            "done": 445,
            "message": "Pre-migrating Pulp 2 PACKAGE_ENVIRONMENT content (detail info)",
            "state": "completed",
            "suffix": null,
            "total": 445
        },
        {
            "code": "migrating.docker.content",
            "done": 2148,
            "message": "Migrating docker content to Pulp 3 docker_manifest",
            "state": "completed",
            "suffix": null,
            "total": 2148
        },
        {
            "code": "creating.repositories",
            "done": 551,
            "message": "Creating repositories in Pulp 3",
            "state": "completed",
            "suffix": null,
            "total": 551
        },
        {
            "code": "premigrating.content.general",
            "done": 102,
            "message": "Pre-migrating Pulp 2 PACKAGE_CATEGORY content (general info)",
            "state": "completed",
            "suffix": null,
            "total": 102
        },
        {
            "code": "migrating.docker.content",
            "done": 37,
            "message": "Migrating docker content to Pulp 3 docker_manifest_list",
            "state": "completed",
            "suffix": null,
            "total": 37
        },
        {
            "code": "migrating.importers",
            "done": 244,
            "message": "Migrating importers to Pulp 3",
            "state": "completed",
            "suffix": null,
            "total": 244
        },
        {
            "code": "migrating.docker.content",
            "done": 1157,
            "message": "Migrating docker content to Pulp 3 docker_tag",
            "state": "completed",
            "suffix": null,
            "total": 1157
        },
        {
            "code": "migrating.rpm.content",
            "done": 195512,
            "message": "Migrating rpm content to Pulp 3 rpm",
            "state": "completed",
            "suffix": null,
            "total": 198822
        },

notice that the first item in the list ' "Migrating content to Pulp 3",' shows as running but done == total. I presume there is a report further down that was running as well. But regardless, the current logic would have preferred this first report over anything past it since its marked as 'running'

for migration progress reporting
Copy link
Member

@jjeffers jjeffers left a comment

Choose a reason for hiding this comment

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

After applying this change, the progress reporting seems to be a lot better - the same message isn't "stuck" and the user can observe the different stages of the migration.

[vagrant@centos7-katello-3-18 katello-3.18.4]$ sudo foreman-maintain content prepare
Running Prepare content for Pulp 3
================================================================================
Prepare content for Pulp 3: 
Checking for valid Katello configuraton.
Starting task.
2021-08-04 14:02:43 +0000: Importing migrated content type rpm: 7605/7605               
Content Migration completed successfully

Script started on Wed 04 Aug 2021 01:51:05 PM UTC
Checking for valid Katello configuraton.
Starting task.
2021-08-04 14:02:43 +0000: Importing migrated content type rpm: 7605/7605               
Content Migration completed successfully
                            [OK]
--------------------------------------------------------------------------------

@jlsherrill jlsherrill merged commit 7acc2ec into Katello:KATELLO-3.18 Aug 4, 2021
@jlsherrill jlsherrill deleted the 33192 branch August 4, 2021 14:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants