Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1359844 - [downsream clone - 3.6.9] engine-setup should warn users running within hosted engine to set to maintenance
[downsream clone - 3.6.9] engine-setup should warn users running within hoste...
Status: CLOSED ERRATA
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine (Show other bugs)
unspecified
Unspecified Unspecified
high Severity high
: ovirt-3.6.9
: 3.6.9
Assigned To: Lev Veyde
Jiri Belka
: EasyFix, ZStream
Depends On: 1290073
Blocks: 1375161
  Show dependency treegraph
 
Reported: 2016-07-25 10:19 EDT by rhev-integ
Modified: 2016-09-21 14:05 EDT (History)
17 users (show)

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
With this update, users are now warned to set the system in global maintenance mode before running the engine-setup command. This is because data corruption may occur if the engine-setup command is run without setting the system into global maintenance mode. This update means that the user is warned and the setup will be aborted if the system is not in global maintenance mode and the engine is running in the hosted engine configuration.
Story Points: ---
Clone Of: 1290073
Environment:
Last Closed: 2016-09-21 14:05:14 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: Integration
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
oVirt gerrit 57270 master MERGED packaging: Add Hosted Engine VM detection 2016-07-25 10:19 EDT
oVirt gerrit 60264 ovirt-engine-4.0 ABANDONED packaging: Add Hosted Engine VM detection 2016-07-25 10:19 EDT
oVirt gerrit 60265 ovirt-engine-4.0.1 ABANDONED packaging: Add Hosted Engine VM detection 2016-07-25 10:19 EDT
oVirt gerrit 60268 None None None 2016-07-25 10:19 EDT
oVirt gerrit 60275 master MERGED packaging: Add Hosted Engine VM detection 2016-07-25 10:19 EDT
oVirt gerrit 61339 ovirt-engine-3.6 MERGED packaging: Add Hosted Engine VM detection 2016-07-25 11:06 EDT
oVirt gerrit 63724 master MERGED packaging: setup: Handle the case when HE option is missing 2016-09-13 09:38 EDT
oVirt gerrit 63725 ovirt-engine-3.6 MERGED packaging: setup: Handle the case when HE option is missing 2016-09-13 10:03 EDT
oVirt gerrit 63737 ovirt-engine-4.0 MERGED packaging: setup: Handle the case when HE option is missing 2016-09-13 10:02 EDT
oVirt gerrit 63740 ovirt-engine-3.6.9 MERGED packaging: setup: Handle the case when HE option is missing 2016-09-13 10:17 EDT
oVirt gerrit 63741 ovirt-engine-4.0.4 MERGED packaging: setup: Handle the case when HE option is missing 2016-09-13 10:22 EDT
Red Hat Product Errata RHSA-2016:1929 normal SHIPPED_LIVE Moderate: Red Hat Virtualization Manager (RHV) bug fix 3.6.9 2016-09-21 17:57:10 EDT

  None (edit)
Comment 2 Jiri Belka 2016-09-12 07:12:26 EDT
ok, rhevm-3.6.9-2

~~~
...
[ INFO  ] Stage: Setup validation
          During execution engine service will be stopped (OK, Cancel) [OK]: 
[ ERROR ] It seems that you are running your engine inside of the hosted-engine VM and are not in "Global M
aintenance" mode. In that case you should put the system into the "Global Maintenance" mode before running 
engine-setup, or the hosted-engine HA agent might kill the machine, which might corrupt your data. 
[ ERROR ] Failed to execute stage 'Setup validation': Hosted Engine setup detected, but Global Maintenance 
is not set.
[ INFO  ] Stage: Clean up
          Log file is located at /var/log/ovirt-engine/setup/ovirt-engine-setup-20160912125329-zljjsj.log
[ INFO  ] Generating answer file '/var/lib/ovirt-engine/setup/answers/20160912130140-setup.conf'
[ INFO  ] Stage: Pre-termination
[ INFO  ] Stage: Termination
[ ERROR ] Execution of setup failed
~~~

with global maintenance enabled no such error is visible.
Comment 3 Jiri Belka 2016-09-13 03:04:29 EDT
Ooops, this causes broken upgrade of SHE (engine) from 3.5 to 3.6:

~~~
2016-09-13 08:56:16 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:171 Database: 'None', Statement: '
                select version, option_value
                from vdc_options
                where option_name = %(name)s
            ', args: {'name': 'HostedEngineVmName'}
