Spurious error when attempting to refresh a ppa using pkgrepo.managed
Description of Issue/Question
I'm seeing spurious errors when I'm executing my salt states using salt-call. The pkgrepo command sometimes starts looking for an invalid ppa which fails. Re-running salt-call resolves the problem.
Setup
oracle-ppa:
pkgrepo.managed:
- humanname: WebUpd8 Oracle Java PPA repository
- ppa: webupd8team/java
- refresh: True
Steps to Reproduce Issue
sudo salt-call state.apply --local
----------
ID: oracle-ppa
Function: pkgrepo.managed
Result: False
Comment: An exception occurred in this state: Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/salt/state.py", line 1733, in call
**cdata['kwargs'])
File "/usr/lib/python2.7/dist-packages/salt/loader.py", line 1653, in wrapper
return f(*args, **kwargs)
File "/usr/lib/python2.7/dist-packages/salt/states/pkgrepo.py", line 328, in managed
ppa_auth=kwargs.get('ppa_auth', None)
File "/usr/lib/python2.7/dist-packages/salt/modules/aptpkg.py", line 1554, in get_repo
repo).expand(dist)[0]
File "/usr/lib/python2.7/dist-packages/softwareproperties/ppa.py", line 364, in __init__
info = get_ppa_info(self.shortcut)
File "/usr/lib/python2.7/dist-packages/softwareproperties/ppa.py", line 347, in get_ppa_info
_get_suggested_ppa_message(user, ppa))
ShortcutException: Cannot add PPA: 'ppa:~webupd8team/ubuntu/java'.
The team named '~webupd8team' has no PPA named 'ubuntu/java'
Please choose from the following available PPAs:
* 'atom': Atom text editor
* 'atraci': Atraci
* 'brackets': Brackets
* 'experiments': Experiments
* 'gnome3': GNOME 3 WebUpd8 PPA
* 'gthumb': gThumb
* 'haguichi': Haguichi
* 'java': Oracle Java (JDK) 7 / 8 / 9 Installer PPA
* 'mate': Mate (and Xfce) PPA
* 'nemo': Nemo file manager for Ubuntu
* 'puddletag': Puddletag
* 'pulseaudio-eq': Pulseaudio with Equalizer support
* 'rhythmbox': Rhythmbox
* 'sublime-text-2': Sublime Text 2
* 'sublime-text-3': Sublime Text 3 Installer
* 'subtitle-utils': Subtitle utils
* 'terminix': Terminix
* 'themes': WebUpd8 Themes Repository
* 'tor-browser': Tor Browser
* 'tribler': Tribler
* 'tt-rss': Tiny Tiny RSS
* 'unstable': Unstable / Backports
* 'vlmc': VLMC Daily Builds PPA
* 'y-ppa-manager': Y PPA Manager
Started: 00:12:13.074051
Duration: 62862.704 ms
Changes:
Versions Report
salt-call 2016.3.4 (Boron)
@billscheidel i'm not able to replicate this. When you run into this error can you manually add that ppa without the use of salt? Trying to see if this is an issue with teh host instead of with salt. Thanks
Yes, manually adding the host works without a problem. This happened again yesterday. The part I don't understand is that when it works it is looking for ppa:~webupd8team/java but when it fails it is looking for ppa:~webupd8team/ubuntu/java.
I haven't seen this in a long time now. I'll re-open if needed.