[Pulp-list] Pulp 3.3 error on listing publications

David Davis daviddavis at redhat.com
Mon Jun 15 15:15:38 UTC 2020


I was able to reproduce this. It looks like at the beginning of the
publication creation task, an empty publication is getting created which
has an empty string for metadata_checksum_type. It's only at the end of the
task that the actual value for metadata_checksum_type gets set.

I filed an issue: https://pulp.plan.io/issues/6974

David


On Mon, Jun 15, 2020 at 10:38 AM Bin Li (BLOOMBERG/ 120 PARK) <
bli111 at bloomberg.net> wrote:

> Hi Fabricio,
>
> Below is the version of all pulp modules we are using.
> pulp-file 0.3.0
> pulp-file-client 0.3.0
> pulp-rpm 3.3.2
> pulp-rpm-client 3.3.1
> pulpcore 3.3.1
> pulpcore-client 3.3.1
>
>
> From: fabricio.aguiar at redhat.com At: 06/15/20 09:26:19
> To: Bin Li (BLOOMBERG/ 120 PARK ) <bli111 at bloomberg.net>
> Cc: pulp-list at redhat.com
> Subject: Re: [Pulp-list] Pulp 3.3 error on listing publications
>
> Hi Bin Li,
>
> Could you share what's the version of your pulp-rpm-client ?
>
> Best regards,
> Fabricio Aguiar
> Software Engineer, Pulp Project
> Red Hat Brazil - Latam <https://www.redhat.com/>
> +55 11 999652368
>
>
> On Wed, Jun 10, 2020 at 7:33 PM Bin Li (BLOOMBERG/ 120 PARK) <
> bli111 at bloomberg.net> wrote:
>
>> Hi All
>> Listing publications gives the following error when any publication is
>> being created. I don't recall see this issue before 3.3. Can this be fixed?
>>
>> Traceback (most recent call last):
>> File "./listpub.py", line 15, in <module>
>> PublicationsRpmApi(rpm_client).list().results
>> File
>> "/opt/utils/venv/pulp/3.7.3/lib64/python3.7/site-packages/pulpcore/client/pulp_rpm/api/publications_rpm_api.py",
>> line 289, in list
>> return self.list_with_http_info(**kwargs) # noqa: E501
>> File
>> "/opt/utils/venv/pulp/3.7.3/lib64/python3.7/site-packages/pulpcore/client/pulp_rpm/api/publications_rpm_api.py",
>> line 401, in list_with_http_info
>> collection_formats=collection_formats)
>> File
>> "/opt/utils/venv/pulp/3.7.3/lib64/python3.7/site-packages/pulpcore/client/pulp_rpm/api_client.py",
>> line 353, in call_api
>> _preload_content, _request_timeout, _host)
>> File
>> "/opt/utils/venv/pulp/3.7.3/lib64/python3.7/site-packages/pulpcore/client/pulp_rpm/api_client.py",
>> line 192, in __call_api
>> return_data = self.deserialize(response_data, response_type)
>> File
>> "/opt/utils/venv/pulp/3.7.3/lib64/python3.7/site-packages/pulpcore/client/pulp_rpm/api_client.py",
>> line 264, in deserialize
>> return self.__deserialize(data, response_type)
>> File
>> "/opt/utils/venv/pulp/3.7.3/lib64/python3.7/site-packages/pulpcore/client/pulp_rpm/api_client.py",
>> line 303, in __deserialize
>> return self.__deserialize_model(data, klass)
>> File
>> "/opt/utils/venv/pulp/3.7.3/lib64/python3.7/site-packages/pulpcore/client/pulp_rpm/api_client.py",
>> line 639, in __deserialize_model
>> kwargs[attr] = self.__deserialize(value, attr_type)
>> File
>> "/opt/utils/venv/pulp/3.7.3/lib64/python3.7/site-packages/pulpcore/client/pulp_rpm/api_client.py",
>> line 281, in __deserialize
>> for sub_data in data]
>> File
>> "/opt/utils/venv/pulp/3.7.3/lib64/python3.7/site-packages/pulpcore/client/pulp_rpm/api_client.py",
>> line 281, in <listcomp>
>> for sub_data in data]
>> File
>> "/opt/utils/venv/pulp/3.7.3/lib64/python3.7/site-packages/pulpcore/client/pulp_rpm/api_client.py",
>> line 303, in __deserialize
>> return self.__deserialize_model(data, klass)
>> File
>> "/opt/utils/venv/pulp/3.7.3/lib64/python3.7/site-packages/pulpcore/client/pulp_rpm/api_client.py",
>> line 641, in __deserialize_model
>> instance = klass(**kwargs)
>> File
>> "/opt/utils/venv/pulp/3.7.3/lib64/python3.7/site-packages/pulpcore/client/pulp_rpm/models/rpm_rpm_publication.py",
>> line 76, in __init__
>> self.metadata_checksum_type = metadata_checksum_type
>> File
>> "/opt/utils/venv/pulp/3.7.3/lib64/python3.7/site-packages/pulpcore/client/pulp_rpm/models/rpm_rpm_publication.py",
>> line 192, in metadata_checksum_type
>> .format(metadata_checksum_type, allowed_values)
>> ValueError: Invalid value for `metadata_checksum_type` (), must be one of
>> ['unknown', 'md5', 'sha1', 'sha224', 'sha256', 'sha384', 'sha512']
>>
>>
>> To reproduce the issue. run the below program when a creating publication
>> task is running.
>>
>> #!/usr/bin/env python
>> from pulpcore.client import pulpcore
>> from pulpcore.client import pulp_rpm
>> from pulpcore.client.pulp_rpm import PublicationsRpmApi
>>
>> # Configure HTTP basic authorization: basic
>> configuration = pulpcore.Configuration()
>> configuration.host = 'http://pulpserver'
>> configuration.username = 'admin'
>> configuration.password = 'admin'
>> configuration.safe_chars_for_path_param = '/'
>>
>> rpm_client = pulp_rpm.ApiClient(configuration)
>>
>> PublicationsRpmApi(rpm_client).list().results
>>
>>
>> _______________________________________________
>> Pulp-list mailing list
>> Pulp-list at redhat.com
>> https://www.redhat.com/mailman/listinfo/pulp-list
>
>
> _______________________________________________
> Pulp-list mailing list
> Pulp-list at redhat.com
> https://www.redhat.com/mailman/listinfo/pulp-list
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/pulp-list/attachments/20200615/6d7abab7/attachment.htm>


More information about the Pulp-list mailing list