Bug 1129248 - Unable to add cluster with engine-cli, failing on cpu-architecture
Summary: Unable to add cluster with engine-cli, failing on cpu-architecture
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: oVirt
Classification: Retired
Component: ovirt-engine-api
Version: 3.5
Hardware: All
OS: All
medium
medium
Target Milestone: ---
: 3.5.0
Assignee: Juan Hernández
QA Contact: Jiri Belka
URL:
Whiteboard: infra
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-08-12 11:46 UTC by Lukas Svaty
Modified: 2016-02-10 19:32 UTC (History)
6 users (show)

Fixed In Version: ovirt-3.5.0_rc2
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-10-17 12:24:31 UTC
oVirt Team: Infra
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 31693 0 master MERGED restapi: Ignore case in CPU architecture Never
oVirt gerrit 31758 0 ovirt-engine-3.5 MERGED restapi: Ignore case in CPU architecture Never

Description Lukas Svaty 2014-08-12 11:46:41 UTC
Description of problem:
When trying to add cluster cpu-architecture provided in error message is not correct.

Version-Release number of selected component (if applicable):
ovirt-rc1

How reproducible:
100%

Steps to Reproduce:
[oVirt shell (connected)]# add cluster --name "foo" --data_center-name Default --cpu-architecture ppc64
  ==================================== ERROR =================================
  status: 400
  reason: Bad Request
  detail: ppc64 is not a member of Architecture. Possible values for Architecture are: undefined, x86_64, ppc64
  ============================================================================

[oVirt shell (connected)]# add cluster --name "foo" --data_center-name Default --cpu-architecture x86_64
  ==================================== ERROR =================================
  status: 400
  reason: Bad Request
  detail: x86_64 is not a member of Architecture. Possible values for Architecture are: undefined, x86_64, ppc64
  ============================================================================

[oVirt shell (connected)]# add cluster --name "foo" --data_center-name Default --cpu-architecture undefined
  ==================================== ERROR =================================
  status: 400
  reason: Bad Request
  detail: undefined is not a member of Architecture. Possible values for Architecture are: undefined, x86_64, ppc64
  ============================================================================



Actual results:
Any of possible valuas are impossible.

Expected results:
Possible values should be possible to add.

Additional info:
Nothing in engine log as the action ends with error.

Comment 1 Juan Hernández 2014-08-20 09:34:06 UTC
The problem is that we are performing the lookup of the architecture using a case sensitive search, but the names of the architectures inside the engine are upper case. The proposed fix is to change the comparison to ignore case.

Note that in order to add a cluster you also need to specify the type of CPU:

# add cluster --name foo --data_center-name Default --cpu-architecture x86_64 --cpu-id "Intel SandyBridge Family"

Comment 2 Jiri Belka 2014-09-17 07:46:49 UTC
ok, ovirt-engine-backend-3.5.0-0.0.master.20140911085455.gite1c5ffd.el6.noarch

Comment 3 Sandro Bonazzola 2014-10-17 12:24:31 UTC
oVirt 3.5 has been released and should include the fix for this issue.


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