Bug 1466383 - 'Reinstall' action doesn't change vds_type to correct value
Summary: 'Reinstall' action doesn't change vds_type to correct value
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: ovirt-host-deploy
Classification: oVirt
Component: General
Version: 1.6.6
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: ---
Assignee: Yedidyah Bar David
QA Contact: Pavel Stehlik
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-06-29 13:53 UTC by Jiri Belka
Modified: 2017-06-29 15:02 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-06-29 14:26:37 UTC
oVirt Team: Infra
Embargoed:


Attachments (Terms of Use)

Description Jiri Belka 2017-06-29 13:53:22 UTC
Description of problem:

'Reinstall' action in Admin Portal doesn't change vds_type to correct value.

Don't we assume as default the host is '0' (EL) and thus we do check only if it is a node and only if it is, we trigger to change vds_type?

If a host is EL and is reinstalled completely to RHVH, vds_type is changed (as we had this issue related to 3.6 NGN with vds_type = 0 in 3.6/4.0).

If a host is RHVH and is reinstalled completely to EL, vds_type is not changes (it is kept still as '1').

This impacts check_update and update of the host!


~~~
4.1 NGN
=======

2017-06-29 15:11:42 DEBUG otopi.plugins.otopi.system.info info._init:40 distribution ('Red Hat Enterprise Linux', '7.3', '')
...
VDSM/nodeHasOwnBridges=bool:'False'
VDSM/nodePluginVdsmFeatures=list:'[]'
VDSM/ovirt-legacy-node=bool:'False'
VDSM/ovirt-node=bool:'True'


engine=# select vds_name,free_text_comment,pretty_name,host_os,vds_type from vds;
    vds_name    | free_text_comment |               pretty_name               |       host_os        | vds_type
----------------+-------------------+-----------------------------------------+----------------------+----------
 dell-r210ii-04 | ngn               | Red Hat Virtualization Host 4.1 (el7.3) | RHEL - 7.3 - 2.1.el7 |        1
(1 row)

EL7
===

2017-06-29 15:40:21 DEBUG otopi.plugins.otopi.system.info info._init:40 distribution ('Red Hat Enterprise Linux Server', '7.3', 'Maipo')
...
VDSM/nodeHasOwnBridges=bool:'False'
VDSM/nodePluginVdsmFeatures=list:'[]'
VDSM/ovirt-legacy-node=bool:'False'
VDSM/ovirt-node=bool:'False

engine=# select vds_name,free_text_comment,pretty_name,host_os,vds_type from vds;
    vds_name    | free_text_comment |                 pretty_name                 |      host_os       | vds_type
----------------+-------------------+---------------------------------------------+--------------------+----------
 dell-r210ii-04 | el7               | Red Hat Enterprise Linux Server 7.3 (Maipo) | RHEL - 7.3 - 7.el7 |        1
(1 row)
~~~

Check update of the reinstalled host:

~~~
2017-06-29 15:50:33 ERROR otopi.plugins.ovirt_host_mgmt.packages.update update.error:102 Yum: Cannot queue package ovirt-node-ng-image-update: Package ovirt-node-ng-image-update cannot be found
2017-06-29 15:50:33 INFO otopi.plugins.ovirt_host_mgmt.packages.update update.info:98 Yum: Performing yum transaction rollback
2017-06-29 15:50:33 DEBUG otopi.context context._executeMethod:142 method exception
Traceback (most recent call last):
  File "/tmp/ovirt-P5L96EAKGZ/pythonlib/otopi/context.py", line 132, in _executeMethod
    method['method']()
  File "/tmp/ovirt-P5L96EAKGZ/otopi-plugins/ovirt-host-mgmt/packages/update.py", line 110, in _packagesCheck
    packages=self.environment[omgmt.PackagesEnv.PACKAGES],
  File "/tmp/ovirt-P5L96EAKGZ/pythonlib/otopi/miniyum.py", line 851, in install
    **kwargs
  File "/tmp/ovirt-P5L96EAKGZ/pythonlib/otopi/miniyum.py", line 500, in _queue
    package=package,
RuntimeError: Package ovirt-node-ng-image-update cannot be found
~~~

Version-Release number of selected component (if applicable):
ovirt-host-deploy-1.6.6-1.el7ev.noarch
ovirt-engine-4.1.3.5-0.1.el7.noarch

How reproducible:
100%

Steps to Reproduce:
1. install RHVH and check vds_type
2. put the host into maintenance and do complete reinstall of the host's OS
3. update ssh fingerprint of the host in Admin Portal, click Reinstall

Actual results:
after the host is successfully Up again, vds_type is still '1'

Expected results:
vds_type should be changed to '0'

Additional info:

Comment 2 Oved Ourfali 2017-06-29 13:56:49 UTC
I don't think we support switching RHV-H and RHEL with re-install.
Moti - am I right?

Comment 3 Moti Asayag 2017-06-29 14:24:42 UTC
(In reply to Oved Ourfali from comment #2)
> I don't think we support switching RHV-H and RHEL with re-install.
> Moti - am I right?

Yes, we don't support Ovirt-Node to EL transition.
The user/admin should remove the host and add it back.

Comment 4 Jiri Belka 2017-06-29 15:02:56 UTC
Then we need to modify docs as this is not stated anymore and we support complete hosts reinstallation without Removing the host from engine.


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