Bug 1366794 - API V3: can't force delete datacenter
Summary: API V3: can't force delete datacenter
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: RestAPI
Version: 4.0.2
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: ovirt-4.0.4
: 4.0.4
Assignee: Juan Hernández
QA Contact: Lucie Leistnerova
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-08-12 20:41 UTC by Meni Yakove
Modified: 2016-09-26 12:32 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-09-26 12:32:54 UTC
oVirt Team: Infra
Embargoed:
rule-engine: ovirt-4.0.z+
rule-engine: blocker+
mgoldboi: planning_ack+
juan.hernandez: devel_ack+
pstehlik: testing_ack+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 62328 0 master MERGED restapi: Fix V3 for force remove data center 2016-08-17 09:04:39 UTC
oVirt gerrit 62406 0 ovirt-engine-4.0 MERGED restapi: Fix V3 for force remove data center 2016-08-17 09:47:33 UTC

Description Meni Yakove 2016-08-12 20:41:47 UTC
Description of problem:
Failed to force delete data center (REST API V3) with error:
<fault>
<reason>Operation Failed</reason>
<detail>[Cannot remove Data Center. There is no active Host in the Data Center.]</detail>
</fault>

Version-Release number of selected component (if applicable):
rhevm-4.0.2.6-0.1.el7ev.noarch

Steps to Reproduce:
DELETE to /ovirt-engine/api/datacenters/<DC_ID>

body:
<action>
    <force>true</force>
</action>

Comment 1 Martin Perina 2016-08-14 07:34:05 UTC
Meni, this looks like error message from engine (maybe the is in RemoveDC command) and not REST, could you please test that you are able to force remove the same DC in webadmin?

Comment 2 Meni Yakove 2016-08-14 12:52:35 UTC
I can force remove from UI.

Comment 3 Juan Hernández 2016-08-14 17:53:06 UTC
This is a bug in the V3 compatibility layer, we will fix it. Meanwhile if you need to force a remove a data center you should be able to do it using the "force" parameter:

  DELETE /ovirt-engine/api/datacenters/{datacenter:id}?force=true
  Version: 3

Note that this parameter was added in version 4 of the API, but as version 3 of the API delegates most work to version 4, you can use it with version 3 as well.

Comment 4 Red Hat Bugzilla Rules Engine 2016-08-14 17:53:11 UTC
This bug report has Keywords: Regression or TestBlocker.
Since no regressions or test blockers are allowed between releases, it is also being identified as a blocker for this release. Please resolve ASAP.

Comment 5 Juan Hernández 2016-08-14 17:54:04 UTC
I think that even if this is a regression, it isn't a blocker, because there is a workaround.

Comment 6 Red Hat Bugzilla Rules Engine 2016-08-14 17:54:09 UTC
This bug report has Keywords: Regression or TestBlocker.
Since no regressions or test blockers are allowed between releases, it is also being identified as a blocker for this release. Please resolve ASAP.

Comment 7 Lucie Leistnerova 2016-09-08 08:37:19 UTC
forced to delete datacenter with error [Cannot remove Data Center. There is no active Host in the Data Center.] in version 3

verified in ovirt-engine-restapi-4.0.4-0.1.el7ev.noarch


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