2016-09-13 08:56:16 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:176 Creating own connection
2016-09-13 08:56:16 DEBUG otopi.ovirt_engine_setup.engine_common.database database.execute:221 Result: []
2016-09-13 08:56:16 DEBUG otopi.context context._executeMethod:156 method exception
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/otopi/context.py", line 146, in _executeMethod
    method['method']()
  File "/usr/share/ovirt-engine/setup/bin/../plugins/ovirt-engine-common/ovirt-engine-common/system/he.py", line 71, in _validate
    ownConnection=True,
  File "/usr/share/ovirt-engine/setup/ovirt_engine_setup/engine/vdcoption.py", line 86, in getVdcOption
    ownConnection=ownConnection,
  File "/usr/share/ovirt-engine/setup/ovirt_engine_setup/engine/vdcoption.py", line 61, in getVdcOptionVersions
    name=name,
RuntimeError: Cannot locate application option HostedEngineVmName
2016-09-13 08:56:16 ERROR otopi.context context._executeMethod:165 Failed to execute stage 'Setup validation': Cannot locate application option HostedEngineVmName
~~~

3.5 engine obviously doesn't know this:

~~~
engine=# select version, option_name,option_value from vdc_options where option_name = 'HostedEngineVmName
';
 version | option_name | option_value 
---------+-------------+--------------
(0 rows)
~~~
Comment 5 Jiri Belka 2016-09-13 03:07:21 EDT
(In reply to Jiri Belka from comment #3)
> Ooops, this causes broken upgrade of SHE (engine) from 3.5 to 3.6:
> 
> ~~~
> 2016-09-13 08:56:16 DEBUG otopi.ovirt_engine_setup.engine_common.database
> database.execute:171 Database: 'None', Statement: '
>                 select version, option_value
>                 from vdc_options
>                 where option_name = %(name)s
>             ', args: {'name': 'HostedEngineVmName'}
> 2016-09-13 08:56:16 DEBUG otopi.ovirt_engine_setup.engine_common.database
> database.execute:176 Creating own connection
> 2016-09-13 08:56:16 DEBUG otopi.ovirt_engine_setup.engine_common.database
> database.execute:221 Result: []
> 2016-09-13 08:56:16 DEBUG otopi.context context._executeMethod:156 method
> exception
> Traceback (most recent call last):
>   File "/usr/lib/python2.6/site-packages/otopi/context.py", line 146, in
> _executeMethod
>     method['method']()
>   File
> "/usr/share/ovirt-engine/setup/bin/../plugins/ovirt-engine-common/ovirt-
> engine-common/system/he.py", line 71, in _validate
>     ownConnection=True,
>   File
> "/usr/share/ovirt-engine/setup/ovirt_engine_setup/engine/vdcoption.py", line
> 86, in getVdcOption
>     ownConnection=ownConnection,
>   File
> "/usr/share/ovirt-engine/setup/ovirt_engine_setup/engine/vdcoption.py", line
> 61, in getVdcOptionVersions
>     name=name,
> RuntimeError: Cannot locate application option HostedEngineVmName
> 2016-09-13 08:56:16 ERROR otopi.context context._executeMethod:165 Failed to
> execute stage 'Setup validation': Cannot locate application option
> HostedEngineVmName
> ~~~
> 
> 3.5 engine obviously doesn't know this:
> 
> ~~~
> engine=# select version, option_name,option_value from vdc_options where
> option_name = 'HostedEngineVmName
> ';
>  version | option_name | option_value 
> ---------+-------------+--------------
> (0 rows)
> ~~~

Steps:

1. have 3.5 SHE env
2. global maintenance
3. update rpms inside engine VM
4. engine-setup
Comment 6 Jiri Belka 2016-09-13 03:21:17 EDT
Workaround:

curl -o /tmp/patch 'https://gerrit.ovirt.org/gitweb?p=ovirt-engine.git;a=patch;h=23e9a25de622eb374efa8ffcf8c0bb613082cfc5'
cd /usr/share/ovirt-engine
patch -p2 -R < /tmp/patch
Comment 7 Jiri Belka 2016-09-16 07:24:53 EDT
ok, rhevm-setup-plugin-ovirt-engine-3.6.9.2-0.1.el6.noarch
Comment 9 errata-xmlrpc 2016-09-21 14:05:14 EDT
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.

https://rhn.redhat.com/errata/RHSA-2016-1929.html

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