Bug 1472742 - Running engine-host-update.py with single host and running VM shows traceback
Running engine-host-update.py with single host and running VM shows traceback
Status: CLOSED WONTFIX
Product: ovirt-engine
Classification: oVirt
Component: General (Show other bugs)
4.1.4.2
All All
unspecified Severity medium (vote)
: ---
: ---
Assigned To: Lev Veyde
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2017-07-19 06:12 EDT by Lukas Svaty
Modified: 2017-07-31 05:10 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-07-31 05:10:01 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: Integration
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Lukas Svaty 2017-07-19 06:12:00 EDT
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 05:10:01 EDT
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.