Bug 1086723 - rhsc-setup --config-append=/<Answer_File> fails
Summary: rhsc-setup --config-append=/<Answer_File> fails
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Gluster Storage
Classification: Red Hat Storage
Component: rhsc
Version: 2.1
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: ---
Assignee: Shubhendu Tripathi
QA Contact: RHS-C QE
URL:
Whiteboard:
Depends On:
Blocks: 1086731 1087818
TreeView+ depends on / blocked
 
Reported: 2014-04-11 11:38 UTC by Prasanth
Modified: 2015-02-17 09:48 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Known Issue
Doc Text:
Auto installation of Red Hat Storage Console using the answer file in RHSC-2.1.2 fails with the following error: [WARNING] Current installation does not support upgrade. It is recommended to clean your installation using rhsc-cleanup and re-install Workaround: Execute "yum update rhsc-setup" and then perform auto installation of RHSC using the answer with command "rhsc-setup --config-append=<answer-file>".
Clone Of:
Environment:
Last Closed: 2015-02-17 09:48:31 UTC
Embargoed:


Attachments (Terms of Use)
Setup log (163.62 KB, text/x-log)
2014-04-11 11:38 UTC, Prasanth
no flags Details

Description Prasanth 2014-04-11 11:38:04 UTC
Created attachment 885403 [details]
Setup log

Description of problem:

rhsc-setup --config=/<Answer_File> fails with the following error:

------
[WARNING] Current installation does not support upgrade. It is recommended to clean your installation using rhsc-cleanup and re-install
------


Version-Release number of selected component (if applicable): rhsc-2.1.2-0.36.el6rhs.noarch


How reproducible: Always


Steps to Reproduce:
1. Install RHS-C 2.1 from the live channel
2. Execute #rhsc-setup --generate-answer=/opt/<Answer_File>
3. Now use the above generated answer file and try to auto install using # rhsc-setup --config=/opt/<Answer_File>


Actual results: It fails to auto install and throws an error. See below:

---------------
[root@vm03 ~]# rhsc-setup --config=/opt/myanswerfile1
[ INFO  ] Stage: Initializing
[ INFO  ] Stage: Environment setup
          Configuration files: ['/opt/myanswerfile1']
          Log file: /var/log/ovirt-engine/setup/ovirt-engine-setup-20140411162113.log
          Version: otopi-1.1.2 (otopi-1.1.2-1.el6ev)
[ INFO  ] Stage: Environment packages setup
[ INFO  ] Stage: Programs detection
[ INFO  ] Stage: Environment setup
[ INFO  ] Stage: Environment customization
         
          --== PACKAGES ==--
         
[WARNING] Current installation does not support upgrade. It is recommended to clean your installation using rhsc-cleanup and re-install
---------------

Expected results: The auto install using an answer file should be successful. 


Additional info: Setup log is attached.

Comment 1 Dusmant 2014-04-21 11:53:35 UTC
This should be working fine, considering some of the key installation related infra issues are fixed in virt 3.4. This should be tested in the RHSC 3.0 brew build and appropriately handled. As discussed in the triage meeting, we will keep it for RHS 3.0 target and once tested decide accordingly.

