Bug 1857506 - Capsule Upgrade Fail: satellite-installer --scenario capsule --upgrade throws NameError
Summary: Capsule Upgrade Fail: satellite-installer --scenario capsule --upgrade throw...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Upgrades
Version: 6.8.0
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: 6.8.0
Assignee: satellite6-bugs
QA Contact: Devendra Singh
URL:
Whiteboard:
: 1874465 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-07-16 03:26 UTC by Devendra Singh
Modified: 2020-10-27 14:31 UTC (History)
5 users (show)

Fixed In Version: foreman-installer-2.1.2
Doc Type: Known Issue
Doc Text:
Capsule Upgrade Fail: satellite-installer --scenario capsule --upgrade throws NameError
Clone Of:
Environment:
Last Closed: 2020-10-27 13:04:18 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Foreman Issue Tracker 30402 Normal Closed Passing --upgrade causes error 2020-11-06 06:37:50 UTC
Red Hat Product Errata RHSA-2020:4366 None None None 2020-10-27 13:04:35 UTC

Description Devendra Singh 2020-07-16 03:26:53 UTC
Description of problem:Capsule Upgrade Fail: satellite-installer --scenario capsule --upgrade  throws NameError


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

How reproducible:
always

Steps to Reproduce:
1. Prepare the environment to perform the satellite and Capsule upgrade from 6.7 to 6.8  
2. Configure all the repository(Enabled the required repository)
3. Trigger satellite upgrade and it completes successfully.
4. Trigger Capsule upgrade but it fail with NameError.

satellite-installer --scenario capsule --upgrade --certs-tar-file /home/XYZ.com-certs.tar --certs-update-all
Traceback (most recent call last):
	16: from /usr/sbin/satellite-installer:8:in `<main>'
	15: from /opt/theforeman/tfm/root/usr/share/gems/gems/kafo-4.1.0/lib/kafo/kafo_configure.rb:162:in `run'
	14: from /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.1.2/lib/clamp/command.rb:132:in `run'
	13: from /opt/theforeman/tfm/root/usr/share/gems/gems/kafo-4.1.0/lib/kafo/kafo_configure.rb:118:in `run'
	12: from /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.1.2/lib/clamp/command.rb:63:in `run'
	11: from /opt/theforeman/tfm/root/usr/share/gems/gems/kafo-4.1.0/lib/kafo/kafo_configure.rb:139:in `execute'
	10: from /opt/theforeman/tfm/root/usr/share/gems/gems/kafo-4.1.0/lib/kafo/hooking.rb:49:in `execute'
	 9: from /opt/theforeman/tfm/root/usr/share/gems/gems/kafo-4.1.0/lib/kafo/hooking.rb:49:in `each'
	 8: from /opt/theforeman/tfm/root/usr/share/gems/gems/kafo-4.1.0/lib/kafo/hooking.rb:51:in `block in execute'
	 7: from /opt/theforeman/tfm/root/usr/share/gems/gems/kafo-4.1.0/lib/kafo/hook_context.rb:16:in `execute'
	 6: from /opt/theforeman/tfm/root/usr/share/gems/gems/kafo-4.1.0/lib/kafo/hook_context.rb:16:in `instance_exec'
	 5: from /opt/theforeman/tfm/root/usr/share/gems/gems/kafo-4.1.0/lib/kafo/hooking.rb:34:in `block (4 levels) in load'
	 4: from /opt/theforeman/tfm/root/usr/share/gems/gems/kafo-4.1.0/lib/kafo/hooking.rb:34:in `instance_eval'
	 3: from /usr/share/foreman-installer/katello/hooks/pre_validations/29-upgrade.rb:2:in `block (4 levels) in load'
	 2: from /usr/share/foreman-installer/hooks/boot/01-kafo-hook-extensions.rb:90:in `log_and_say'
	 1: from /opt/theforeman/tfm/root/usr/share/gems/gems/highline-1.7.8/lib/highline.rb:383:in `color'
