[Pulp-list] Feed from authenticated repo (artifactory)

Vaclav Adamec vaclav.adamec at suchy-zleb.cz
Fri Mar 4 19:52:05 UTC 2016


With Beta I'm getting different error, If anybody else hit this I created
issue - https://pulp.plan.io/issues/1746

V

On Fri, Mar 4, 2016 at 4:16 PM, Michael Hrivnak <mhrivnak at redhat.com> wrote:

> Good news! A fix has already been done and will be released with 2.8.0.
>
> https://pulp.plan.io/issues/1263
>
> Michael
>
> On Fri, Mar 4, 2016 at 9:13 AM, Michael Hrivnak <mhrivnak at redhat.com>
> wrote:
>
>> If you don't mind filing an issue about it in our tracker, we'll take a
>> look.
>>
>> https://pulp.plan.io/projects/pulp_rpm/issues/new
>>
>> It should be an easy fix. If you or anyone else reading this is
>> interested in an easy code contribution to pulp, this would be a great
>> candidate!
>>
>> Aside from yum's code, did they cite any other specific documentation? I
>> would be very interested in seeing that.
>>
>> Michael
>>
>> On Fri, Mar 4, 2016 at 1:30 AM, Vaclav Adamec <
>> vaclav.adamec at suchy-zleb.cz> wrote:
>>
>>> So they response is quite ... unhelpful, based on some documenation
>>> for repomd.xml seems that revision can be also null (number or null), any
>>> chance to "fix" this on Pulp side or is it something which Pulp really use
>>> for repo sync ?
>>>
>>> #/usr/lib/python2.7/site-packages/pulp_rpm/plugins/importers/yum/repomd/metadata.py
>>> +168
>>>
>>>             if element.tag == REVISION_TAG:
>>>                 try:
>>>                     self.revision = int(element.text)
>>>
>>>
>>>
>>> On Thu, Mar 3, 2016 at 6:40 AM, Vaclav Adamec <
>>> vaclav.adamec at suchy-zleb.cz> wrote:
>>>
>>>> Revision is empty element: <revision />
>>>>
>>>> http://pastebin.com/raw/3YCq7dTN
>>>>
>>>> I'll get in touch with Artifactory support, if it's possible to fix
>>>> this on their side. Thanks for help
>>>>
>>>> Vasek
>>>>
>>>> On Wed, Mar 2, 2016 at 10:26 PM, Michael Hrivnak <mhrivnak at redhat.com>
>>>> wrote:
>>>>
>>>>> Interesting. Can you provide the contents of
>>>>> https://artifactory-master.test.com/artifactory/yum-local/test-repo/6/x86_64/repodata/repomd.xml
>>>>> ?
>>>>>
>>>>> It should have an element like this: <revision>1456870296</revision>
>>>>>
>>>>> But based on the error you're seeing, I suspect it does not, or that
>>>>> it is empty. Unfortunately, we haven't been able to identify a documented
>>>>> schema for this file (or any of the other yum repo metadata files), so it
>>>>> is difficult to know what is guaranteed or required to be present.
>>>>>
>>>>> Here is an example that does have the revision element, near the top:
>>>>>
>>>>>
>>>>> https://repos.fedorapeople.org/repos/pulp/pulp/demo_repos/zoo/repodata/repomd.xml
>>>>>
>>>>> Michael
>>>>>
>>>>> On Wed, Mar 2, 2016 at 10:34 AM, Vaclav Adamec <
>>>>> vaclav.adamec at suchy-zleb.cz> wrote:
>>>>>
>>>>>> Pulp reports any issue with metadata, but I can use this repository
>>>>>> directly in yum, without any issues.
>>>>>>
>>>>>> http://pastebin.com/x1p2zme3
>>>>>>
>>>>>> Any advice ?
>>>>>>
>>>>>> Vasek
>>>>>>
>>>>>>
>>>>>> On Tue, Mar 1, 2016 at 4:30 PM, Sean Myers <sean.myers at redhat.com>
>>>>>> wrote:
>>>>>>
>>>>>>> On 02/29/2016 11:11 AM, Vaclav Adamec wrote:
>>>>>>> > Hi,
>>>>>>> >  it is possible to feed pulp repo from authenticated source ? eg
>>>>>>> something
>>>>>>> > like this:
>>>>>>> >
>>>>>>> > pulp-admin rpm repo create --repo-id=test-repo-x86_64-live
>>>>>>> > --display-name="TEST REPO x86_64 (Live)" --description="TEST REPO
>>>>>>> x86_64
>>>>>>> > (Live)" --feed="
>>>>>>> >
>>>>>>> https://login:pass@artifactory-master.test.com/artifactory/yum-local/test-repo/6/x86_64/
>>>>>>> "
>>>>>>> > --serve-http=True --serve-https=False
>>>>>>> > --relative-url=/test-repo/6/x86_64/live
>>>>>>> >
>>>>>>> > or
>>>>>>> >
>>>>>>> > pulp-admin rpm repo create --repo-id=test-repo-x86_64-live
>>>>>>> > --display-name="TEST REPO x86_64 (Live)" --description="TEST REPO
>>>>>>> x86_64
>>>>>>> > (Live)" --feed="
>>>>>>> >
>>>>>>> https://login:pass@artifactory-master.test.com/artifactory/yum-local/test-repo/6/x86_64/
>>>>>>> "
>>>>>>> > --serve-http=True --serve-https=False
>>>>>>> > --relative-url=/test-repo/6/x86_64/live
>>>>>>> > --basicauth-user=login --basicauth-pass=pass
>>>>>>> >
>>>>>>> > I'm getting:
>>>>>>> >
>>>>>>> > pulp-admin rpm repo sync run --repo-id=test-repo-x86_64-live
>>>>>>> >
>>>>>>> > Task Failed
>>>>>>> > int() argument must be a string or a number, not 'NoneType'
>>>>>>> >
>>>>>>> >
>>>>>>> > Via curl I can download metadata without any issues, no ssl
>>>>>>> problems at
>>>>>>> > all. Any clue ?
>>>>>>>
>>>>>>> I don't know what's causing that error, but a couple things in those
>>>>>>> URLs might be confusing pulp. Some tracebacks related to the error
>>>>>>> would
>>>>>>> probably help to troubleshoot.
>>>>>>>
>>>>>>>
>>>>>>> https://pulp.readthedocs.org/en/latest/user-guide/troubleshooting.html
>>>>>>>
>>>>>>> Here are some guesses that might help in the meantime...
>>>>>>>
>>>>>>> The second method looks most correct. You don't need the "login:pass@
>>>>>>> "
>>>>>>> out of the feed URL. If I remember right, pulp ignores them.
>>>>>>> Regardless,
>>>>>>> using --basicauth-user and --basicauth-pass is the supported way to
>>>>>>> get
>>>>>>> basic auth working. Also, --relative-url should be a relative URL,
>>>>>>> and
>>>>>>> not have a leading slash. I don't see anything else that would anger
>>>>>>> the
>>>>>>> pulp gods of validation, but my eyes are notoriously bad regex
>>>>>>> parsers.
>>>>>>> Try this out:
>>>>>>>
>>>>>>> pulp-admin rpm repo create --repo-id=test-repo-x86_64-live
>>>>>>> --display-name="TEST REPO x86_64 (Live)" --description="TEST REPO
>>>>>>> x86_64
>>>>>>> (Live)"
>>>>>>> --feed="
>>>>>>> https://artifactory-master.test.com/artifactory/yum-local/test-repo/6/x86_64/
>>>>>>> "
>>>>>>> --serve-http=True --serve-https=False
>>>>>>> --relative-url=test-repo/6/x86_64/live --basicauth-user=login
>>>>>>> --basicauth-pass=pass
>>>>>>>
>>>>>>> The equals signs in args aren't strictly needed (but also aren't
>>>>>>> hurting
>>>>>>> anything), so this should also work:
>>>>>>>
>>>>>>> pulp-admin rpm repo create --repo-id=test-repo-x86_64-live
>>>>>>> --display-name="TEST REPO x86_64 (Live)" --description="TEST REPO
>>>>>>> x86_64
>>>>>>> (Live)"
>>>>>>> --feed="
>>>>>>> https://artifactory-master.test.com/artifactory/yum-local/test-repo/6/x86_64/
>>>>>>> "
>>>>>>> --serve-http true --serve-https false
>>>>>>> --relative-url=test-repo/6/x86_64/live --basicauth-user login
>>>>>>> --basicauth-pass pass
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> -- May the fox be with you ...
>>>>>>    /\
>>>>>>   (~(
>>>>>>    ) )         /\_/\
>>>>>>   (_=---_(@ @)
>>>>>>     (          \   /
>>>>>>     /|/----\|\  V
>>>>>>     " "     " "
>>>>>>
>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>> Pulp-list mailing list
>>>>>> Pulp-list at redhat.com
>>>>>> https://www.redhat.com/mailman/listinfo/pulp-list
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> -- May the fox be with you ...
>>>>    /\
>>>>   (~(
>>>>    ) )         /\_/\
>>>>   (_=---_(@ @)
>>>>     (          \   /
>>>>     /|/----\|\  V
>>>>     " "     " "
>>>>
>>>>
>>>>
>>>
>>>
>>> --
>>> -- May the fox be with you ...
>>>    /\
>>>   (~(
>>>    ) )         /\_/\
>>>   (_=---_(@ @)
>>>     (          \   /
>>>     /|/----\|\  V
>>>     " "     " "
>>>
>>>
>>>
>>> _______________________________________________
>>> Pulp-list mailing list
>>> Pulp-list at redhat.com
>>> https://www.redhat.com/mailman/listinfo/pulp-list
>>>
>>
>>
>


-- 
-- May the fox be with you ...
   /\
  (~(
   ) )         /\_/\
  (_=---_(@ @)
    (          \   /
    /|/----\|\  V
    " "     " "
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/pulp-list/attachments/20160304/4600f6be/attachment.htm>


More information about the Pulp-list mailing list