Comment 2 Prasanth 2014-05-15 09:55:57 UTC
(In reply to Dusmant from comment #1)
> This should be working fine, considering some of the key installation
> related infra issues are fixed in virt 3.4. This should be tested in the
> RHSC 3.0 brew build and appropriately handled. As discussed in the triage
> meeting, we will keep it for RHS 3.0 target and once tested decide
> accordingly.

 
I tested this bug against the latest RHSC 3.0 build and could not reproduce this issue. 

-----------
# rhsc-setup --config-append=/opt/myanswerfile
[ INFO  ] Stage: Initializing
[ INFO  ] Stage: Environment setup
          Configuration files: ['/etc/ovirt-engine-setup.conf.d/10-packaging.conf', '/etc/ovirt-engine-setup.conf.d/20-rhsc-packaging.conf', '/opt/myanswerfile']
          Log file: /var/log/ovirt-engine/setup/ovirt-engine-setup-20140515151550.log
          Version: otopi-1.2.0 (otopi-1.2.0-1.el6ev)
[ INFO  ] Stage: Environment packages setup
[ INFO  ] Stage: Programs detection
[ INFO  ] Stage: Environment setup
[ INFO  ] Stage: Environment customization
         
          --== PRODUCT OPTIONS ==--
         
         
          --== PACKAGES ==--
         
[ INFO  ] Checking for product updates...
[ INFO  ] No product updates found
-----------

So looks like it happens ONLY in RHSC 2.1.

Comment 3 Shubhendu Tripathi 2014-05-15 12:54:12 UTC
Mu suggestion, try one more scenario for migrating a rhsc2.1 node when 3.0 updates are available.

Comment 4 Prasanth 2014-05-20 07:28:37 UTC
Shubhendu,

As discussed, I tried using --config-append and it doesn't make any difference here. See below:

-------------------
[root@vm49 ]# rhsc-setup --config=/opt/myanswer.conf 
[ INFO  ] Stage: Initializing
[ INFO  ] Stage: Environment setup
          Configuration files: ['/opt/myanswer.conf']
          Log file: /var/log/ovirt-engine/setup/ovirt-engine-setup-20140520124742.log
          Version: otopi-1.2.0 (otopi-1.2.0-1.el6ev)
[ INFO  ] Stage: Environment packages setup
[ INFO  ] Stage: Programs detection
[ INFO  ] Stage: Environment setup
[ INFO  ] Stage: Environment customization
         
          --== PACKAGES ==--
         
[WARNING] Current installation does not support upgrade. It is recommended to clean your installation using rhsc-cleanup and re-install



[root@vm49 ]# rhsc-setup --config-append=/opt/myanswer.conf 
[ INFO  ] Stage: Initializing
[ INFO  ] Stage: Environment setup
          Configuration files: ['/etc/ovirt-engine-setup.conf.d/10-packaging.conf', '/etc/ovirt-engine-setup.conf.d/20-rhsc-packaging.conf', '/opt/myanswer.conf']
          Log file: /var/log/ovirt-engine/setup/ovirt-engine-setup-20140520124759.log
          Version: otopi-1.2.0 (otopi-1.2.0-1.el6ev)
[ INFO  ] Stage: Environment packages setup
[ INFO  ] Stage: Programs detection
[ INFO  ] Stage: Environment setup
[ INFO  ] Stage: Environment customization
         
          --== PACKAGES ==--
         
[WARNING] Current installation does not support upgrade. It is recommended to clean your installation using rhsc-cleanup and re-install
-------------------

Comment 5 Prasanth 2014-05-20 08:06:23 UTC
(In reply to Shubhendu Tripathi from comment #3)
> Mu suggestion, try one more scenario for migrating a rhsc2.1 node when 3.0
> updates are available.

I tried the above scenario as well but result is the same.

1. Installed rhsc2.1 from channel
2. rhsc3.0 updates made available from local repo.
3. Executed # rhsc-setup --config-append=/opt/myanswer.conf

Find below:

------------
[root@vm49 ]# rhsc-setup --config-append=/opt/myanswer.conf 
[ INFO  ] Stage: Initializing
[ INFO  ] Stage: Environment setup
          Configuration files: ['/etc/ovirt-engine-setup.conf.d/10-packaging.conf', '/etc/ovirt-engine-setup.conf.d/20-rhsc-packaging.conf', '/opt/myanswer.conf']
          Log file: /var/log/ovirt-engine/setup/ovirt-engine-setup-20140520131308.log
          Version: otopi-1.2.0 (otopi-1.2.0-1.el6ev)
[ INFO  ] Stage: Environment packages setup
[ INFO  ] Stage: Programs detection
[ INFO  ] Stage: Environment setup
[ INFO  ] Stage: Environment customization
         
          --== PACKAGES ==--
         
[WARNING] Current installation does not support upgrade. It is recommended to clean your installation using rhsc-cleanup and re-install
------------


However, executing  #rhsc-setup is finding the possible updates.

--------------
[root@vm49 yum.repos.d]# rhsc-setup 
[ INFO  ] Stage: Initializing
[ INFO  ] Stage: Environment setup
          Configuration files: ['/etc/ovirt-engine-setup.conf.d/10-packaging.conf', '/etc/ovirt-engine-setup.conf.d/20-rhsc-packaging.conf']
          Log file: /var/log/ovirt-engine/setup/ovirt-engine-setup-20140520132444.log
          Version: otopi-1.2.0 (otopi-1.2.0-1.el6ev)
[ INFO  ] Stage: Environment packages setup
[ INFO  ] Stage: Programs detection
[ INFO  ] Stage: Environment setup
[ INFO  ] Stage: Environment customization
         
          --== PACKAGES ==--
         
[ INFO  ] Checking for product updates...
          Setup has found updates for some packages, do you wish to update them now? (Yes, No) [Yes]: 
--------------

Comment 6 Shubhendu Tripathi 2014-05-22 07:20:49 UTC
The said error is meant for not allowing the migration from RHSC-2.1 to higher version.
The conditions used for checking if the current installed version is RHSC-2.1 is as below -
1. The conf file /etc/ovirt-engine-setup.conf.d/20-setup-ovirt-post.conf should not exist (as it was introduced from RHSC-2.1.2 onwards)
(AND)
2. The ConfigEnv variable FQDN should be defined (after rhsc-setup the same is set)

Now the problem happens in the scenario where RHSC-2.1.2 is installed and setup is done but rhsc-cleanup executed afterwards or just the RHSC-2.1.2 rpms were installed and rhsc-setup is never executed. Now if user tries "rhsc-setup --config-append=<answer-file>". In this scenario -
1. The conf file /etc/ovirt-engine-setup.conf.d/20-setup-ovirt-post.conf does not exist (got deleted as part of rhsc-cleanup or never created)
2. The ConfigEnv variable FQDN is not NULL (gets populated from answer file)

So effectively this scenario becomes equivalent to a RHSC-2.1 installation and setup is failed with error "Current installation does not support upgrade. It is recommended to clean your installation using rhsc-cleanup and re-install".

WORKAROUND
==========
The workaround for this scenario is to delete the line "OVESETUP_CONFIG/fqdn=str:<FQDN-Name>" in the answer file and then execute the command "rhsc-setup --config-append=<Answer-File>". 
With this workaround, during setup, the FQDN value would be asked again, which should be provided manually and setup completes successfully.


++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
WAIT WAIT, THIS PROBLEM HAPPENS EVEN WHILE UPGRADE FROM RHSC-2.1.2 TO RHSC-3.0
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
If RHSC-2.1.2 is installed, setup done and then rhsc-cleanup is executed or rhsc-setup never run. Now if user tries to add RHSC-3.0 repos and execute "rhsc-setup --config-append=<Answer-File>" the above mentioned error "Current installation does not support upgrade. It is recommended to clean your installation using rhsc-cleanup and re-install" is displayed.

WORKAROUND FOR THIS SCENARIO
============================
The workaround for this scenario as well is to delete the line "OVESETUP_CONFIG/fqdn=str:<FQDN-Name>" in the answer file and then execute the command "rhsc-setup --config-append=<Answer-File>". 
With this workaround, during setup, the FQDN value would be asked again, which should be provided manually and setup completes successfully.

Comment 7 Shubhendu Tripathi 2014-05-22 07:22:21 UTC
Prasanth,

Kindly verify once with work-qrounds mentioned above.

Comment 8 Shubhendu Tripathi 2014-05-23 11:27:57 UTC
In case of upgrade from RHSC-2.1.2 to RHSC-3.0, another better work-around is to execute "yum update rhsc-setup" first and then running the command "rhsc-setup --config-append=<answer-file>"

Comment 9 Prasanth 2014-05-27 10:59:49 UTC
(In reply to Shubhendu Tripathi from comment #8)
> In case of upgrade from RHSC-2.1.2 to RHSC-3.0, another better work-around
> is to execute "yum update rhsc-setup" first and then running the command
> "rhsc-setup --config-append=<answer-file>"


Will the above approach completely fixes the issue? i.e; even if you have generated an answer file with RHSC-2.1, if you update your "rhsc-setup" package with RHSC-3.0 first, can the old answer file be used for auto installation without any issues??

Comment 10 Shubhendu Tripathi 2014-05-27 11:57:34 UTC
Yes, this is for the case of migration from RHSC-2.1.2 to RHSC-3.0.
In this scenario first upgrading the rhsc-setup and then running only the rhsc-setup does work properly (even with older answer file)

Comment 11 Dusmant 2014-05-29 07:14:12 UTC
Considering, this issue is not seen in RHSC 3.0 ( as Prasanth mentioned in his comment#2 )
"I tested this bug against the latest RHSC 3.0 build and could not reproduce this issue. "

It's only seen from 2.1.2 to 3.0, for which there is a workaround. Lets document this work around. Marking it for doc-text.

Comment 13 Shalaka 2014-06-17 05:43:27 UTC
Please review and sign-off the edited doc text.

Comment 14 Shubhendu Tripathi 2014-06-17 05:47:21 UTC
doc-text looks fine.

Comment 16 Sahina Bose 2015-02-17 09:48:31 UTC
Closing this WONTFIX as this issue is only from 2.1.2 to 3.0 and has a documented workaround. Issue does not appear for other upgrades.


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