Bug 1472742 - Running engine-host-update.py with single host in the cluster and running VM shows traceback
Summary: Running engine-host-update.py with single host in the cluster and running VM ...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: General
Version: 4.1.4.2
Hardware: All
OS: All
unspecified
medium
Target Milestone: ---
: ---
Assignee: Lev Veyde
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-07-19 10:12 UTC by Lukas Svaty
Modified: 2017-09-25 13:28 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2017-07-31 09:10:01 UTC
oVirt Team: Integration
Embargoed:


Attachments (Terms of Use)

Description Lukas Svaty 2017-07-19 10:12:00 UTC
Description of problem:
Running engine-host-update.py with single host and running VM shows traceback. This traceback should be properly handled and only details should be displays.



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

How reproducible:
100%

Steps to Reproduce:
1. Have 1 host with running VM in engine
2. run `./engine-host-update.py --insecure --engine=localhost --username=admin@internal --password=mypass` --cluster=Default

Actual results:
Processing Host: moonmoon
Type: rhel
	Moving host to the maintenanceTraceback (most recent call last):
  File "./engine-host-update.py", line 684, in <module>
    processHost(api, host, skipInvalidHostNames)
  File "./engine-host-update.py", line 393, in processHost
    deactivateHost(api, name)
  File "./engine-host-update.py", line 213, in deactivateHost
    host.deactivate()
  File "/usr/lib/python2.7/site-packages/ovirtsdk/infrastructure/brokers.py", line 14293, in deactivate
    headers={"Correlation-Id":correlation_id}
  File "/usr/lib/python2.7/site-packages/ovirtsdk/infrastructure/proxy.py", line 122, in request
    persistent_auth=self.__persistent_auth
  File "/usr/lib/python2.7/site-packages/ovirtsdk/infrastructure/connectionspool.py", line 79, in do_request
    persistent_auth)
  File "/usr/lib/python2.7/site-packages/ovirtsdk/infrastructure/connectionspool.py", line 162, in __do_request
    raise errors.RequestError(response_code, response_reason, response_body)
ovirtsdk.infrastructure.errors.RequestError: 
status: 409
reason: Conflict
detail: The following Hosts have running VMs and cannot be switched to maintenance mode: moonmoon.Please ensure that the following Clusters have at least one Host in UP state: Default.


Expected results:
Error: The following Hosts have running VMs and cannot be switched to maintenance mode: moonmoon.Please ensure that the following Clusters have at least one Host in UP state: Default.

Comment 1 Sandro Bonazzola 2017-07-31 09:10:01 UTC
Not going to fix this, behavior is considered acceptable for this tool.


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