Bug 1645748

Summary: creating non-yum repo with a download_policy parameter no longer raises HTTPError
Product: Red Hat Satellite Reporter: Roman Plevka <rplevka>
Component: API - ContentAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED DUPLICATE QA Contact: Roman Plevka <rplevka>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.5.0CC: rplevka
Target Milestone: UnspecifiedKeywords: Regression, Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-01-14 16:23:22 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Roman Plevka 2018-11-03 10:11:11 UTC
Description of problem:
This has changed since 6.4.0 and I'm not quite sure whether this was intended.
However the API now successfully creates the repository, ignoring the download_policy parameter.


<pre>
Making HTTP POST request to https://qe-sat65-rhel7-tier1.satqe.lab.eng.rdu2.redhat.com/katello/api/v2/repositories with options {'auth': ('admin', 'changeme'), 'verify': False, 'headers': {'content-type': 'application/json'}}, no params and data {"content_type": "puppet", "download_policy": "on_demand", "name": "BpkxJlInCiaf", "url": "http://inecas.fedorapeople.org/fakerepos/zoo3/", "product_id": 574}.

2018-11-02 21:03:28 - gw0 - nailgun.client - DEBUG - Received HTTP 200 response: {"ostree_branches":[],"relative_path":"HOBjwb/Library/custom/oIXmkxBx/BpkxJlInCiaf","promoted":false,"content_view_version_id":336,"library_instance_id":null,"organization":{"name":"HOBjwb","label":"HOBjwb","id":437},"created_at":"2018-11-03 01:03:26 UTC","updated_at":"2018-11-03 01:03:28 UTC","backend_identifier":"b75a77c2-0cba-44b8-beda-88d7ca4c9dca","container_repository_name":null,"full_path":"http://qe-sat65-rhel7-tier1.satqe.lab.eng.rdu2.redhat.com/pulp/puppet/b75a77c2-0cba-44b8-beda-88d7ca4c9dca/","id":127,"name":"BpkxJlInCiaf","label":"BpkxJlInCiaf","description":null,"last_sync":null,"content_view":{"id":368,"name":"Default Organization View"},"content_type":"puppet","url":"http://inecas.fedorapeople.org/fakerepos/zoo3/","arch":"noarch","content_id":"1541207008318","major":null,"minor":null,"product":{"id":574,"cp_id":"666173607430","name":"oIXmkxBx","orphaned":false,"sync_plan":["name","description","sync_date","interval","next_sync"]},"content_label":"HOBjwb_oIXmkxBx_BpkxJlInCiaf","content_counts":{"ostree_branch":0,"docker_manifest":0,"docker_manifest_list":0,"docker_tag":0,"rpm":0,"srpm":0,"package":0,"package_group":0,"erratum":0,"puppet_module":0,"file":0,"deb":0,"module_stream":0},"last_sync_words":null,"environment":{"id":331,"registry_unauthenticated_pull":false},"docker_upstream_name":null,"docker_tags_whitelist":null,"mirror_on_sync":true,"verify_ssl_on_sync":true,"unprotected":true,"checksum_type":null,"download_policy":null,"gpg_key_id":null,"ssl_ca_cert_id":null,"ssl_client_cert_id":null,"ssl_client_key_id":null,"upstream_username":null,"ostree_upstream_sync_policy":null,"ostree_upstream_sync_depth":null,"computed_ostree_upstream_sync_depth":0,"deb_releases":null,"deb_components":null,"deb_architectures":null,"ignore_global_proxy":false,"ignorable_content":null,"ssl_ca_cert":null,"ssl_client_cert":null,"ssl_client_key":null,"gpg_key":null,"permissions":{"deletable":true},"upstream_password_exists":false,"upstream_auth_exists":false,"content_view_environments":[]}
</pre>

Version-Release number of selected component (if applicable):


Steps to Reproduce:
1. just POST to /repositories endpoint, uses content_type other than yum and add download_policy parameter
2. observe the repo is created and API does not raise any error
3. bonus: observe that the response code is 200 instead of 201 (this is probably for a separate bug)

Comment 3 Brad Buckingham 2018-11-06 18:31:26 UTC
Roman,

Is there any negative impact observed from the behavior?

E.g. can you still sync and use that repository?

Comment 4 Roman Plevka 2019-01-11 09:16:11 UTC
(In reply to Brad Buckingham from comment #3)
> Roman,
> 
> Is there any negative impact observed from the behavior?
> 
> E.g. can you still sync and use that repository?

I'm not aware of any.

Comment 5 Brad Buckingham 2019-01-14 16:23:22 UTC

*** This bug has been marked as a duplicate of bug 1654944 ***