/opt/theforeman/tfm/root/usr/share/gems/gems/highline-1.7.8/lib/highline/style.rb:33:in `Style': :warn is not a defined Style (NameError)


Actual results:
Capsule upgrade failed with NameError.

Expected results:
Capsule upgrade should be completed succssfully.

Additional info:

Comment 1 Eric Helms 2020-07-16 12:56:27 UTC
The --upgrade flag is no longer required for upgrades and has be deprecated. The error is coming from the code that warns users of this. We'll fix this but I advise that any upgrade commands for 6.8 drop "--upgrade" from any Satellite or Capsule upgrade commands.

Comment 2 Justin Sherrill 2020-07-16 12:58:05 UTC
Connecting redmine issue https://projects.theforeman.org/issues/30402 from this bug

Comment 3 Devendra Singh 2020-07-16 13:33:56 UTC
(In reply to Eric Helms from comment #1)
> The --upgrade flag is no longer required for upgrades and has be deprecated.
> The error is coming from the code that warns users of this. We'll fix this
> but I advise that any upgrade commands for 6.8 drop "--upgrade" from any
> Satellite or Capsule upgrade commands.

I tried capsule upgrade without upgrade option and it completed successfully.

#satellite-installer --scenario capsule --certs-tar-file /home/XYZ-certs.tar --certs-update-all
Marking certificate /root/ssl-build/XYZ/XYZ-qpid-router-client for update
Marking certificate /root/ssl-build/XYZ/XYZ-qpid-broker for update
Marking certificate /root/ssl-build/XYZ/XYZ-qpid-client-cert for update
Marking certificate /root/ssl-build/XYZ/XYZ-qpid-router-server for update
Marking certificate /root/ssl-build/XYZ/XYZ-apache for update
Marking certificate /root/ssl-build/XYZ/XYZ-foreman-client for update
Marking certificate /root/ssl-build/XYZ/XYZ-foreman-proxy-client for update
Marking certificate /root/ssl-build/XYZ/XYZ-puppet-client for update
Marking certificate /root/ssl-build/XYZ/XYZ-foreman-proxy for update
Preparing installation Done                                              
  Success!
  * Capsule is running at https://XYZ:9090

Comment 5 Bryan Kearney 2020-08-20 08:06:13 UTC
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/30402 has been resolved.

Comment 6 Tomer Brisker 2020-09-06 15:00:30 UTC
*** Bug 1874465 has been marked as a duplicate of this bug. ***

Comment 7 Devendra Singh 2020-09-09 17:55:11 UTC
Verified on 6.8 Snap14.

# satellite-installer --scenario capsule --certs-tar-file /home/xyz.com-certs.tar --certs-update-all
Marking certificate /root/ssl-build/xyz.com/xyz.com-qpid-router-client for update
Marking certificate /root/ssl-build/xyz.com/xyz.com-qpid-broker for update
Marking certificate /root/ssl-build/xyz.com/xyz.com-qpid-client-cert for update
Marking certificate /root/ssl-build/xyz.com/xyz.com-qpid-router-server for update
Marking certificate /root/ssl-build/xyz.com/xyz.com-apache for update
Marking certificate /root/ssl-build/xyz.com/xyz.com-foreman-client for update
Marking certificate /root/ssl-build/xyz.com/xyz.com-foreman-proxy-client for update
Marking certificate /root/ssl-build/xyz.com/xyz.com-puppet-client for update
Marking certificate /root/ssl-build/xyz.com/xyz.com-foreman-proxy for update
Preparing installation Done                                              
  Success!
  * Capsule is running at https://xyz.com:9090
  The full log is at /var/log/foreman-installer/capsule.log

Comment 10 errata-xmlrpc 2020-10-27 13:04:18 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 (Important: Satellite 6.8 release), 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-2020:4366


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