uyuni-project / uyuni

Source code for Uyuni
https://www.uyuni-project.org/
GNU General Public License v2.0
434 stars 181 forks source link

Ubuntu 22.04 Bootstrap repo fails to create #5764

Closed kyle-aas closed 2 years ago

kyle-aas commented 2 years ago

Problem description

conman:~ # zypper info Uyuni-Server-release Loading repository data... Reading installed packages...

Information for package Uyuni-Server-release:

Repository : Uyuni Server Stable Name : Uyuni-Server-release Version : 2022.08-185.2.uyuni2 Arch : x86_64 Vendor : obs://build.opensuse.org/systemsmanagement:Uyuni Support Level : Level 3 Installed Size : 1.4 KiB Installed : Yes Status : up-to-date Source package : Uyuni-Server-release-2022.08-185.2.uyuni2.src Summary : Uyuni Server Description : Uyuni lets you efficiently manage physical, virtual, and cloud-based Linux systems. It provides automated and cost-effective configuration and software management, asset management, and system provisioning.

Details about the issue

After subscribing, and syncing the Ubuntu 22.04 repos, we're unable to create a bootstrap repo:

conman:~ # mgr-create-bootstrap-repo -c ubuntu-22.04-amd64-uyuni

Creating bootstrap repo for ubuntu-22.04-amd64-uyuni copy 'venv-salt-minion-3004-4.6.uyuni.amd64-deb' Could not find a suitable control.tar file within '/srv/www/htdocs/pub/repositories/ubuntu/22/4/bootstrap.tmp/debs/venv-salt-minion-3004-4.6.uyuni.amd64-deb.deb'! There have been errors! Error creating bootstrap repo.

mcalmer commented 2 years ago

@vzhestkov any idea?

chr78 commented 2 years ago

same Problem here I tried to use the 4.5 Version from Ubuntu 20.04, then the bootstrap repo was created (but the minion was not working on 22.04). So I think there might be a problem with a missing component in the package.

lumarel commented 2 years ago

Upgraded to 2022.08 as well now, the same issue, I suspect mgr-create-bootstrap-repo is incapable of reading zstd.

mcalmer commented 2 years ago

@juliogonzalez DId we forget to release reprepro with Zstd support for Uyuni 2022.08 ? It seems we have it in "Master" but not in "Stable" ?

eins commented 2 years ago

Moin :wave:

same output as kyle-aas on Uyuni server release 2022.08

zypper info Uyuni-Server-release
Loading repository data...
Reading installed packages...

Information for package Uyuni-Server-release:
---------------------------------------------
Repository     : Uyuni Server Stable
Name           : Uyuni-Server-release
Version        : 2022.08-185.2.uyuni2
Arch           : x86_64
Vendor         : obs://build.opensuse.org/systemsmanagement:Uyuni
Support Level  : Level 3
Installed Size : 1.4 KiB
Installed      : Yes
Status         : up-to-date
Source package : Uyuni-Server-release-2022.08-185.2.uyuni2.src
Summary        : Uyuni Server
Description    :
    Uyuni lets you efficiently manage physical, virtual,
    and cloud-based Linux systems. It provides automated and cost-effective
    configuration and software management, asset management, and system
    provisioning.

---------------------------------------------

mgr-create-bootstrap-repo -c ubuntu-22.04-amd64-uyuni

Creating bootstrap repo for ubuntu-22.04-amd64-uyuni
Error: Too few arguments for command 'includedeb'!
Syntax: reprepro [--delete] includedeb <distribution> <.deb-file>
There have been errors!
Error creating bootstrap repo.
juliogonzalez commented 2 years ago

@mcalmer no, the package was released:

juliogonzalez@localhost:~$ rpm -q --changelog https://download.opensuse.org/repositories/systemsmanagement:/Uyuni:/Stable/images/repo/Uyuni-Server-POOL-x86_64-Media1/x86_64/reprepro-5.3.0-2.8.uyuni2.x86_64.rpm |head
* mié jun 29 2022 Julio González Gil <jgonzalez@suse.com>
- Bump up the maxsize on a fixed-size C buffer to avoid breaking on some
  autogenerated rust packages
  * 0001-Bump-up-the-maxsize-on-a-fixed-size-C-buffer-to-avoi.patch
- Flush stdout and stderr before execv of an end hook
  * 0002-Flush-stdout-stderr-before-calling-endhook.patch
- Add support for Zstd compressed debs
  * 0003-Add-Zstd-support.patch

* jue sep 09 2021 Stefan Bluhm <stefan.bluhm@clacee.eu>

Everyone affected by this issue, please review the changelog for your reprepro package.

If it does NOT have what I pasted above, paste the output of zypper info reprepro

kyle-aas commented 2 years ago

conman:~ # rpm -q --changelog reprepro

conman:~ # zypper info reprepro Loading repository data... Reading installed packages...

Information for package reprepro:

