Bug 1486753 - engine-setup --reconfigure-optional-components does not work
Summary: engine-setup --reconfigure-optional-components does not work
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: Setup.Core
Version: 4.1.7
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: ---
Assignee: Yedidyah Bar David
QA Contact: Pavel Stehlik
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-08-30 13:24 UTC by Jiri Belka
Modified: 2017-08-31 05:48 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-08-30 13:59:08 UTC
oVirt Team: Integration
Embargoed:


Attachments (Terms of Use)

Description Jiri Belka 2017-08-30 13:24:51 UTC
Description of problem:

after initial run i had:

/etc/ovirt-engine-setup.conf.d/20-setup-ovirt-post.conf:OVESETUP_CONFIG/sanWipeAfterDelete=bool:False
/etc/ovirt-engine-setup.conf.d/20-setup-ovirt-post.conf:OVESETUP_SYSTEM/nfsConfigEnabled_legacyInPostInstall=bool:False
/etc/ovirt-engine-setup.conf.d/20-setup-ovirt-post.conf:OVESETUP_CONFIG/isoDomainExists=bool:False
/etc/ovirt-engine-setup.conf.d/20-setup-ovirt-post.conf:OVESETUP_DWH_CONFIG/remoteEngineConfigured=bool:False
/etc/ovirt-engine-setup.conf.d/20-setup-ovirt-post.conf:OVESETUP_CONFIG/imageioProxyConfig=bool:False
/etc/ovirt-engine-setup.conf.d/20-setup-ovirt-post.conf:OVESETUP_VMCONSOLE_PROXY_CONFIG/vmconsoleProxyConfig=bool:False
/etc/ovirt-engine-setup.conf.d/20-setup-ovirt-post.conf:OVESETUP_CONFIG/websocketProxyConfig=bool:False

thus:

- imageio proxy disabled
- websocket proxy disabled
- webconsole proxy disabled

then, 2nd run with:

# engine-setup --reconfigure-optional-components
...
          Configure Image I/O Proxy               : False
          Configure VMConsole Proxy               : False
          Configure WebSocket Proxy               : False
...


Version-Release number of selected component (if applicable):
ovirt-engine-setup-base-4.1.5.2-0.1.el7.noarch

How reproducible:
100%
Steps to Reproduce:
1. engine-setup (make imageio proxy disabled)
2. engine-setup --reconfigure-optional-components
3. check if imageio proxy is enabled/disabled

Actual results:
previously disabled components are still disabled, user was not asked for confirmation

Expected results:
user should be asked for new confirmation

Additional info:

Comment 2 Jiri Belka 2017-08-30 13:35:55 UTC
this seems to be workaround:

engine-setup --otopi-environment='OVESETUP_CONFIG/imageioProxyConfig=bool:True OVESETUP_VMCONSOLE_PROXY_CONFIG/vmconsoleProxyConfig=bool:True OVESETUP_CONFIG/websocketP
roxyConfig=bool:True'

