-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
[BUG] pkgrepo.managed fails to configure ppa on Ubuntu 20.10 #59065
Comments
Hi there! Welcome to the Salt Community! Thank you for making your first contribution. We have a lengthy process for issues and PRs. Someone from the Core Team will follow up as soon as possible. In the meantime, here’s some information that may help as you continue your Salt journey.
There are lots of ways to get involved in our community. Every month, there are around a dozen opportunities to meet with other contributors and the Salt Core team and collaborate in real time. The best way to keep track is by subscribing to the Salt Community Events Calendar. |
The I'm not even sure this API is supposed to be public. The |
I got the same problem on Ubuntu 20.10, here is my sls part that generate this error:
|
Hmm I couldn't reproduce it with 3002.2, could you please try 3002.2? |
Looks like it works now both on 3002.2 from Saltstack repo and on 3001+dfsg1-2 from Ubuntu repository. Ubuntu devs had to fixed python3-software-properties package. But there's one new small issue now: every time I run high state, ppa repositories are updated.
|
@raczkow are you ok to close this issue? |
Yes, it's OK. |
cool, thanks a lot @raczkow |
Happy new year folks, although this issue is closed, I'm experiencing the problem here on Ubuntu 20.10 running 3002.2 from Saltstack repo. python3-software-properties version is 0.99.3. Cheers |
FYI for anyone finding this issue, looks like the problem was merely punted forward into Ubuntu 21.04 which includes Salt 3002.2. So the problem isn't solved but more like postponed. Installing 3003.3 does not resolve the issue, but since the distribution includes 3002.2 that's what I'll list below.
|
@krionbsd This bug should be reopened as it still doesn't work in Ubuntu 20.10 and, as @Artanicus said - on Ubuntu 21.04 I have confirmed, that it was fixed in Ubuntu 20.10 but apparently it is not. I didn't noticed that I already patched my
With this patch I am allowed to configure PPA with salt, but PPA repos are changing every time I run a high state. It works for me, but it is not a good solution :-/ |
Seeing it in Ubuntu 22.04 pre-release, salt-minion 3004 (installed from
|
Still happening with 3004.1 on 22.04 (jammy). I'm not sure whether this is the right fix, but this is the patch I'm using locally, which seems to work and also doesn't change the PPA repo entry every time it runs:
|
I have the same issue. The patch in #59065 (comment) helped. |
Retesting with the most recent Salt 3005.1 release, this issue still exists. |
Confirmed that this is still a problem on Ubuntu 22.04 + Salt 3004.1. The patch in #59065 (comment) fixes it. It would be great if this could be committed. |
Confirmed still happening in 3005.1
|
Ummm... I have to amend the above. I have two ubuntu systems, both started their lives as 20.04LTS and have gone through do-release-upgrade. Both have 3005.1 installed. However, I got the error on one of the systems but not on the other. Here's the diff between them: Server WITHOUT error:
As you can see, on the server that doesn't fail, this is a onedir package. Server WITH error:
As you can see, this is a legacy package for Ubuntu 20 (focal)... not 22 (jammy) So.. I updated my apt-source by following the install guide (https://docs.saltproject.io/salt/install-guide/en/latest/topics/install-by-operating-system/ubuntu.html#install-onedir-packages-of-salt-on-ubuntu-22-04-jammy) to update to a onedir package. After running the following....
... no more error. Moral of the story.... Don't forget to update third-party apt sources when doing a release upgrade. :/ |
This begs the question (for another thread), should the salt-minion issue an "unsupported os version for salt-minion" warning when running jobs to help incompetent people, like me, to do a proper upgrade? :) |
Confirmed this exists in a brand new Ubuntu 22.04.1 LTS (installed on OSX using multipass). FWIW salt was installed using the bash script (not $ salt-minion --version
salt-minion 3005.1 $ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=22.04
DISTRIB_CODENAME=jammy
DISTRIB_DESCRIPTION="Ubuntu 22.04.1 LTS" Note I've done The patch in #59065 (comment) fixed it for me and I applied it using a salt state (on my masterless-minion). # Patches SaltStack Issue 59065
# See https://github.com/saltstack/salt/issues/59065#issuecomment-1366575542
{% if grains.saltversion == "3005.1" %}
# Just in case there is no patch command installed
patch:
pkg.installed
# We use directory name here (saltpath) to apply patches that touch multiple files
patch_applied_59065:
file.patch:
- name: '{{ grains.saltpath }}'
- source: salt://patches/files/saltstack_issue_59065.diff
- strip: 6
- require:
- pkg: patch
# Restart salt minion after the patch is applied and the config option is set
restart_salt_minion:
cmd.run:
- name: 'salt-call service.restart salt-minion'
- bg: true
- onchanges:
- patch_applied_59065
{%- endif %} Where |
The bug can be bypassed by switching to a regular type of repository instead of ppa. E.g.:
to
|
I find dfidler's response is still accurate today ( #59065 (comment) ). The onedir version meant for jammy doesn't have this issue. It's worth noting that the 22.04 server that I bumped into this issue on was only provisioned yesterday, but used the salt-bootstrap.sh script to provision salt on this server (forcing an install of the 3005 branch with the options). The bootstrap script incorrectly provisioned the repo to point to the focal/20.04 classic download repo and not using the onedir repo. Installer made no complaints and the install was generally functional except for this issue. Since swapping the repo list to the following and upgrading packages:
The problem has vanished. So I would encourage folks to check their jammy repos as they may not be what you expect them to be. As far as I can tell, all releases meant for Jammy should be onedir only. There have been no classic releases for jammy (classic https://repo.saltproject.io/py3/ubuntu/ vs onedir https://repo.saltproject.io/salt/py3/ubuntu/) Just postulating here, but it's possible onedir doesn't have this problem since python is self-contained and doesn't require the OS to have python installed to be functional. |
To confirm, there are no classic packages for Jammy, and only onedir packages were built for Jammy. Closing this issue since there is a work-around, and the direction forward is onedir which does not exhibit the problem, but please re-open if you feel there is other information relevant to the issue |
I am on the latest salt version and on ubuntu jammy. I had the same issue.
|
we faced this too in our salt code where the fix also was to remove python3-software-properties. (22.x) |
Description
After upgrade to Ubuntu 20.10, I can't setup my ppa repositories. Running high.state fails with error:
Looks, like changes in
python3-software-properties
break salt.Setup
I'm using masterless salt configuration.
sls that fails to run:
Steps to Reproduce the behavior
pkgrepo.managed
Expected behavior
ppa is properly configured.
Versions Report
salt --versions-report
python3-software-properties version
Additional context
Salt installed from official Ubuntu 20.10 packages. Problem also exists on latest 3002.2 provided from saltstack repositories.
The text was updated successfully, but these errors were encountered: