uyuni icon indicating copy to clipboard operation
uyuni copied to clipboard

Is there a way to stop uyuni from updating ubuntu packages on hold?

Open j-kihet opened this issue 2 years ago • 9 comments

Question

Currently uyuni updates packages on ubuntu that are on hold. Is there any way to stop this? Tested it on Ubuntu 18.04 and 20.04

Version of Uyuni Server and Proxy (if used)

2022.02-171.1.uyuni1

j-kihet avatar Mar 16 '22 09:03 j-kihet

HI, It will be great that Uyuni doesnt upgrade the packages marked as hold. Is it possible to see what packages are hold on te Uyuni Website ?

Thanks in advance ;)

rchekhina avatar Jun 17 '22 10:06 rchekhina

@j-kihet @rchekhina, "locking" or "holding" packages should already work since 2021.12: https://www.uyuni-project.org/doc/2022.05/release-notes-uyuni-server.html#_package_locking_for_salt_minions

But it will work only if you do it from SUSE Manager/Uyuni, not if you use apt.

Is that not working?

juliogonzalez avatar Jun 17 '22 11:06 juliogonzalez

HI, this morning I have done a test with uyuni 2022.05. I have marked a package to hold with apt-mark and tried to update from apt and the package was not updated but I try from the uyuni website and the package has been updated.

rchekhina avatar Jun 17 '22 11:06 rchekhina

You need to mark the package at Uyuni itself. Doing it with apt-mark (or other mechanism, locally at the instance), is not supported.

juliogonzalez avatar Jun 17 '22 11:06 juliogonzalez

Or that's my understanding, right @meaksh and @mcalmer?

juliogonzalez avatar Jun 17 '22 11:06 juliogonzalez

ok so I will look the doc that you give me thks ;)

rchekhina avatar Jun 17 '22 11:06 rchekhina

other thing after update the system with apt I see on the uyuni web that the system as the same packages to upgrade. Do you know why ?

rchekhina avatar Jun 17 '22 11:06 rchekhina

It can take a while until Uyuni runs the package refresh.

The thing is: you should never use apt to update stuff. You should be doing it from Uyuni itself (via WebUI, API, spacecmd, etc)

juliogonzalez avatar Jun 17 '22 12:06 juliogonzalez

I wonder if this might be a salt behavior. There is a lot of code in the package state for "hold". Maybe the idea is, if you explicitly say, that you want to update pkg A, that the hold is removed. But reading the salt docs, it should not be the case. But there is a parameter in pkg.installed to do it (update_holds=False). But the default is False and AFAIK we do not set it to True. So holds should be taken into account. This should be also the case if you added the hold locally only. Maybe this should be converted into a bug report?

mcalmer avatar Jul 01 '22 07:07 mcalmer