Comment 3 Yedidyah Bar David 2017-08-30 13:57:04 UTC
(In reply to Jiri Belka from comment #0)
> Description of problem:
> 
> after initial run i had:
> 
> /etc/ovirt-engine-setup.conf.d/20-setup-ovirt-post.conf:OVESETUP_CONFIG/
> sanWipeAfterDelete=bool:False
> /etc/ovirt-engine-setup.conf.d/20-setup-ovirt-post.conf:OVESETUP_SYSTEM/
> nfsConfigEnabled_legacyInPostInstall=bool:False
> /etc/ovirt-engine-setup.conf.d/20-setup-ovirt-post.conf:OVESETUP_CONFIG/
> isoDomainExists=bool:False
> /etc/ovirt-engine-setup.conf.d/20-setup-ovirt-post.conf:OVESETUP_DWH_CONFIG/
> remoteEngineConfigured=bool:False
> /etc/ovirt-engine-setup.conf.d/20-setup-ovirt-post.conf:OVESETUP_CONFIG/
> imageioProxyConfig=bool:False
> /etc/ovirt-engine-setup.conf.d/20-setup-ovirt-post.conf:
> OVESETUP_VMCONSOLE_PROXY_CONFIG/vmconsoleProxyConfig=bool:False
> /etc/ovirt-engine-setup.conf.d/20-setup-ovirt-post.conf:OVESETUP_CONFIG/
> websocketProxyConfig=bool:False
> 
> thus:
> 
> - imageio proxy disabled

This is reconfigurable only in 4.2

> - websocket proxy disabled
> - webconsole proxy disabled

These two are not reconfigurable

> 
> then, 2nd run with:
> 
> # engine-setup --reconfigure-optional-components
> ...
>           Configure Image I/O Proxy               : False
>           Configure VMConsole Proxy               : False
>           Configure WebSocket Proxy               : False
> ...
> 
> 
> Version-Release number of selected component (if applicable):
> ovirt-engine-setup-base-4.1.5.2-0.1.el7.noarch
> 
> How reproducible:
> 100%
> Steps to Reproduce:
> 1. engine-setup (make imageio proxy disabled)
> 2. engine-setup --reconfigure-optional-components
> 3. check if imageio proxy is enabled/disabled
> 
> Actual results:
> previously disabled components are still disabled, user was not asked for
> confirmation
> 
> Expected results:
> user should be asked for new confirmation

Indeed, but only for components that were marked so (in the code).

In 4.1, we only have these marked:
- docker setup of cinder and glance (two items)
- dwh

In current 4.2, the docker plugins were completely removed, so we have:
- dwh
- imageio

If you want other components to be configurable, please open RFEs as needed.
The code does not prevent marking (and handling) other env vars (in addition to "components"), but each case requires a separate consideration.

You do not have simple means to know which items are "configurable". Feel free to open an RFE for this - should be pretty easy to add this to the log.
"Non-simple" means are to search for 'reconfigurable=True' in the code [1].

When you pass --reconfigure-optional-components, you can see which items were actually reset (from False to None) by looking, in the setup log, right after the line that has:

Stage init METHOD otopi.plugins.ovirt_engine_common.base.core.reconfigure.Plugin._init

> 
> Additional info:

[1]
# cd /usr/share/ovirt-engine/setup
# grep -r -C5 reconfigurable=True *
ovirt_engine_setup/ovirt_imageio_proxy/constants.py-    @osetupattrs(
ovirt_engine_setup/ovirt_imageio_proxy/constants.py-        answerfile=True,
ovirt_engine_setup/ovirt_imageio_proxy/constants.py-        summary=True,
ovirt_engine_setup/ovirt_imageio_proxy/constants.py-        description=_('Configure Image I/O Proxy'),
ovirt_engine_setup/ovirt_imageio_proxy/constants.py-        postinstallfile=True,
ovirt_engine_setup/ovirt_imageio_proxy/constants.py:        reconfigurable=True,
ovirt_engine_setup/ovirt_imageio_proxy/constants.py-    )
ovirt_engine_setup/ovirt_imageio_proxy/constants.py-    def IMAGEIO_PROXY_CONFIG(self):
ovirt_engine_setup/ovirt_imageio_proxy/constants.py-        return 'OVESETUP_CONFIG/imageioProxyConfig'
ovirt_engine_setup/ovirt_imageio_proxy/constants.py-
ovirt_engine_setup/ovirt_imageio_proxy/constants.py-    OIP_CERTIFICATE_CHAIN = 'OVESETUP_CONFIG/oipCertificateChain'
--
ovirt_engine_setup/dwh/constants.py-
ovirt_engine_setup/dwh/constants.py-    @osetupattrs(
ovirt_engine_setup/dwh/constants.py-        answerfile=True,
ovirt_engine_setup/dwh/constants.py-        postinstallfile=True,
ovirt_engine_setup/dwh/constants.py-        summary=True,
ovirt_engine_setup/dwh/constants.py:        reconfigurable=True,
ovirt_engine_setup/dwh/constants.py-        description=_('DWH installation'),
ovirt_engine_setup/dwh/constants.py-    )
ovirt_engine_setup/dwh/constants.py-    def ENABLE(self):
ovirt_engine_setup/dwh/constants.py-        return 'OVESETUP_DWH_CORE/enable'
ovirt_engine_setup/dwh/constants.py-

Comment 4 Yedidyah Bar David 2017-08-30 13:59:08 UTC
(In reply to Jiri Belka from comment #2)
> this seems to be workaround:
> 
> engine-setup
> --otopi-environment='OVESETUP_CONFIG/imageioProxyConfig=bool:True
> OVESETUP_VMCONSOLE_PROXY_CONFIG/vmconsoleProxyConfig=bool:True
> OVESETUP_CONFIG/websocketP
> roxyConfig=bool:True'

Thanks for trying and reporting, but please do not suggest this to people in general. People that edit their answer files should know very well what they are doing, and the above is basically the same. We do not document the answer files.


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