Bug 1315608

Summary: Enabling OStree repos from imported manifest raises: [E] 400 Bad Request (RestClient::BadRequest)
Product: Red Hat Satellite Reporter: Sachin Ghai <sghai>
Component: Content ManagementAssignee: Partha Aji <paji>
Status: CLOSED NOTABUG QA Contact: Sachin Ghai <sghai>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.2.0CC: bbuckingham, sghai
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-03-15 10:21:06 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:
Attachments:
Description Flags
400 Bad Request on enabling ostree repos none

Description Sachin Ghai 2016-03-08 08:36:51 UTC
Created attachment 1134065 [details]
400 Bad Request on enabling ostree repos

Description of problem:
I was trying to enable ostree repo from imported manifest and got following:


2016-03-08 03:30:15 [app] [I] Started PUT "/katello/products/67/toggle_repository" for 10.65.193.200 at 2016-03-08 03:30:15 -0500
2016-03-08 03:30:15 [app] [I] Processing by Katello::ProductsController#toggle_repository as */*
2016-03-08 03:30:15 [app] [I]   Parameters: {"repo"=>"1", "pulp_id"=>"Default_Organization-Red_Hat_Enterprise_Linux_Atomic_Host-Red_Hat_Enterprise_Linux_Atomic_Host_Trees", "content_id"=>"3822", "id"=>"67"}
2016-03-08 03:30:15 [foreman-tasks/dynflow] [I] start terminating throttle_limiter...
2016-03-08 03:30:15 [foreman-tasks/dynflow] [I] start terminating client dispatcher...
2016-03-08 03:30:15 [foreman-tasks/dynflow] [I] stop listening for new events...
2016-03-08 03:30:15 [foreman-tasks/dynflow] [I] start terminating clock...
2016-03-08 03:30:15 [foreman-tasks/dynflow] [I] start terminating throttle_limiter...
2016-03-08 03:30:15 [foreman-tasks/dynflow] [I] start terminating client dispatcher...
2016-03-08 03:30:15 [foreman-tasks/dynflow] [I] stop listening for new events...
2016-03-08 03:30:15 [foreman-tasks/dynflow] [I] start terminating clock...
2016-03-08 03:30:17 [katello/pulp_rest] [E] RestClient.post "https://cloud-qe-7.idmqe.lab.eng.bos.redhat.com/pulp/api/v2/repositories/", 105310 byte(s) length, "Accept"=>"*/*; q=0.5, application/xml", "Accept-Encoding"=>"gzip, deflate", "Content-Length"=>"105310", "accept"=>"application/json", "content_type"=>"application/json"
 | \n# => 400 BadRequest | application/json 385 bytes
 | 
2016-03-08 03:30:17 [foreman-tasks/action] [E] 400 Bad Request (RestClient::BadRequest)
 | /opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-1.6.7/lib/restclient/abstract_response.rb:48:in `return!'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/runcible-1.6.0/lib/runcible/base.rb:79:in `block in get_response'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-1.6.7/lib/restclient/request.rb:228:in `call'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-1.6.7/lib/restclient/request.rb:228:in `process_result'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/rbovirt-0.0.35/lib/restclient_ext/request.rb:50:in `block in transmit'
 | /opt/rh/rh-ruby22/root/usr/share/ruby/net/http.rb:853:in `start'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/rbovirt-0.0.35/lib/restclient_ext/request.rb:44:in `transmit'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-1.6.7/lib/restclient/request.rb:64:in `execute'


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

How reproducible:
always

Steps to Reproduce:
1. import manifest
2. go to OStree repo set
3. enable Red_Hat_Enterprise_Linux_Atomic_Host-Red_Hat_Enterprise_Linux_Atomic_Host_Trees

Actual results:
 [katello/pulp_rest] [E] RestClient.post "https://cloud-qe-7.idmqe.lab.eng.bos.redhat.com/pulp/api/v2/repositories/", 105310 byte(s) length, "Accept"=>"*/*; q=0.5, application/xml", "Accept-Encoding"=>"gzip, deflate", "Content-Length"=>"105310", "accept"=>"application/json", "content_type"=>"application/json"
 | \n# => 400 BadRequest | application/json 385 bytes
 | 
2016-03-08 03:30:17 [foreman-tasks/action] [E] 400 Bad Request (RestClient::BadRequest)


Expected results:
repo should be enabled successfully

Additional info:
Please note that I can enable other rhel repos like rhel7Server with same manifest

Comment 2 Partha Aji 2016-03-11 22:36:48 UTC
Hmm I ve tried this on a couple of sat boxes with Snap 3 and not hit this. Can ya give it a shot the latest snap again. Note you need to have ostree enabled and pulp-ostree available. If you hit this again can you attach a foreman debug?

Comment 3 Sachin Ghai 2016-03-15 10:21:06 UTC
python-gnupg package was blocking me to enable ostree plugin. I enabled it and can sync the ostree with snap3 from CDN now. Thanks.