[Spacewalk-list] SUSE tokens broken since spacewalk 2.7

Sadri, Wafa (BITBW) Wafa.Sadri at bitbw.bwl.de
Thu Jan 11 08:47:45 UTC 2018


Hi there,

in my version of the file, the line looks a little different:

       # if self.url is metalink it will be expanded into
       # real urls in self.repo.urls and also save this metalink
       # in begin of the url list ("for repolist -v ... or anything else wants to know the baseurl")
       # Remove it from the list, we don't need it to download content of repo
       real_urls = []
       for url in self.repo.urls:
           if '?' not in url:
               real_urls.append(url)
       self.repo.urls = real_urls

Am I commenting out the whole thing, or just the for-loop? 
I might be in the wrong function alltogether, because this part of the code appears in the function "def __init__(self, url, name, yumsrc_conf=YUMSRC_CONF, org="1", channel_label="", no_mirrors=False, ca_cert_file=None, client_cert_file=None, client_key_file=None):"

The exact line you mentioned doesn't appear in my yum_src.py (which is located exactly where you said it would be). 

Regards,
Wafa 

-----Ursprüngliche Nachricht-----
Von: spacewalk-list-bounces at redhat.com [mailto:spacewalk-list-bounces at redhat.com] Im Auftrag von Michael Calmer
Gesendet: Mittwoch, 10. Januar 2018 16:54
An: spacewalk-list at redhat.com
Betreff: Re: [Spacewalk-list] SUSE tokens broken since spacewalk 2.7

Hi

Am Mittwoch, 10. Januar 2018, 16:18:07 CET schrieb Sadri, Wafa (BITBW):
> Hello everyone,
> 
> We're having issues syncing SUSE repositories since we upgraded to 2.7 in mid-december.
> We're using these type of URLs in our repositories:
> https://updates.suse.com/SUSE/Products/SLE-Module-Web-Scripting/12/x86_64/product&NOWAVERYLONGTOKENOFYOURREGISTEREDSYSTEM
> 
> Spacewalk is able to receive the repomd.xml file and starts to download the packages. But it fails with every single download. Looking at the log files, I can see that it does not request the resources using the token anymore. It will only request the repomd.xml file with the token. Therefor we're getting 403 errors for the actual package downloads. We've refreshed all the URLs, used different tokens... all with the same result. I've tried the SUSE support but they don't understand the problem and were not helpful at all!
> 
> Any idea if something has changed in the way spacewalk syncs repositories? Is the python-urlgrabber no longer used?

Guessing a bit. Maybe you want to try it out. I cannot tell you the exact path to the file in your installation But I hope you can find the right one:

/usr/lib/python2.7/site-packages/spacewalk/satellite_tools/repo_plugins/yum_src.py
At the end of the function "def setup_repo(self, repo, no_mirrors, ca_cert_file, client_cert_file, client_key_file):"

            # if self.url is metalink it will be expanded into
            # real urls in repo.urls and also save this metalink
            # in begin of the url list ("for repolist -v ... or anything else wants to know the baseurl")
            # Remove it from the list, we don't need it to download content of repo
            repo.urls = [url for url in repo.urls if '?' not in url]

Just try to comment out this last line. It seems at it is excluding all URLs with a '?' but the token is seperated by it as well.
Not sure if it help but maybe you can try out and report back.

-- 
Regards

	Michael Calmer

--------------------------------------------------------------------------
Michael Calmer
SUSE LINUX GmbH, Maxfeldstr. 5, D-90409 Nuernberg
T: +49 (0) 911 74053 0
F: +49 (0) 911 74053575  - e-mail: Michael.Calmer at suse.com
--------------------------------------------------------------------------
SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton,
                     HRB 21284 (AG Nürnberg)


_______________________________________________
Spacewalk-list mailing list
Spacewalk-list at redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-list




More information about the Spacewalk-list mailing list