Bug 1073935 - [engine-setup] RedhatSupportPlugin options are not saved correctly
Summary: [engine-setup] RedhatSupportPlugin options are not saved correctly
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: rhevm-setup-plugins
Version: 3.4.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: 3.4.0
Assignee: Yedidyah Bar David
QA Contact: Jiri Belka
Jodi Biddle
URL:
Whiteboard: subeng
Depends On:
Blocks: 1051831
TreeView+ depends on / blocked
 
Reported: 2014-03-07 14:08 UTC by Jiri Belka
Modified: 2014-11-09 22:29 UTC (History)
12 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Previously, RedhatSupportPlugin options defined by the user were not saved correctly. Now, the options are correctly saved in /etc.
Clone Of:
Environment:
Last Closed: 2014-06-09 13:31:37 UTC
oVirt Team: ---
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
setup log (1.36 MB, text/x-log)
2014-03-07 14:08 UTC, Jiri Belka
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2014:0653 0 normal SHIPPED_LIVE rhevm-setup-plugins bug fix and enhancement update 2014-06-09 17:21:48 UTC

Description Jiri Belka 2014-03-07 14:08:19 UTC
Created attachment 871904 [details]
setup log

Description of problem:

Defining some RH support plugin options but they are not saved.

# engine-setup
...
         
          Would you like transactions from the Red Hat Access Plugin sent from the RHEV Manager to be brokered through a proxy server? (Yes, No) [No]: Yes
          Please enter your proxy server so that the Red Hat Access Plug-in can reach access.redhat.com.[http://localhost]: http://127.0.0.1
          Please enter the port of your proxy server. [3128]: 8080
          If your proxy server requires a user name, please enter it now [username]: someuser
          Proxy server password: 
...
[ INFO  ] Generating answer file '/var/lib/ovirt-engine/setup/answers/20140307145931-setup.conf'
[ INFO  ] Stage: Clean up
          Log file is located at /var/log/ovirt-engine/setup/ovirt-engine-setup-20140307145806.log
[ INFO  ] Stage: Pre-termination
[ INFO  ] Stage: Termination
[ INFO  ] Execution of setup completed successfully

# cat /var/lib/ovirt-engine/setup/answers/20140307145931-setup.conf | sort | uniq -d
OVESETUP_RHEVM_SUPPORT/configureRedhatSupportPlugin=bool:False
OVESETUP_RHEVM_SUPPORT/redhatSupportProxyEnabled=bool:True
OVESETUP_RHEVM_SUPPORT/redhatSupportProxyPassword=str:somepass
OVESETUP_RHEVM_SUPPORT/redhatSupportProxyPort=str:8080
OVESETUP_RHEVM_SUPPORT/redhatSupportProxy=str:http://127.0.0.1
OVESETUP_RHEVM_SUPPORT/redhatSupportProxyUser=str:someuser

^^^ huh, duplicated lines!

# cat /etc/ovirt-engine-setup.conf.d/20-setup-ovirt-post.conf                                                                                              
[environment:default]
OVESETUP_CORE/generatedByVersion=str:3.4.0_master
OVESETUP_SYSTEM/nfsConfigEnabled=bool:False
OVESETUP_CONFIG/isoDomainName=none:None
OVESETUP_CONFIG/isoDomainSdUuid=none:None
OVESETUP_CONFIG/firewallManager=str:iptables
OVESETUP_CONFIG/websocketProxyConfig=bool:True
OVESETUP_CONFIG/fqdn=str:jb-rhevm34.rhev.lab.eng.brq.redhat.com
OVESETUP_CONFIG/isoDomainMountPoint=none:None
OVESETUP_CONFIG/isoDomainExists=bool:False
OVESETUP_CONFIG/isoDomainStorageDir=none:None
OVESETUP_APACHE/configured=bool:True
OVESETUP_RHEVM_SUPPORT/configureRedhatSupportPlugin=bool:False
OVESETUP_RHEVM_SUPPORT/configureRedhatSupportPlugin=bool:False
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - why twice? where are other options?
- redhatSupportProxyEnabled
- redhatSupportProxyPassword
- redhatSupportProxyPort
- redhatSupportProxy
- redhatSupportProxyUser


Version-Release number of selected component (if applicable):
rhevm-setup-3.4.0-0.3.master.el6ev.noarch

How reproducible:
100%

Steps to Reproduce:
1. yes proxy for rh support plugin rhev
2.
3.

Actual results:
options not saved in /etc, duplicated lines in /etc and answer file

Expected results:
save options in /etc, do not create bogus duplicated lines

Additional info:

Comment 1 Alon Bar-Lev 2014-03-24 08:48:24 UTC
"be careful, this is going to change the current answer files in CI, and as this is post release of 3.3 then there should be some conversion code."[1]

We should add this.

[1] https://gerrit.eng.lab.tlv.redhat.com/#/c/10843/1

Comment 2 Sandro Bonazzola 2014-04-07 07:57:06 UTC
Alon, what do you mean? Add conversion code?

Comment 3 Alon Bar-Lev 2014-04-07 08:00:21 UTC
(In reply to Sandro Bonazzola from comment #2)
> Alon, what do you mean? Add conversion code?

Look into the previous variables and set the new ones.
In 3.4 you can break backward compatibility for answer files of 3.3.
If I remember correctly this was done in 3.3?

Comment 4 Yedidyah Bar David 2014-04-09 09:14:47 UTC
(In reply to Jiri Belka from comment #0)
> # cat /var/lib/ovirt-engine/setup/answers/20140307145931-setup.conf | sort |
> uniq -d
> OVESETUP_RHEVM_SUPPORT/configureRedhatSupportPlugin=bool:False
> OVESETUP_RHEVM_SUPPORT/redhatSupportProxyEnabled=bool:True
> OVESETUP_RHEVM_SUPPORT/redhatSupportProxyPassword=str:somepass
> OVESETUP_RHEVM_SUPPORT/redhatSupportProxyPort=str:8080
> OVESETUP_RHEVM_SUPPORT/redhatSupportProxy=str:http://127.0.0.1
> OVESETUP_RHEVM_SUPPORT/redhatSupportProxyUser=str:someuser
> 
> ^^^ huh, duplicated lines!

Right, that's a bug :-)

> 
> # cat /etc/ovirt-engine-setup.conf.d/20-setup-ovirt-post.conf               
> 
> [environment:default]
> OVESETUP_CORE/generatedByVersion=str:3.4.0_master
> OVESETUP_SYSTEM/nfsConfigEnabled=bool:False
> OVESETUP_CONFIG/isoDomainName=none:None
> OVESETUP_CONFIG/isoDomainSdUuid=none:None
> OVESETUP_CONFIG/firewallManager=str:iptables
> OVESETUP_CONFIG/websocketProxyConfig=bool:True
> OVESETUP_CONFIG/fqdn=str:jb-rhevm34.rhev.lab.eng.brq.redhat.com
> OVESETUP_CONFIG/isoDomainMountPoint=none:None
> OVESETUP_CONFIG/isoDomainExists=bool:False
> OVESETUP_CONFIG/isoDomainStorageDir=none:None
> OVESETUP_APACHE/configured=bool:True
> OVESETUP_RHEVM_SUPPORT/configureRedhatSupportPlugin=bool:False
> OVESETUP_RHEVM_SUPPORT/configureRedhatSupportPlugin=bool:False
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - why twice?

Also this. Actually the same one.

> where are
> other options?
> - redhatSupportProxyEnabled
> - redhatSupportProxyPassword
> - redhatSupportProxyPort
> - redhatSupportProxy
> - redhatSupportProxyUser

That's not a bug. One the support plugin is configured, and postinstall sets 'configure=False' to prevent configuring it again, we do not need these answers in future upgrades.

Now pushed a fix.

(In reply to Alon Bar-Lev from comment #1)
> "be careful, this is going to change the current answer files in CI, and as
> this is post release of 3.3 then there should be some conversion code."[1]
> 
> We should add this.
> 
> [1] https://gerrit.eng.lab.tlv.redhat.com/#/c/10843/1

That's unrelated to this bug.

Jiri - not sure if you understood Alon's comment. Answer files for 3.3 have a different prefix in their keys than for 3.4+ - e.g.
3.3:
OVESETUP_SYSTEM/configureRedhatSupportPlugin
OVESETUP_SYSTEM/redhatSupportProxyPort
3.4:
OVESETUP_RHEVM_SUPPORT/configureRedhatSupportPlugin
OVESETUP_RHEVM_SUPPORT/redhatSupportProxyPort

Not sure this is a problem, just note. If it is, open a bug :-)

Comment 6 Jiri Belka 2014-04-30 09:28:28 UTC
ok, av7.

# cat /var/lib/ovirt-engine/setup/answers/20140430090102-setup.conf | sort | uniq -d
#

Comment 7 errata-xmlrpc 2014-06-09 13:31:37 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.

http://rhn.redhat.com/errata/RHBA-2014-0653.html


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