Awesome! 

Thanks guys, Katello through the proxy working now.

CC


On Tue, Jul 2, 2013 at 10:21 PM, VAN CAUSBROECK Wannes <Wannes.VANCAUSBROECK@onprvp.fgov.be> wrote:
OMG........

Thanks!!!!

-----Original Message-----
From: katello-bounces@lists.fedorahosted.org [mailto:katello-bounces@lists.fedorahosted.org] On Behalf Of Justin Sherrill
Sent: dinsdag 2 juli 2013 16:15
To: katello@lists.fedorahosted.org
Subject: Re: Katello to use upstream proxy

On 07/02/2013 10:06 AM, VAN CAUSBROECK Wannes wrote:
> Justin,
>
> I don't get any error in pulp.log. When I look at the messages in katello I get (for example: when trying to promote):
>
> Failed to promote changeset '1ste to dev'. Check notices for more
> details
> 400 Bad Request (RestClient::BadRequest)
> {"http_request_method": "POST", "exception": null, "error_message":
> "Invalid proxy port: 8080", "_href": "/pulp/api/v2/repositories/",
> "http_status": 400, "args": ["Invalid proxy port: 8080"], "traceback":
> null}
>
>
> /opt/rh/ruby193/root/usr/share/gems/gems/rest-client-1.6.1/lib/restclient/abstract_response.rb:48:in `return!'
> /opt/rh/ruby193/root/usr/share/gems/gems/runcible-0.4.4/lib/runcible/base.rb:93:in `block in get_response'
> /opt/rh/ruby193/root/usr/share/gems/gems/rest-client-1.6.1/lib/restclient/request.rb:218:in `call'
> /opt/rh/ruby193/root/usr/share/gems/gems/rest-client-1.6.1/lib/restclient/request.rb:218:in `process_result'
> /opt/rh/ruby193/root/usr/share/gems/gems/rest-client-1.6.1/lib/restclient/request.rb:169:in `block in transmit'
> /opt/rh/ruby193/root/usr/share/ruby/net/http.rb:745:in `start'
> /opt/rh/ruby193/root/usr/share/gems/gems/rest-client-1.6.1/lib/restclient/request.rb:166:in `transmit'
> /opt/rh/ruby193/root/usr/share/gems/gems/rest-client-1.6.1/lib/restclient/request.rb:60:in `execute'
> /opt/rh/ruby193/root/usr/share/gems/gems/rest-client-1.6.1/lib/restclient/request.rb:31:in `execute'
> /opt/rh/ruby193/root/usr/share/gems/gems/rest-client-1.6.1/lib/restclient/resource.rb:59:in `post'
> /opt/rh/ruby193/root/usr/share/gems/gems/runcible-0.4.4/lib/runcible/base.rb:92:in `get_response'
> /opt/rh/ruby193/root/usr/share/gems/gems/runcible-0.4.4/lib/runcible/base.rb:83:in `call'
> /opt/rh/ruby193/root/usr/share/gems/gems/runcible-0.4.4/lib/runcible/resources/repository.rb:45:in `create'
> /opt/rh/ruby193/root/usr/share/gems/gems/runcible-0.4.4/lib/runcible/extensions/repository.rb:79:in `create_with_importer_and_distributors'
> /usr/share/katello/app/models/glue/pulp/repo.rb:126:in `create_pulp_repo'
> /usr/share/katello/app/models/glue.rb:174:in `execute'
> /usr/share/katello/app/models/glue.rb:124:in `block in process'
> /usr/share/katello/app/models/glue.rb:111:in `each'
> /usr/share/katello/app/models/glue.rb:111:in `process'
> /usr/share/katello/app/models/glue.rb:35:in `on_save'
> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:214:in `_conditional_callback_around_3442'
> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:425:in `_run__2132739029305417872__save__1768893253466987421__callbacks'
> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:405:in `__run_callback'
> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:385:in `_run_save_callbacks'
> /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:81:in `run_callbacks'
> /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/callbacks.rb:264:in `create_or_update'
> /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/persistence.rb:104:in `save!'
> /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/validations.rb:56:in `save!'
> /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/attribute_methods/dirty.rb:33:in `save!'
> /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/transactions.rb:246:in `block in save!'
> /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/transactions.rb:295:in `block in with_transaction_returning_status'
> /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract/database_statements.rb:192:in `transaction'
> /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/transactions.rb:208:in `transaction'
> /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/transactions.rb:293:in `with_transaction_returning_status'
> /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/transactions.rb:246:in `save!'
> /usr/share/katello/app/lib/lazy_accessor.rb:108:in `save!'
> /usr/share/katello/app/models/repository.rb:240:in `create_clone'
> /usr/share/katello/app/models/content_view.rb:384:in `block in promote_repos'
> /usr/share/katello/app/models/content_view.rb:380:in `each_pair'
> /usr/share/katello/app/models/content_view.rb:380:in `promote_repos'
> /usr/share/katello/app/models/content_view.rb:215:in `promote'
> /usr/share/katello/app/models/promotion_changeset.rb:145:in `block in promote_views'
> /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/relation/delegation.rb:6:in `collect'
> /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/relation/delegation.rb:6:in `collect'
> /usr/share/katello/app/models/promotion_changeset.rb:144:in `promote_views'
> /usr/share/katello/app/models/promotion_changeset.rb:83:in `promote_content'
> /usr/share/katello/app/models/async_operation.rb:59:in `perform'
> /opt/rh/ruby193/root/usr/share/gems/gems/delayed_job-3.0.2/lib/delayed/backend/base.rb:94:in `block in invoke_job'
> /opt/rh/ruby193/root/usr/share/gems/gems/delayed_job-3.0.2/lib/delayed/lifecycle.rb:60:in `call'
> /opt/rh/ruby193/root/usr/share/gems/gems/delayed_job-3.0.2/lib/delayed/lifecycle.rb:60:in `block in initialize'
> /opt/rh/ruby193/root/usr/share/gems/gems/delayed_job-3.0.2/lib/delayed/lifecycle.rb:65:in `call'
> /opt/rh/ruby193/root/usr/share/gems/gems/delayed_job-3.0.2/lib/delayed/lifecycle.rb:65:in `execute'
> /opt/rh/ruby193/root/usr/share/gems/gems/delayed_job-3.0.2/lib/delayed/lifecycle.rb:38:in `run_callbacks'
> /opt/rh/ruby193/root/usr/share/gems/gems/delayed_job-3.0.2/lib/delayed/backend/base.rb:91:in `invoke_job'
> /opt/rh/ruby193/root/usr/share/gems/gems/delayed_job-3.0.2/lib/delayed/worker.rb:178:in `block (2 levels) in run'
> /opt/rh/ruby193/root/usr/share/ruby/timeout.rb:68:in `timeout'
> /opt/rh/ruby193/root/usr/share/gems/gems/delayed_job-3.0.2/lib/delayed/worker.rb:178:in `block in run'
> /opt/rh/ruby193/root/usr/share/ruby/benchmark.rb:295:in `realtime'
> /opt/rh/ruby193/root/usr/share/gems/gems/delayed_job-3.0.2/lib/delayed/worker.rb:177:in `run'
> /opt/rh/ruby193/root/usr/share/gems/gems/delayed_job-3.0.2/lib/delayed/worker.rb:234:in `block in reserve_and_run_one_job'
> /opt/rh/ruby193/root/usr/share/gems/gems/delayed_job-3.0.2/lib/delayed/lifecycle.rb:60:in `call'
> /opt/rh/ruby193/root/usr/share/gems/gems/delayed_job-3.0.2/lib/delayed/lifecycle.rb:60:in `block in initialize'
> /opt/rh/ruby193/root/usr/share/gems/gems/delayed_job-3.0.2/lib/delayed/lifecycle.rb:65:in `call'
> /opt/rh/ruby193/root/usr/share/gems/gems/delayed_job-3.0.2/lib/delayed/lifecycle.rb:65:in `execute'
> /opt/rh/ruby193/root/usr/share/gems/gems/delayed_job-3.0.2/lib/delayed/lifecycle.rb:38:in `run_callbacks'
> /opt/rh/ruby193/root/usr/share/gems/gems/delayed_job-3.0.2/lib/delayed/worker.rb:234:in `reserve_and_run_one_job'
> /opt/rh/ruby193/root/usr/share/gems/gems/delayed_job-3.0.2/lib/delayed/worker.rb:162:in `block in work_off'
> /opt/rh/ruby193/root/usr/share/gems/gems/delayed_job-3.0.2/lib/delayed/worker.rb:161:in `times'
> /opt/rh/ruby193/root/usr/share/gems/gems/delayed_job-3.0.2/lib/delayed/worker.rb:161:in `work_off'
> /opt/rh/ruby193/root/usr/share/gems/gems/delayed_job-3.0.2/lib/delayed/worker.rb:133:in `block (4 levels) in start'
> /opt/rh/ruby193/root/usr/share/ruby/benchmark.rb:295:in `realtime'
> /opt/rh/ruby193/root/usr/share/gems/gems/delayed_job-3.0.2/lib/delayed/worker.rb:132:in `block (3 levels) in start'
> /opt/rh/ruby193/root/usr/share/gems/gems/delayed_job-3.0.2/lib/delayed/lifecycle.rb:60:in `call'
> /opt/rh/ruby193/root/usr/share/gems/gems/delayed_job-3.0.2/lib/delayed/lifecycle.rb:60:in `block in initialize'
> /opt/rh/ruby193/root/usr/share/gems/gems/delayed_job-3.0.2/lib/delayed/lifecycle.rb:65:in `call'
> /opt/rh/ruby193/root/usr/share/gems/gems/delayed_job-3.0.2/lib/delayed/lifecycle.rb:65:in `execute'
> /opt/rh/ruby193/root/usr/share/gems/gems/delayed_job-3.0.2/lib/delayed/lifecycle.rb:38:in `run_callbacks'
> /opt/rh/ruby193/root/usr/share/gems/gems/delayed_job-3.0.2/lib/delayed/worker.rb:129:in `block (2 levels) in start'
> /opt/rh/ruby193/root/usr/share/gems/gems/delayed_job-3.0.2/lib/delayed/worker.rb:128:in `loop'
> /opt/rh/ruby193/root/usr/share/gems/gems/delayed_job-3.0.2/lib/delayed/worker.rb:128:in `block in start'
> /opt/rh/ruby193/root/usr/share/gems/gems/delayed_job-3.0.2/lib/delayed/plugins/clear_locks.rb:7:in `call'
> /opt/rh/ruby193/root/usr/share/gems/gems/delayed_job-3.0.2/lib/delayed/plugins/clear_locks.rb:7:in `block (2 levels) in <class:ClearLocks>'
> /opt/rh/ruby193/root/usr/share/gems/gems/delayed_job-3.0.2/lib/delayed/lifecycle.rb:78:in `call'
> /opt/rh/ruby193/root/usr/share/gems/gems/delayed_job-3.0.2/lib/delayed/lifecycle.rb:78:in `block (2 levels) in add'
> /opt/rh/ruby193/root/usr/share/gems/gems/delayed_job-3.0.2/lib/delayed/lifecycle.rb:60:in `call'
> /opt/rh/ruby193/root/usr/share/gems/gems/delayed_job-3.0.2/lib/delayed/lifecycle.rb:60:in `block in initialize'
> /opt/rh/ruby193/root/usr/share/gems/gems/delayed_job-3.0.2/lib/delayed/lifecycle.rb:78:in `call'
> /opt/rh/ruby193/root/usr/share/gems/gems/delayed_job-3.0.2/lib/delayed/lifecycle.rb:78:in `block in add'
> /opt/rh/ruby193/root/usr/share/gems/gems/delayed_job-3.0.2/lib/delayed/lifecycle.rb:65:in `call'
> /opt/rh/ruby193/root/usr/share/gems/gems/delayed_job-3.0.2/lib/delayed/lifecycle.rb:65:in `execute'
> /opt/rh/ruby193/root/usr/share/gems/gems/delayed_job-3.0.2/lib/delayed/lifecycle.rb:38:in `run_callbacks'
> /opt/rh/ruby193/root/usr/share/gems/gems/delayed_job-3.0.2/lib/delayed/worker.rb:127:in `start'
> /opt/rh/ruby193/root/usr/share/gems/gems/delayed_job-3.0.2/lib/delayed/command.rb:101:in `run'
> /opt/rh/ruby193/root/usr/share/gems/gems/delayed_job-3.0.2/lib/delayed/command.rb:89:in `block in run_process'
> /opt/rh/ruby193/root/usr/share/gems/gems/daemons-1.1.4/lib/daemons/application.rb:249:in `call'
> /opt/rh/ruby193/root/usr/share/gems/gems/daemons-1.1.4/lib/daemons/application.rb:249:in `block in start_proc'
> /opt/rh/ruby193/root/usr/share/gems/gems/daemons-1.1.4/lib/daemons/daemonize.rb:197:in `call'
> /opt/rh/ruby193/root/usr/share/gems/gems/daemons-1.1.4/lib/daemons/daemonize.rb:197:in `call_as_daemon'
> /opt/rh/ruby193/root/usr/share/gems/gems/daemons-1.1.4/lib/daemons/application.rb:253:in `start_proc'
> /opt/rh/ruby193/root/usr/share/gems/gems/daemons-1.1.4/lib/daemons/application.rb:293:in `start'
> /opt/rh/ruby193/root/usr/share/gems/gems/daemons-1.1.4/lib/daemons/controller.rb:70:in `run'
> /opt/rh/ruby193/root/usr/share/gems/gems/daemons-1.1.4/lib/daemons.rb:195:in `block in run_proc'
> /opt/rh/ruby193/root/usr/share/gems/gems/daemons-1.1.4/lib/daemons/cmdline.rb:109:in `call'
> /opt/rh/ruby193/root/usr/share/gems/gems/daemons-1.1.4/lib/daemons/cmdline.rb:109:in `catch_exceptions'
> /opt/rh/ruby193/root/usr/share/gems/gems/daemons-1.1.4/lib/daemons.rb:194:in `run_proc'
> /opt/rh/ruby193/root/usr/share/gems/gems/delayed_job-3.0.2/lib/delayed/command.rb:87:in `run_process'
> /opt/rh/ruby193/root/usr/share/gems/gems/delayed_job-3.0.2/lib/delayed/command.rb:80:in `block in daemonize'
> /opt/rh/ruby193/root/usr/share/gems/gems/delayed_job-3.0.2/lib/delayed/command.rb:78:in `times'
> /opt/rh/ruby193/root/usr/share/gems/gems/delayed_job-3.0.2/lib/delayed/command.rb:78:in `daemonize'
> script/delayed_job:5:in `<main>'
>

I believe this might be that the proxy port you have defined is a string, but it should be an integer according to the docs.

Try setting in yum_importer.conf:

"proxy_port" : 8080

instead of

"proxy_port" : "8080"

and restart the httpd service.

-Justin

>
>
> at that moment my yum_importer.conf contains:
>
> {
>      "proxy_url" : "http://argus4.onprvp.fgov.be",
>      "proxy_port" : "8080"
> }
>
> Then I can sync my repos, but when I want to do any other operation I need to empty it, otherwise I receive the above error.
>
> Cheers,
> Wannes
>
> -----Original Message-----
> From: katello-bounces@lists.fedorahosted.org
> [mailto:katello-bounces@lists.fedorahosted.org] On Behalf Of Justin
> Sherrill
> Sent: dinsdag 2 juli 2013 15:49
> To: katello@lists.fedorahosted.org
> Subject: Re: Katello to use upstream proxy
>
> On 07/02/2013 09:30 AM, VAN CAUSBROECK Wannes wrote:
>> Hello all,
>>
>> If you change /usr/lib/pulp/plugins/importers/yum_importer/yum_importer.conf, you will receive an "invalid proxy port" error when you create a new repo or try to promote something to another environment.
>> This is really annoying, now I have to edit the file time and time again, each time restarting the httpd service.
>> Is there a better way to do this?
>>
>> Regards,
>> Wannes
> Wannes,
>
> Was this a traceback coming from pulp? (Should appear in
> /var/log/pulp/pulp.log)  Could you provide that traceback as well as you're yum_importer.conf  file?
>
> Thanks,
>
> -Justin
>
>> -----Original Message-----
>> From: katello-bounces@lists.fedorahosted.org
>> [mailto:katello-bounces@lists.fedorahosted.org] On Behalf Of Justin
>> Sherrill
>> Sent: dinsdag 2 juli 2013 15:27
>> To: katello@lists.fedorahosted.org
>> Subject: Re: Katello to use upstream proxy
>>
>> On 07/02/2013 03:39 AM, Ivan Necas wrote:
>>> ----- Original Message -----
>>>> Hi all
>>>>
>>>> I'm back having another poke at Katello as its been a while...
>>>>
>>>> My immediate problem is that Katello appears to be ignoring he HTTP
>>>> proxy settings passed in at install time. Whenever I create a repo
>>>> then tell Katello to sync it, it always trys to go directly to the
>>>> site rather than through the proxy. I see in
>>>> /etc/katello/katello.yml and /etc/katello/katello-configure.conf the prxoy settings from the answer file.
>>> Hi,
>>>
>>> It seems like this bug:
>>>
>>> https://bugzilla.redhat.com/show_bug.cgi?id=968390
>>>
>>> The setting is done in pulp rather than Katello itself, as Pulp is
>>> used for repos sync,
>>>
>>> Please, try this
>>> https://pulp-rpm-user-guide.readthedocs.org/en/pulp-2.1/recipes.html
>>> #
>>> u
>>> se-a-proxy
>> I would recommend using the YAML file
>> /usr/lib/pulp/plugins/importers/yum_importer/yum_importer.conf to set it as that is what katello will configure going forward (When we fix that bugzilla).
>>
>> -Justin
>>
>>>> Also, whats the feature parity bewteen Spacewalk and Katello like?
>>>> Is there a table? If not, the things I care about are:
>>>> - RHEL builds via kick starting
>>> This is done by Foreman integration, planned for katello-1.4
>>>
>>>> - file management
>>> For configuration management, we're going to use Foreman's puppet
>>> integration (or whatever Foreman will integrate next). What's your particular use case?
>>>
>>>> - patching
>>> There is an errata support when defining the content (ability
>>> produce repository clones with selection of errata to be included -
>>> through content views and promotions), support for calculation of
>>> errata available for the system and remote actions allowing to update a system or group of systems.
>>>
>>> -- Ivan
>>>
>>>> Thanks
>>>>
>>>> CC
>>>>
>>>> --
>>>> RHCE#805007969328369
>>>>
>>>> _______________________________________________
>>>> katello mailing list
>>>> katello@lists.fedorahosted.org
>>>> https://lists.fedorahosted.org/mailman/listinfo/katello
>>>>
>>> _______________________________________________
>>> katello mailing list
>>> katello@lists.fedorahosted.org
>>> https://lists.fedorahosted.org/mailman/listinfo/katello
>> _______________________________________________
>> katello mailing list
>> katello@lists.fedorahosted.org
>> https://lists.fedorahosted.org/mailman/listinfo/katello
>> _______________________________________________
>> katello mailing list
>> katello@lists.fedorahosted.org
>> https://lists.fedorahosted.org/mailman/listinfo/katello
> _______________________________________________
> katello mailing list
> katello@lists.fedorahosted.org
> https://lists.fedorahosted.org/mailman/listinfo/katello
> _______________________________________________
> katello mailing list
> katello@lists.fedorahosted.org
> https://lists.fedorahosted.org/mailman/listinfo/katello

_______________________________________________
katello mailing list
katello@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/katello
_______________________________________________
katello mailing list
katello@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/katello



--
RHCE#805007969328369