Bug 1308563
Summary: | Adding a host with a name that is already in use returns a Bad Request (code 400) | ||
---|---|---|---|
Product: | [oVirt] ovirt-engine | Reporter: | Idan Shaby <ishaby> |
Component: | RestAPI | Assignee: | Boriso <bodnopoz> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | Petr Kubica <pkubica> |
Severity: | low | Docs Contact: | |
Priority: | low | ||
Version: | 4.0.0 | CC: | bodnopoz, bugs, juan.hernandez, oliel, sbonazzo, viper6277 |
Target Milestone: | ovirt-4.0.0-beta | Flags: | rule-engine:
ovirt-4.0.0+
rule-engine: planning_ack+ juan.hernandez: devel_ack+ pstehlik: testing_ack+ |
Target Release: | 4.0.0 | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2016-07-05 07:52:27 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | Infra | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Idan Shaby
2016-02-15 14:04:11 UTC
The API translates the error messages returned by the backend into HTTP codes according to the value returned by the ErrorMessage.getErrorType() message. The error returned by the backend when the name of the host is already in use is ACTION_TYPE_FAILED_NAME_ALREADY_USED, and the corresponding ErrorType is BAD_PARAMETERS, not CONFLICT. Not sure why it isn't CONFLICT. The change is simple, but it may have a backwards compatibility effect in existing clients, so I think it is better to not change it in the 3.6 branch. Ori, do you know why this error type isn't classified as CONFLICT? Moving from 4.0 alpha to 4.0 beta since 4.0 alpha has been already released and bug is not ON_QA. Verified in ovirt-engine-restapi-4.1.0-0.0.master.20160606111312.gitc7af584.el7.centos.noarch Response: 409 Conflict: Cannot add Host. Host with the same address already exists. oVirt 4.0.0 has been released, closing current release. I just installed oVirt 4.1.6 ...that latest release on a new instance of the latest release of CentOS 7.4.1708. After a setup attempt..."Datacenter" config, ..."Host" config, and "Storage" config...I realized I made a mistake in the config of the "Storage"->POSIX compliant FS Domain ...I basically setup an NFS Share in the wrong place...and instead of having access to 500GB I only had access to 40GB... So after several failed attempts to undo this ...I decided that a "Force Remove" of the Data Center...was probably my best solution and just rebuild the setup fresh... I quickly found out that this was a BAD idea !!! as the "Force Remove" option under "Data Centers" did almost nothing in the PostgreSQL DB... So I'm now left to clean entries in the Database to resolve this exact issue...that's supposed to be CLOSED !!! I did find this response, that describe where to locate the password of your PostgreSQL DB Instance : http://lists.ovirt.org/pipermail/users/2016-February/038035.html I just assumed that the password I used at install was the same password being used to create the database.... Not so... The setup was to figure out where in the 153 Tables do this stagnant entry for my IP Address exist... Found that answer here : http://lists.ovirt.org/pipermail/users/2014-January/019257.html Next tidbit... oVirt uses Contraints on Foreign Keys in the DB....so to delete the bad records...you have to delete in this order.. 1. vds_dynamic 2. vds_statistics 3. vds_static After this, all was good again... I must say...this 4 hour ordeal...could have been avoided by the fact that on a new install of oVirt...with NO ...Zero...VM's running or even configured...I should be allowed to edit...the "Domain" storage entry...I made a simple mistake by mounting the wrong NFS Share and adding it to the oVirt setup...and it cost me half the work day. Thanks guys, reminds me why I used VMware in the Past Hi Eduard, I am sorry to hear that you've had a bad experience with oVirt. Since you already managed to fix your env, I'll just say that next time you can send a question to users. Usually you will get a quick answer to these kind of questions. Idan |