Skip to content

feature: add PulpProject class for Pulp-based package repository support - #2163

Merged
zmc merged 1 commit into
ceph:mainfrom
vamahaja:pulp-project
Jun 10, 2026
Merged

zmc merged 1 commit into
ceph:mainfrom
vamahaja:pulp-project

Conversation

@vamahaja

@vamahaja vamahaja commented Mar 26, 2026

Copy link
Copy Markdown
Member

This PR adds a PulpProject class that extends GitbuilderProject so teuthology can use Pulp-hosted package repositories. It introduces new config use_artifacts, set it to pulp (globally in site config or per job) to use Pulp; other values keep the current Gitbuilder and Shaman behavior.

Configuration

  • use_artifacts: 'pulp' - selects the Pulp backend (alongside existing 'shaman' and the default Gitbuilder path when unset / other values).
  • pulp_host — Pulp server hostname (documented in siteconfig.rst).

Key changes

  • Implement PulpProject inheriting from GitbuilderProject.
  • Override _get_base_url() to use Pulp’s repository API.
  • Override _get_distro() for Pulp’s distro format.
  • Override _get_package_version() and _get_package_sha1() to read metadata from Pulp responses.
  • Update get_builder_project() so config.use_artifacts == 'pulp' returns PulpProject.
  • Update siteconfig (and related docs) for use_artifacts: 'pulp' and pulp_host.
  • Add mock test TestPulpProject to teuthology/test/test_packaging.py.

@vamahaja
vamahaja requested a review from a team as a code owner March 26, 2026 13:33
@vamahaja
vamahaja requested review from VallariAg and kamoltat and removed request for a team March 26, 2026 13:33
@vamahaja
vamahaja marked this pull request as draft March 26, 2026 13:34
@vamahaja vamahaja linked an issue Mar 26, 2026 that may be closed by this pull request
@deepssin
deepssin requested review from amathuria, kshtsk and zmc March 27, 2026 04:15
@kshtsk

kshtsk commented Mar 27, 2026

Copy link
Copy Markdown
Contributor

This looks good, do we have an instance running with pulp to check this PR?

@vamahaja

Copy link
Copy Markdown
Member Author

This looks good, do we have an instance running with pulp to check this PR?

@kshtsk for review, I am working on deploying Pulp server on OCP cluster.

@vamahaja
vamahaja force-pushed the pulp-project branch 5 times, most recently from f60b0ef to b2e5898 Compare April 7, 2026 09:19
Comment thread teuthology/openstack/setup-openstack.sh Outdated
Comment thread teuthology/config.py Outdated
Comment thread teuthology/config.py Outdated
@vamahaja
vamahaja force-pushed the pulp-project branch 2 times, most recently from 6a38b81 to bb9ccff Compare April 7, 2026 11:58

@batrick batrick left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looking good!!

Comment thread teuthology/packaging.py Outdated
Comment thread teuthology/run.py Outdated
@vamahaja
vamahaja force-pushed the pulp-project branch 4 times, most recently from 0e9add6 to e27a58d Compare May 4, 2026 09:22
@vamahaja
vamahaja force-pushed the pulp-project branch 8 times, most recently from 39c888c to c68e408 Compare May 21, 2026 11:34
@vamahaja vamahaja removed the DNM label May 21, 2026
@vamahaja
vamahaja marked this pull request as ready for review May 21, 2026 12:58
@vamahaja
vamahaja requested a review from batrick May 21, 2026 12:58

@batrick batrick left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I recommend using an LLM to help you write up some docs on this new change.

Comment thread teuthology/packaging.py Outdated
Comment thread teuthology/task/kernel.py Outdated
Comment thread docs/detailed_test_config.rst Outdated
Comment thread docs/detailed_test_config.rst
Comment thread docs/detailed_test_config.rst
@vamahaja

Copy link
Copy Markdown
Member Author

I recommend using an LLM to help you write up some docs on this new change.

