-
Notifications
You must be signed in to change notification settings - Fork 75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature: Allow arch selection/force during pro attach #3266
Comments
Hello, @Monochromics , thanks for reporting this. I'm curious on the error itself because the Pro Client does not deal with arches at all. So besides a flag, a whole new piece of functionality would be needed to sort this out... I see you included a general scenario, but would you have steps to reproduce those errors? It would be nice to see what the repository contains. My guess is that the mirroring could be done wrong - if you are only getting the Another thing that got my attention is the |
Hey @renanrodrigo , That's fair. I think the core problem is that a lot of people use apt-mirror as a mirroring tool, and my default it does not mirror the i386 items (as just On the other hand, I'm not sure that the pro client should abort the service enablement due to the i386 Release file missing when calling apt update. This would at least slightly be alleviated if the logged error was useful, but currently any apt failure is logged as assuming another apt process is running. This can be worked around to get the actual output by modifying /usr/lib/python3/dist-packages/uaclient/apt.py:
Reproducing all of this is a bit of a journey but basically you just need to:
You should just get that generic apt process is running msg unless the above changes to apt.py are made, but with those you'll see it exits when it notices the release file is missing. This occurs even if the global apt override I mentioned is set (presuming I'm using it correctly):
At least in bionic. It may be honored in more recent releases of apt. So to conclude, while this isn't really a true pro client issue, if there was an option to attach a machine and have the source set as something like:
instead (or just not fatally fail on apt update during attachment), it would avoid a number of potential pitfalls. |
Yeah this is horrible we need to improve the reporting there definitely.
Me neither, thinking about it. That is a little trickier to decide. Technically we could ignore it, but all
This is fair. I don't see we adding any flags, but I can see we adding a warning on enablement and continuing. I'll investigate further when I get some time to. |
Please describe the scenario where the new feature would be useful
Occasionally users would like to only enable amd64 packages on given clients. This is particularly relevant when using an on-prem contracts server where space may be limited and i386 packages are not mirrored.
Describe the solution you'd like
On pro attach, it would be nice to allow for --arch to only set up repositories for a given arch. Setting an overall APT:: conf does seem to work in focal+, but not in older series. Alternatively, a non-fatal error that allows attachment would be fine.
Current behavior
If your repository mirror does not contain i386 packages and you're using an on-prem contracts server (with an override for the repositories provided),
pro enable esm-apps
will fail. The logged error suggests an apt proc (sep issue) is running, but if you manually increase logging, you can see it fails when the i386 Packages file 404s. This then unloads the gpg key and fails the service enablement.The text was updated successfully, but these errors were encountered: