Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1366139 - satellite-installer fails in db:seed when having http_proxy with credentials
Summary: satellite-installer fails in db:seed when having http_proxy with credentials
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Installer
Version: 6.2.0
Hardware: x86_64
OS: Linux
medium
medium vote
Target Milestone: Unspecified
Assignee: Chris Roberts
QA Contact: Sebastian Gräßl
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-08-11 07:47 UTC by Pavel Moravec
Modified: 2019-04-01 20:27 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-02-21 16:54:17 UTC


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Foreman Issue Tracker 14956 None None None 2016-12-01 21:58:34 UTC
Red Hat Bugzilla 1365542 None None None Never

Internal Links: 1365542

Description Pavel Moravec 2016-08-11 07:47:55 UTC
Description of problem:
User story: during an upgrade from Sat6.1.9 (but I guess same applies to a fresh installation), satellite-installer failed during execution of foreman-rake db:seed, during 108-ensure_sync_notification.rb (backtrace is below).

The backtrace suggests ruby restclient GET request to https://satellite.example.com/pulp/api/v2/events/ failed - while the user's environment had set:

http_proxy=http://user:password@1.2.3.4:12345

After unsetting this variable, both rake script and installer finished successfully (sic!).


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


How reproducible:
???


Steps to Reproduce:
1. export http_proxy=http://user:password@1.2.3.4:12345
2. foreman-rake db:seed  (or run installer/upgrade)


Actual results:
db:seed / installer fails with backtrace:

[DEBUG 2016-08-09 15:46:49 main]  Executing '/usr/sbin/foreman-rake db:seed'
[ WARN 2016-08-09 15:47:19 main]  /Stage[main]/Foreman::Database/Foreman::Rake[db:seed]/Exec[foreman-rake-db:seed]/returns: rake aborted!
[ WARN 2016-08-09 15:47:19 main]  /Stage[main]/Foreman::Database/Foreman::Rake[db:seed]/Exec[foreman-rake-db:seed]/returns: Net::HTTPServerException: 407 "Proxy Authentication Required"
[ WARN 2016-08-09 15:47:19 main]  /Stage[main]/Foreman::Database/Foreman::Rake[db:seed]/Exec[foreman-rake-db:seed]/returns: /opt/theforeman/tfm/root/usr/share/gems/gems/rbovirt-0.0.37/lib/restclient_ext/request.rb:44:in `transmit'
[ WARN 2016-08-09 15:47:19 main]  /Stage[main]/Foreman::Database/Foreman::Rake[db:seed]/Exec[foreman-rake-db:seed]/returns: /opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-1.6.7/lib/restclient/request.rb:64:in `execute'
[ WARN 2016-08-09 15:47:19 main]  /Stage[main]/Foreman::Database/Foreman::Rake[db:seed]/Exec[foreman-rake-db:seed]/returns: /opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-1.6.7/lib/restclient/request.rb:33:in `execute'
[ WARN 2016-08-09 15:47:19 main]  /Stage[main]/Foreman::Database/Foreman::Rake[db:seed]/Exec[foreman-rake-db:seed]/returns: /opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-1.6.7/lib/restclient/resource.rb:51:in `get'
[ WARN 2016-08-09 15:47:19 main]  /Stage[main]/Foreman::Database/Foreman::Rake[db:seed]/Exec[foreman-rake-db:seed]/returns: /opt/theforeman/tfm/root/usr/share/gems/gems/runcible-1.7.0/lib/runcible/base.rb:78:in `get_response'
[ WARN 2016-08-09 15:47:19 main]  /Stage[main]/Foreman::Database/Foreman::Rake[db:seed]/Exec[foreman-rake-db:seed]/returns: /opt/theforeman/tfm/root/usr/share/gems/gems/runcible-1.7.0/lib/runcible/base.rb:66:in `call'
[ WARN 2016-08-09 15:47:19 main]  /Stage[main]/Foreman::Database/Foreman::Rake[db:seed]/Exec[foreman-rake-db:seed]/returns: /opt/theforeman/tfm/root/usr/share/gems/gems/runcible-1.7.0/lib/runcible/resources/event_notifier.rb:48:in `list'
[ WARN 2016-08-09 15:47:19 main]  /Stage[main]/Foreman::Database/Foreman::Rake[db:seed]/Exec[foreman-rake-db:seed]/returns: /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.68/app/models/katello/glue/pulp/repo.rb:32:in `ensure_sync_notification'
[ WARN 2016-08-09 15:47:19 main]  /Stage[main]/Foreman::Database/Foreman::Rake[db:seed]/Exec[foreman-rake-db:seed]/returns: /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.68/db/seeds.d/108-ensure_sync_notification.rb:9:in `<top (required)>'
..


Expected results:
No such failure.


Additional info:
- Derived from https://bugzilla.redhat.com/show_bug.cgi?id=1365542#c5
- Attaching sosreport and satellite.log
  - sosreport contains foreman-debug under sos_commands/foreman/foreman-debug dir
  - sosreport was taken with _previous_ error (dealt in bz1365542), the only change done since then is the fix from 1365542
  - attached satellite.log is the current one / failing

Comment 4 Chris Roberts 2016-08-13 20:33:08 UTC
Fixed upstream with 

https://github.com/Katello/katello-installer/pull/353

moving to 6.3

Comment 5 Sebastian Gräßl 2017-08-16 12:50:01 UTC
Verified on Satellite-6.3 Snap 11.

Running "foreman-rake db:seed" is running as expected with a "http_proxy" environment variable set.

Comment 6 pm-sat@redhat.com 2018-02-21 16:54:17 UTC
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA.
> 
> For information on the advisory, and where to find the updated files, follow the link below.
> 
> If the solution does not work for you, open a new bug report.
> 
> https://access.redhat.com/errata/RHSA-2018:0336


Note You need to log in before you can comment on or make changes to this bug.