Repository : @System Name : reprepro Version : 5.3.0-2.33.uyuni2 Arch : x86_64 Vendor : obs://build.opensuse.org/systemsmanagement:Uyuni Installed Size : 1.1 MiB Installed : Yes (automatically) Status : up-to-date Source package : reprepro-5.3.0-2.33.uyuni2.src Upstream URL : https://salsa.debian.org/brlink/reprepro Summary : Handle local repositories of debian packages Description : This project is a lightweight feature complete manager of a debian package (i.e. binary .deb and source .dsc+.tar.gz+.diff.gz) repository. Emphasis is put on having all packages in the pool/-directory, maximal checking of all sources, generation of signed Release file, Contents, ...

kyle-aas commented 2 years ago

Additional information:

conman:~ # zypper search -s reprepro Loading repository data... Reading installed packages...

S | Name | Type | Version | Arch | Repository --+----------+---------+-------------------+--------+-------------------- i | reprepro | package | 5.3.0-2.33.uyuni2 | x86_64 | (System Packages) v | reprepro | package | 5.3.0-2.8.uyuni2 | x86_64 | Uyuni Server Stable

kyle-aas commented 2 years ago

I've gone ahead, and manually installed the latest reprepro file from the Uyuni servers, and it looks like it resolved my issue:

conman:~ # mgr-create-bootstrap-repo -c ubuntu-22.04-amd64-uyuni

Creating bootstrap repo for ubuntu-22.04-amd64-uyuni copy 'venv-salt-minion-3004-4.6.uyuni.amd64-deb' Skipping inclusion of 'venv-salt-minion' '3004-4.6.uyuni' in 'bootstrap|main|amd64', as it has already '3004-4.6.uyuni'. Exporting indices...

eins commented 2 years ago

juliogonzalez :wave:

I only have one available reprepro version in uyuni server release 2022.08

zypper info reprepro
Loading repository data...
Reading installed packages...

Information for package reprepro:
---------------------------------
Repository     : Uyuni Server Stable
Name           : reprepro
Version        : 5.3.0-2.8.uyuni2
Arch           : x86_64
Vendor         : obs://build.opensuse.org/systemsmanagement:Uyuni
Support Level  : Level 3
Installed Size : 1.2 MiB
Installed      : Yes (automatically)
Status         : up-to-date
Source package : reprepro-5.3.0-2.8.uyuni2.src
Upstream URL   : https://github.com/ionos-cloud/reprepro
Summary        : Handle local repositories of debian packages
Description    :
    This project is a lightweight feature complete manager of a debian
    package (i.e. binary .deb and source .dsc+.tar.gz+.diff.gz) repository.
    Emphasis is put on having all packages in the pool/-directory,
    maximal checking of all sources, generation of signed Release file,
    Contents, ...

zypper search -s reprepro
Loading repository data...
Reading installed packages...

S | Name     | Type    | Version          | Arch   | Repository
--+----------+---------+------------------+--------+--------------------
i | reprepro | package | 5.3.0-2.8.uyuni2 | x86_64 | Uyuni Server Stable

    Note: For an extended search including not yet activated remote resources please use 'zypper
    search-packages'.
zypper search-packages -s reprepro
Could not search for the package: Error: Registration server returned 'base product not found' (404)Following packages were found in following modules:

Package                          Module or Repository SUSEConnect Activation Command 
-------------------------------- -------------------  
reprepro-5.3.0-2.8.uyuni2.x86_64 Installed            
reprepro-5.3.0-2.8.uyuni2.x86_64 uyuni-server-stable  

To activate the respective module or product, use SUSEConnect --product.
Use SUSEConnect --help for more details.
rpm -q --changelog reprepro
* Wed Jun 29 2022 Julio González Gil <jgonzalez@suse.com>
- Bump up the maxsize on a fixed-size C buffer to avoid breaking on some
  autogenerated rust packages
  * 0001-Bump-up-the-maxsize-on-a-fixed-size-C-buffer-to-avoi.patch
- Flush stdout and stderr before execv of an end hook
  * 0002-Flush-stdout-stderr-before-calling-endhook.patch
- Add support for Zstd compressed debs
  * 0003-Add-Zstd-support.patch

* Thu Sep 09 2021 Stefan Bluhm <stefan.bluhm@clacee.eu>
- Added alternative package name for db4-devel.

* Wed Mar 13 2019 Matei Albu <malbu@suse.com>
- Updated to 5.3.0
- Added GPG signature

* Tue Nov 29 2016 opensuse@dstoecker.de
- update to 4.16.0

* Wed Jan 16 2013 frank.lichtenheld@sophos.com
- Update to 4.8.2 (version in Ubuntu 12.04LTS)

* Tue Aug 30 2011 t.glaser@tarent.de
- Update to 4.7.0
- Add CentOS dependencies
 mgr-create-bootstrap-repo -c ubuntu-22.04-amd64-uyuni

Creating bootstrap repo for ubuntu-22.04-amd64-uyuni
Error: Too few arguments for command 'includedeb'!
Syntax: reprepro [--delete] includedeb <distribution> <.deb-file>
There have been errors!
Error creating bootstrap repo.
chr78 commented 2 years ago
zypper search -s reprepro
Loading repository data...
Reading installed packages...

S | Name     | Type    | Version           | Arch   | Repository
--+----------+---------+-------------------+--------+--------------------
i | reprepro | package | 5.3.0-2.33.uyuni2 | x86_64 | (System Packages)
v | reprepro | package | 5.3.0-2.8.uyuni2  | x86_64 | Uyuni Server Stable

Just installed reprepro-5.3.0-2.8.uyuni2.x86_64, recreated the bootstrap and now it seems it's working.

juliogonzalez commented 2 years ago

@chr78 that seems to be the problem: after we moved the package betweek projects, the one from :Other has a lower release number.

@kyle-aas force the installation of 5.3.0-2.8.uyuni2 as @chr78 did.

Right now there's nothing we can do to fix it, but at least I will launch a few rebuilds so we get a bigger release number for 2022.09, and will send an email and twitter about it.

@eins in your case it seems the right package is installed, and your error is different from the one reported here. Please create a new issue, and I will ask someone to have a look.

juliogonzalez commented 2 years ago

Ok, I was able to bump the version to 5.3.0-2.35.uyuni2, so this will be completely fixed for Uyuni 2022.09.

@chr78 can you paste the command you used? Was it zypper in --allow-downgrade reprepro=5.3.0-2.8.uyuni2?

chr78 commented 2 years ago

Ok, I was able to bump the version to 5.3.0-2.35.uyuni2, so this will be completely fixed for Uyuni 2022.09.

@chr78 can you paste the command you used? Was it zypper in --allow-downgrade reprepro=5.3.0-2.8.uyuni2?

no, I used

zypper in --oldpackage reprepro-5.3.0-2.8.uyuni2

juliogonzalez commented 2 years ago

Problem

When trying to create an Ubuntu 22.04 bootstrap repository, the command fains:

# mgr-create-bootstrap-repo -c ubuntu-22.04-amd64-uyuni
Creating bootstrap repo for ubuntu-22.04-amd64-uyuni
copy 'venv-salt-minion-3004-4.6.uyuni.amd64-deb'
Could not find a suitable control.tar file within '/srv/www/htdocs/pub/repositories/ubuntu/22/4/bootstrap.tmp/debs/venv-salt-minion-3004-4.6.uyuni.amd64-deb.deb'!
There have been errors!
Error creating bootstrap repo.

This happens because the reprepro package that contains the fix, was moved between buildservice projects, and at the new project it got a lower release than the one at the old project.

Solution

For Uyuni 2022.08:

At the Uyuni server, run:

zypper in --oldpackage reprepro-5.3.0-2.8.uyuni2

For Uyuni 2022.09 and newer:

The problem will be fixed, as now our package has the relase number 2.35, newer than the old 2.33.

Thanks to

@kyle-aas, @lumarel @chr78 for the reporting and/or helping with the debugging.

juliogonzalez commented 2 years ago

As the announcement is sent, a workaround is provided, and the fix will be part of 2022.09,

I will close the issue as fixed.

Thanks everyone!

@eins please create a new report.

eins commented 2 years ago

@juliogonzalez I have one question . for new report do you mean I need to create a new github issue or do yo want me to wait untill 2022.09 is out so I can update to 2022.09 and then see if I can boostrap ubutnu 22.04 minions

lumarel commented 2 years ago

@juliogonzalez Looks good after the one-liner!

lumarel commented 2 years ago

@eins I'm sure he meant a new issue :)

juliogonzalez commented 2 years ago

@eins I'm sure he meant a new issue :)

That is right. @eins please create a new GitHub issue. Bootstrapping should work after installing the right reprepro package. If it doesn't, then the problem is most likely different.

kschillingk commented 8 months ago

Hello, I'm running this issue trying to create Ubuntu repo. I'm running: Information for package Uyuni-Server-release:

Repository : uyuni-server-devel Name : Uyuni-Server-release Version : 2024.02-230900.213.4.uyuni3 Arch : x86_64 Vendor : obs://build.opensuse.org/systemsmanagement:Uyuni Support Level : Level 3 Installed Size : 1.4 KiB Installed : Yes (automatically) Status : up-to-date Source package : Uyuni-Server-release-2024.02-230900.213.4.uyuni3.src Summary : Uyuni Server Description : Uyuni lets you efficiently manage physical, virtual, and cloud-based Linux systems. It provides automated and cost-effective configuration and software management, asset management, and system provisioning.

kschillingk commented 8 months ago

some more info: * Thu Nov 17 2022 Jan Engelhardt jengelh@inai.de

juliogonzalez commented 7 months ago

@kschillingk please create a new issue and provide the information there, including the error, reprepro version etc.