The draft documentation is currently available on CephPad: https://pad.ceph.com/p/ceph_artifact_management_via_pulp.

I will migrate this to a wiki page once all associated tasks are complete.

@vamahaja
vamahaja force-pushed the pulp-project branch 3 times, most recently from 5e367d6 to b133a48 Compare June 1, 2026 09:31
@vamahaja

vamahaja commented Jun 5, 2026

Copy link
Copy Markdown
Member Author

@djgalloway

Copy link
Copy Markdown
Contributor

This seems like a breaking change... While the number of global teuthology users is low, I am personally not a fan of removing options like use_shaman that have been available for years.

I'd prefer to see something like

use_shaman: false
use_pulp: true

But this is just my opinion. I'd like @zmc to weigh in.

Can the option be set on a per-job/run basis?

@kshtsk

kshtsk commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

This seems like a breaking change... While the number of global teuthology users is low, I am personally not a fan of removing options like use_shaman that have been available for years.

I don't think it is that breaking, @djgalloway to avoid interruption, could you or someone add the config to the server's teuthology yaml already:

package_source: shaman
shaman:
      endpoint: "https://shaman.ceph.com/api/"
      force_noarch: True

Or at least we need this before the merge.

I'd prefer to see something like

use_shaman: false
use_pulp: true

This complicates the code logic and will make potential misuse, what to prefer when both "use_shaman" and "use_pulp" are enable or disabled, it is not possible to predict which is used not looking into the source code.

But this is just my opinion. I'd like @zmc to weigh in.

Can the option be set on a per-job/run basis?

@djgalloway I like the idea of giving package_source on run/job basis though.

@vamahaja

vamahaja commented Jun 5, 2026

Copy link
Copy Markdown
Member Author

This seems like a breaking change... While the number of global teuthology users is low, I am personally not a fan of removing options like use_shaman that have been available for years.

I don't think it is that breaking, @djgalloway to avoid interruption, could you or someone add the config to the server's teuthology yaml already:

package_source: shaman
shaman:
      endpoint: "https://shaman.ceph.com/api/"
      force_noarch: True

Or at least we need this before the merge.

I'd prefer to see something like

use_shaman: false
use_pulp: true

This complicates the code logic and will make potential misuse, what to prefer when both "use_shaman" and "use_pulp" are enable or disabled, it is not possible to predict which is used not looking into the source code.

But this is just my opinion. I'd like @zmc to weigh in.
Can the option be set on a per-job/run basis?

@djgalloway I like the idea of giving package_source on run/job basis though.

@djgalloway @kshtsk no changes are needed, default values are already pointing to shaman with the required configs - https://github.com/ceph/teuthology/pull/2163/changes#diff-4525b7398914ab0a466329cd35d0e8b22b35479597fbfdca524baa871ae7d184R184

@zmc zmc left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think this looks great - I see only one outstanding item from @batrick, but other than that the PR seems ready to me!

…pport

Add a `PulpProject` subclass of `GitbuilderProject` so teuthology can use
Pulp-hosted package repos when `config.package_source` is `pulp`, alongside
the existing `Gitbuilder` and `Shaman` artifact backends.

Signed-off-by: Vaibhav Mahajan <vamahaja@redhat.com>
@vamahaja
vamahaja requested a review from zmc June 8, 2026 08:53

@zmc zmc left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks like all review items have been addressed, so from my perspective it looks ready - @batrick would you take a look as well, please?

@batrick

batrick commented Jun 10, 2026

Copy link
Copy Markdown
Member

Yes, in the current setup, the ceph-ci-bot user is created with read-only permissions for API access.

For this to work long-term I don't know how we cannot have pulp be publicly (on the VPN at least) readable?

@batrick batrick left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'm okay with this as-is to start.

@kshtsk

kshtsk commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

How's pushing the big green button?

@zmc
zmc merged commit aaa2c68 into ceph:main Jun 10, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Alternate package providers

5 participants