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

pulp ostree: compose job is finished but importing to pulp is not finished #3673

Closed
yih-redhat opened this issue Sep 6, 2023 · 3 comments
Closed

Comments

@yih-redhat
Copy link
Contributor

yih-redhat commented Sep 6, 2023

Describe the bug
When build edge image with pulp enabled, the compose job show as finished, but the importing to pulp is not finished yet, need to wait until import finished. (wait time is usually several minutes, depends on network or pulp server location)
From customer's point of view, if compose job finished, it means they can use image content in pulp.

Environment

  • OS version RHEL 9.3

To Reproduce
Steps to reproduce the behavior:

  1. setup pulp server
  2. create pulp.toml file:
    provider = "pulp.ostree"

[settings]
server_address = "http://localhost:9090"
repository = "commit-repo"
basepath = "commit-path"
username = "admin"
password = "foobar"
3. build image with command "composer-cli compose start-ostree firstcommit edge-commit --ref rhel/9/x86_64/edge ./pulp.toml"
4. After some time, check compose job status, it is finished. Check pulp content, it's empty.
5. Then after another several minutes, check pulp content, the image is imported.

Expected behavior
If compose job is finished, the image should be imported into pulp already.

Additional context
Add any other context about the problem here.

@achilleas-k
Copy link
Member

Pulling in some quotes from the PR where this issue was discussed:

Comment from @teg #3636 (comment)

This is what happens with AMIs today, AFAIK. A potential solution for both AMIs and ostree commits is to split the job in two pieces: 1) build+upload; and 2) import. Then importing could be done in parallel with future builds, so there is no blocking.

Response from @thozza #3636 (comment)

I had a very similar idea, I would just make the import async and add a new job type which would wait for import to finish in parallel with any osbuild job. Basically in the same way as we do for depsolving.

The tricky part is that such a change would be very disruptive, since composer assumes that the UUID of the osbuild job is the actual compose UUID and we use that to determine status, logs, etc in API endpoints. We already have a special case for Koji where the last job is the KojiFinalize and its UUID is used as the compose UUID. We would have to do a similar thing for new non-Koji composes and only for some of them depending on the used target. I'm sure someone can figure out an elegant and backward incompatible way to make it work, I just wanted to point out that this is not a trivial task.

@yih-redhat yih-redhat changed the title pulp ostree: compose job is finished but importing to pulp is not finished yet pulp ostree: compose job is finished but importing to pulp is not finished Sep 12, 2023
@achilleas-k
Copy link
Member

achilleas-k commented Sep 15, 2023

Upload function now waits for async tasks to finish: #3636 (comment)

@yih-redhat
Copy link
Contributor Author

Verified, fixed.
Closing this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants