Pulp3 RPM Advanced-Copy depsolving issue(s)
1965942 - warnings RE missing dependencies
9293 (backport, CLOSED-CURRENT)
- 2003764 - depsolving once-per-rpm is nonperformant
- 9387, PR 2123
- 9388 Backport request
- symptoms of this problem - closed-DUP of '3764/9387/9388
- 1995232 - postgres-cpu/explain bz
Executive Summary
There are two underlying problems. One is the query-performance raised in 1995232. The other is that Pulp3 is computing repoclosure on every single rpm added to a destinatoin during a copy, 2003764
Fixing '3764 addresses the majority of the depsolving-problem.
Issue/BZ shenanigans
Final state desired
-
6.10 GA
- Fix 1965942 - warnings RE missing dependencies [DONE]
- Fix 2003764 - depsolving once-per-rpm is nonperformant
- Backport '3764 to pulp-rpm 3.14
- Close various BZs/issues/backport-requests around the symptoms as DUPS
-
Post-6.10
- Address 1995232 - postgres-cpu/explain bz
Observations
Pulp issues
- Logging: "can't install" warnings aren't relevant to the repo-depsolve-closure case. PR submitted to remediate.
- assert/OOM signal handing can't happen, the code that needs to set a singal-handler isn't running in python main-thread
- postgres query performance isβ¦terrible.
- assert-cause still unclear
Katello issue
- Filter-API doesn't do what the user expects
- errata-exclude-before - pulls in ALL 32K RPMS
- results in 4 copy-tasks
- each task takes progressively longer, as dest fills
- Doing advanced-copy 'well' (or even 'acceptably') probably wants a new feature for next-year-katello, "advanced-copy". that sends what the user is actually asking for ("repo as of date-X plus security fixes not including any of the following RPMs")
Investigation
- Satellite-CV-creation actually fails with a cancelled task, caused by this error message:
- This error is FATAL - but rather than failing the task with a traceback, it CANCELS the task with no explanation
- need to open an issue for this, it'sβ¦Rude
- Have not recreated the fatal error above yet
- see 1934545
- On standalone Pulp, can recreate the warnings by doing an advanced-copy, of RHEL7, of "all RPMs that are not associated with Advisories" (see recipes, below)
- biggest thing Not Found: libc.so.6 (!!), 705 (!!!) times
Investigating on Pulp3-upstream shows that, when adding base-RPMs to advanced-copy, RHEL7-x86_64 and RHEL8-x86_64 tested, all of the RPMs that couldn't find their files, were i686 (ie 32-bit) RPMs. Multi-arch strikes again?
RE assert and logging - we're going to need a SIGABRT handler instantiated prior to solver.solve(). The handler can log the problem more thoroughly; not sure how much access we have "inside" such a thing? Investigation needed.
- SQL performance during advanced copy is terrible. Here is an example of a single running postgres task - note the current elapsed time:
Useful Sat6 recipes
basic functions
- Canceling a task:
- Accessing postgres:
Preparing an advanced-copy call "by hand"
- Find all advisories with an updated-date prior to a specified date
- Find packages that aren't part of an UpdateRecord (note: works when there's only one repo sync'd. Needs work to find just "β¦for a specific repository")
- Find content-ptr-id for all packages not in UpdateRecords:
- Prepare base_packages to hand off to /copy/:
- Delete header/footer
- Replace header with:
- Replace UUIDs with
"/pulp/api/v3/content/rpm/packages/UUID/",
- EXAMPLE:
- Issue the /copy/ command:
Pulling useful info from journalctl
- Find the things missing-from depsolve warnings:
- Find the packages-looking-for-missing: