Project

General

Profile

Bug #17722

Katello 3.1 upgrade to 3.2.1

Added by Martin ├Ľunap over 5 years ago. Updated almost 4 years ago.

Status:
Duplicate
Priority:
Urgent
Assignee:
-
Category:
Upgrades
Target version:
Difficulty:
Triaged:
Bugzilla link:
Pull request:
Fixed in Releases:
Found in Releases:
Red Hat JIRA:

Description

Hi

I have a problem. I updated Katello 3.1 to 3.2.1 On Centos 7.
I run into a bug, what is described here:

http://projects.theforeman.org/issues/17703

So I modified 30-upgrade.rb file, after that I run into a new problem:

Upgrade Step: db_seed...
rake aborted!
RestClient::ResourceNotFound: 404 Resource Not Found
/opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-1.8.0/lib/restclient/abstract_response.rb:74:in `return!'
/opt/theforeman/tfm/root/usr/share/gems/gems/runcible-1.9.0/lib/runcible/base.rb:79:in `block in get_response'
/opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-1.8.0/lib/restclient/request.rb:493:in `call'
/opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-1.8.0/lib/restclient/request.rb:493:in `process_result'
/opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-1.8.0/lib/restclient/request.rb:421:in `block in transmit'
/opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-1.8.0/lib/restclient/request.rb:413:in `transmit'
/opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-1.8.0/lib/restclient/request.rb:176:in `execute'
/opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-1.8.0/lib/restclient/request.rb:41:in `execute'
/opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-1.8.0/lib/restclient/resource.rb:51:in `get'
/opt/theforeman/tfm/root/usr/share/gems/gems/runcible-1.9.0/lib/runcible/base.rb:78:in `get_response'
/opt/theforeman/tfm/root/usr/share/gems/gems/runcible-1.9.0/lib/runcible/base.rb:66:in `call'
/opt/theforeman/tfm/root/usr/share/gems/gems/runcible-1.9.0/lib/runcible/resources/event_notifier.rb:48:in `list'
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.2.1.1/app/models/katello/glue/pulp/repo.rb:32:in `ensure_sync_notification'
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.2.1.1/db/seeds.d/108-ensure_sync_notification.rb:9:in `<top (required)>'
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/dependencies.rb:268:in `load'
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/dependencies.rb:268:in `block in load'
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/dependencies.rb:240:in `load_dependency'
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/dependencies.rb:268:in `load'
/usr/share/foreman/db/seeds.rb:81:in `block in <top (required)>'
/usr/share/foreman/db/seeds.rb:79:in `each'
/usr/share/foreman/db/seeds.rb:79:in `<top (required)>'
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/dependencies.rb:268:in `load'
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/dependencies.rb:268:in `block in load'
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/dependencies.rb:240:in `load_dependency'
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/dependencies.rb:268:in `load'
/opt/rh/sclo-ror42/root/usr/share/gems/gems/railties-4.2.5.1/lib/rails/engine.rb:547:in `load_seed'
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/active_record/tasks/database_tasks.rb:250:in `load_seed'
/opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/active_record/railties/databases.rake:183:in `block (2 levels) in <top (required)>'
Tasks: TOP => db:seed
(See full trace by running task with --trace)
Seeding /usr/share/foreman/db/seeds.d/03-auth_sources.rb
Seeding /usr/share/foreman/db/seeds.d/03-permissions.rb
Seeding /usr/share/foreman/db/seeds.d/03-roles.rb
Seeding /usr/share/foreman/db/seeds.d/04-admin.rb
Seeding /usr/share/foreman/db/seeds.d/05-taxonomies.rb
Seeding /usr/share/foreman/db/seeds.d/06-architectures.rb
Seeding /usr/share/foreman/db/seeds.d/07-provisioning_templates.rb
Seeding /usr/share/foreman/db/seeds.d/08-partition_tables.rb
Seeding /usr/share/foreman/db/seeds.d/10-installation_media.rb
Seeding /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.2.1.1/db/seeds.d/101-locations.rb
Seeding /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.2.1.1/db/seeds.d/102-organizations.rb
Seeding /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.2.1.1/db/seeds.d/103-provisioning_templates.rb
Seeding /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.2.1.1/db/seeds.d/104-proxy.rb
Seeding /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.2.1.1/db/seeds.d/106-mail_notifications.rb
Seeding /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.2.1.1/db/seeds.d/107-enable_dynflow.rb
Seeding /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.2.1.1/db/seeds.d/108-ensure_sync_notification.rb

Upgrade step db_seed failed. Check logs for more information.

If I use "hammer ping" I get answer:

candlepin:
Status: ok
Server Response: Duration: 52ms
candlepin_auth:
Status: ok
Server Response: Duration: 84ms
pulp:
Status: FAIL
Server Response:
foreman_tasks:
Status: ok
Server Response: Duration: 347ms


Related issues

Is duplicate of Katello - Bug #17720: upgrade ends up with blank /etc/httpd/conf.d/pulp.confClosed2016-12-16

History

#1 Updated by Anonymous over 5 years ago

  • Project changed from Installer to Katello
  • Subject changed from Foreman 3.1 upgrade to 3.2.1 to Katello 3.1 upgrade to 3.2.1
  • Category set to Upgrades

#2 Updated by Pascal Pascher over 5 years ago

I get the same error and "hammer ping" result. Some more information:


[katello/pulp_rest] [I] RestClient.get "https://katello01.ipa.mydomain.com/pulp/api/v2/events/", "Accept"=>"*/*; q=0.5, application/xml", "Accept-Encoding"=>"gzip, deflate", "accept"=>"application/json", "content_type"=>"application/json" 
 | \n# => 404 NotFound | application/json 36 bytes
 |
rake aborted!
RestClient::ResourceNotFound: 404 Resource Not Found

#3 Updated by daehyung lee over 5 years ago

Pascal Pascher wrote:

I get the same error and "hammer ping" result. Some more information:
[...]

Have you checked, there is a file pulp.conf in the /etc/httpd/conf.d directory.

In my case, I got this issue after upgrading Katello 3.2.1 and I found that foreman-installer removed the pulp.conf file somehow.

It works as normal after copying a file from the other Katello server.

Just in case, I post the content of the pulp.conf file.

#
# WARNING: THIS CONFIGURATION WAS GENERATED BY KATELLO-CONFIGURE TOOL,
# CHANGES WILL LIKELY BE OVERWRITTEN.
#

# Apache configuration file for pulp web services and repositories

AddType application/x-pkcs7-crl .crl
AddType application/x-x509-ca-cert .crt

# allow older yum clients to connect, see bz 647828
SSLInsecureRenegotiation on

WSGIProcessGroup pulp
WSGIApplicationGroup pulp
WSGIDaemonProcess pulp user=apache group=apache processes=3 display-name=%{GROUP}

# DEBUG - uncomment the next 2 lines to enable debugging
#WSGIRestrictStdin Off
#WSGIRestrictStdout Off

WSGISocketPrefix run/wsgi
WSGIScriptAlias /pulp/api /usr/share/pulp/wsgi/webservices.wsgi
WSGIImportScript /usr/share/pulp/wsgi/webservices.wsgi process-group=pulp application-group=pulp

<Directory /usr/share/pulp/wsgi>
  Require all granted
</Directory>

<Files webservices.wsgi>
    WSGIPassAuthorization On
    WSGIProcessGroup pulp
    WSGIApplicationGroup pulp
    SSLRenegBufferSize  1048576
    SSLRequireSSL
    SSLVerifyDepth 3
    SSLOptions +StdEnvVars +ExportCertData
    SSLVerifyClient optional
</Files>

Alias /pulp/static /var/lib/pulp/static

<Location /pulp/static>
    SSLRequireSSL
    Options +Indexes
     Require all granted
</Location>

#4 Updated by Pascal Pascher over 5 years ago

While running "foreman-installer --scenario katello --upgrade" I checked the contents of "/etc/httpd/conf.d/pulp.conf". pulp.conf is deleted during the upgrade process but later recreated with the correct content. It is only after the failed upgrade (foreman-rake db:seed error) when the content of pulp.conf gets replaced by a single comment line saying something along the line of "this file is managed by katello-configure any changes will be overwritten...". It seems the pulp REST API (httpd service) isn't starting at the right time for foreman-rake db:seed.

#5 Updated by Pascal Pascher over 5 years ago

I finally managed to update my katello 3.2.0 vm to 3.2.1 doing the following:

yum update
vim /usr/share/katello-installer-base/hooks/pre/30-upgrade.rb
-  upgrade_step :migrate_candlepin, :run_always => true
+  upgrade_step :migrate_candlepin

vim /usr/share/katello-installer-base/hooks/pre/29-remove_package_httpd_conf.rb
- %w(ssl.conf pulp.conf).each do |file|
+ %w(ssl.conf).each do |file|

vim /usr/share/katello-installer-base/hooks/post/29-create_package_httpd_conf.rb
- %w(ssl.conf pulp.conf).each do |file|
+ %w(ssl.conf).each do |file|

foreman-installer --scenario katello --upgrade

Thanks daehyung lee for your hint about "pulp.conf".
The last two files edited above remove pulp.conf since it conflicts with a file called "05-pulps-https.conf" according to the comment included. This file is never created though so now the settings required for pulp-server htttpd are missing completely which is why the REST API can't be contacted during the foreman-rake db:seed. Removing "pulp.conf" from the files to be deleted/replaced fixes this issue.

#6 Updated by Justin Sherrill over 5 years ago

Hi, thanks for the report, this is a duplicate of 17720

it is fixed as part of

http://koji.katello.org/koji/buildinfo?buildID=36625 (el7)
http://koji.katello.org/koji/buildinfo?buildID=36626 (el7)

and will be released soon

#7 Updated by Justin Sherrill over 5 years ago

  • Status changed from New to Duplicate

#8 Updated by Justin Sherrill over 5 years ago

  • Is duplicate of Bug #17720: upgrade ends up with blank /etc/httpd/conf.d/pulp.conf added

#9 Updated by Justin Sherrill over 5 years ago

  • Legacy Backlogs Release (now unused) set to 166

Also available in: Atom PDF