[pbs-devel] [PATCH proxmox-offline-mirror 2/2] add missing subscription setting for ceph enterprise repos

Maximiliano Sandoval m.sandoval at proxmox.com
Tue Nov 21 16:49:01 CET 2023


Tested both patches. They generate the correct configurations for quincy
and reef.

```
mirror: ceph_quincy_bookworm
	architectures amd64
	architectures all
	base-dir /var/lib/proxmox-offline-mirror/mirrors/
	ignore-errors false
	key-path /etc/apt/trusted.gpg.d/proxmox-release-bookworm.gpg
	repository deb https://enterprise.proxmox.com/debian/ceph-quincy bookworm enterprise
	sync false
	use-subscription pve
	verify false

mirror: ceph_reef_bookworm
	architectures amd64
	architectures all
	base-dir /var/lib/proxmox-offline-mirror/mirrors/
	ignore-errors false
	key-path /etc/apt/trusted.gpg.d/proxmox-release-bookworm.gpg
	repository deb https://enterprise.proxmox.com/debian/ceph-reef bookworm enterprise
	sync false
	use-subscription pve
	verify false
```

I can confirm that without setting use-subscription it won't be possible
to sync the Ceph enteriprise repo and the first patch in this series
fixes it.

Tested-by: Maximiliano Sandoval <m.sandoval at proxmox.com>

Stefan Sterz <s.sterz at proxmox.com> writes:

> when setting up a ceph enterprise repo we didn't add a subscription
> for it. this commit adds a pve subscription so that pom can properly
> authenticate itself when mirroring the ceph enterprise repos.
>
> Signed-off-by: Stefan Sterz <s.sterz at proxmox.com>
> ---
>  src/bin/proxmox-offline-mirror.rs | 11 +++++++----
>  1 file changed, 7 insertions(+), 4 deletions(-)
>
> diff --git a/src/bin/proxmox-offline-mirror.rs b/src/bin/proxmox-offline-mirror.rs
> index 2f2e782..d029d3d 100644
> --- a/src/bin/proxmox-offline-mirror.rs
> +++ b/src/bin/proxmox-offline-mirror.rs
> @@ -296,10 +296,13 @@ fn action_add_mirror(config: &SectionConfigData) -> Result<Vec<MirrorConfig>, Er
>                          read_selection_from_tty("Select repository variant", variants, Some(0))?;
>
>                      match variant {
> -                        ProxmoxVariant::Enterprise => (
> -                            "https://enterprise.proxmox.com/debian/ceph",
> -                            "enterprise".to_string(),
> -                        ),
> +                        ProxmoxVariant::Enterprise => {
> +                            use_subscription = Some(ProductType::Pve);
> +                            (
> +                                "https://enterprise.proxmox.com/debian/ceph",
> +                                "enterprise".to_string(),
> +                            )
> +                        }
>                          ProxmoxVariant::NoSubscription => (
>                              "http://download.proxmox.com/debian/ceph",
>                              "no-subscription".to_string(),


--
Maximiliano





More information about the pbs-devel mailing list