Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1335732

Summary: Upgrade [sat618 -> 6.2 snap11.0] failed with error: You are trying to replace existing installation with different scenario
Product: Red Hat Satellite Reporter: Sachin Ghai <sghai>
Component: UpgradesAssignee: Brad Buckingham <bbuckingham>
Status: CLOSED DUPLICATE QA Contact: Katello QA List <katello-qa-list>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.2.0CC: ehelms, mmccune
Target Milestone: Unspecified   
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-05-16 12:38:11 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:
Embargoed:
Bug Depends On:    
Bug Blocks: 1335807    

Description Sachin Ghai 2016-05-13 06:43:38 UTC
Description of problem:
I initiated upgrade from  sat618 -> 6.2 snap11.0 using cmd:
satellite-installer --scenario satellite --upgrade

and it failed with error:

[qe-sat6-upgrade-rhel7.satqe.lab.eng.rdu2.redhat.com] out: [ERROR 2016-05-13 02:26:07 verbose] You are trying to replace existing installation with different scenario. This may lead to unpredictable states. Use --force to override. You can use --compare-scenarios to see the differences

On checking installer help, I got another error. At first place with --help, user shouldn't get any error, it could be a generic message.

~]# satellite-installer --help
ERROR: Selected scenario is DISABLED, can not continue. Use --list-scenarios to list available options. You can also --enable-scenario SCENARIO to make the selected scenario available.


[root@qe-sat6-upgrade-rhel7 ~]# satellite-installer --list-scenarios
Available scenarios
  Capsule (use: --scenario capsule)
        Install a stand-alone Capsule.
  Satellite (use: --scenario satellite)
        Install Satelite server


I enabled the scenario explicitly and still getting:
-----------------------------------------------------

 ~]# satellite-installer --enable-scenario satellite
Scenario satellite was enabled

[root@qe-sat6-upgrade-rhel7 ~]# satellite-installer --help
ERROR: Selected scenario is DISABLED, can not continue. Use --list-scenarios to list available options. You can also --enable-scenario SCENARIO to make the selected scenario available.

Again initiated upgrade:
=========================

# satellite-installer --scenario satellite --upgrade
[ INFO 2016-05-13 02:35:48 verbose] Executing hooks in group pre_migrations
[ INFO 2016-05-13 02:35:48 verbose] All hooks in group pre_migrations finished
[ERROR 2016-05-13 02:35:48 verbose] You are trying to replace existing installation with different scenario. This may lead to unpredictable states. Use --force to override. You can use --compare-scenarios to see the differences
[ INFO 2016-05-13 02:35:48 verbose] Log was be written to /var/log/foreman-installer/satellite.log
[ INFO 2016-05-13 02:35:48 verbose] Logs flushed


As per satellite log:
=======================
[DEBUG 2016-05-13 02:35:48 main] Exit with status code: 27 (signal was scenario_error)
[DEBUG 2016-05-13 02:35:48 main] Cleaning /tmp/default_values.yaml
[DEBUG 2016-05-13 02:35:48 main] Exit with status code: 27 (signal was 27)
[DEBUG 2016-05-13 02:35:48 main] Cleaning /tmp/default_values.yaml



Version-Release number of selected component (if applicable):
upgrade sat6.1.8 to sat6.2 snap11.0

How reproducible:


Steps to Reproduce:
1. perform upgrade from Sat6.1.8 to sat6.2 snap11.0
2.
3.

Actual results:
couldn't proceed with upgrade and error out:

You are trying to replace existing installation with different scenario. This may lead to unpredictable states. Use --force to override. You can use --compare-scenarios to see the differences
[ INFO 2016-05-13 02:35:48 verbose] Log was be written to /var/log/foreman-installer/satellite.log

Expected results:
user should be able to perform upgrade with satellite-installer and it should be friendly enough to provide help options.

Additional info:

Comment 1 Sachin Ghai 2016-05-13 06:48:24 UTC
If I don't use --scenario option then again same result:

#  satellite-installer --upgrade
ERROR: Selected scenario is DISABLED, can not continue. Use --list-scenarios to list available options. You can also --enable-scenario SCENARIO to make the selected scenario available.

Comment 2 Sachin Ghai 2016-05-13 06:56:17 UTC
Please make a note, I can proceed with upgrade with --force option:

# satellite-installer --scenario satellite --upgrade --force

But upgrade *shouldn't* be run only with --force option.

Couple of things needs to be fixed:


1) user should be able to perform upgrade with any of these cmds:

a) satellite-installer --scenario satellite --upgrade
b) satellite-installer --upgrade

2) User shouldn't get error:
You are trying to replace existing installation with different scenario.

we may raise this as generic message.

3) satellite-installer --help
ERROR: Selected scenario is DISABLED, can not continue. Use --list-scenarios to list available options. You can also --enable-scenario SCENARIO to make the selected scenario available.


user should be able to see all installer options with "--help"


Since all issues are related, so I'm combining all issues in one bz. However, If you would like separate bz's, just ping here and I'll be happy to do that.

Comment 3 Sachin Ghai 2016-05-13 06:57:48 UTC
Note: Since I was able to proceed with upgrade using --force option but it failed at migration step. I'll file another issue for that.

Comment 5 Brad Buckingham 2016-05-16 12:38:11 UTC

*** This bug has been marked as a duplicate of bug 1335668 ***