Bug 806776 - oVirt CLI : cannot create storagedomain via oVirt CLI
oVirt CLI : cannot create storagedomain via oVirt CLI
Product: oVirt
Classification: Community
Component: ovirt-engine-cli (Show other bugs)
Unspecified Unspecified
unspecified Severity urgent
: ---
: ---
Assigned To: Michael Pasternak
Depends On:
  Show dependency treegraph
Reported: 2012-03-26 04:14 EDT by Avihai Shoham
Modified: 2014-01-12 19:37 EST (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2012-03-26 10:22:21 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
email-thread (4.60 KB, message/rfc822)
2012-03-26 04:14 EDT, Avihai Shoham
no flags Details

  None (edit)
Description Avihai Shoham 2012-03-26 04:14:38 EDT
Created attachment 572694 [details]

i'm getting exception after entering 
[oVirt shell (connected)]# create storagedomain --host-name gold-vdsc --type iscsi --storage-type data --datacenter-identifier "1827abcf-5c2f-49d0-b062-83a7251fcf38" --id "a"

It appears that it fails because of the [--id "a"] 
without it the command failed
see http://pastebin.test.redhat.com/82506

observed by Ori

see attached
Comment 1 Michael Pasternak 2012-03-26 10:22:21 EDT
this is not correct, the action you perform is /attach/ of SD to DC,
and since it done via POST as creates, its done by CREATE command in CLI,
and id is obviously mandatory as you have to tell api which SD to attach,

and again Avihi (this is not first time) you doing exactly the same mistake again, supplying string where option name is /id/!, 

even in exception you can see: "Invalid UUID string: a" ...,
please pay attention on this things!

for creating SD, see help in 'help create storagedomain'
Comment 2 Avihai Shoham 2012-03-26 10:38:54 EDT
Michael, i disagree on a status "not a bug"
did you manage to create SD? 
as i wrote you in the email this was a wrong pastebin. see

it happen with names as well . 

few facts 
 id|name is required to complete this command. and as it looks it related to storagedomain name that a user should give, if not he will get the below error , and from that point any string|ID that he will enter will results with exception

[oVirt shell (connected)]# create storagedomain --host-name gold-vdsc --type iscsi --storage-type data --datacenter-identifier "1827abcf-5c2f-49d0-b062-83a7251fcf38" 
unknown error: 
status: 400
reason: Bad Request
detail: StorageDomain [id|name] required for add

help create storagedomain
has it own bugs ,as the lined there are multiple 

* --format: boolean
    * --format: boolean
    * --format: boolean
    * --host-id|name: string
    * --host-id|name: string
    * --host-id|name: string
    * --name: string
    * --name: string
    * --name: string
    * --storage-address: string
    * --storage-path: string
    * --storage-path: string
    * --storage-type: string
    * --storage-type: string
    * --storage-type: string
    * --type: string
    * --type: string
    * --type: string
    * [--storage-logical_units-logical_unit-address: string]
    * [--storage-logical_units-logical_unit-address: string]
    * [--storage-logical_units-logical_unit-address: string]
    * [--storage-logical_units-logical_unit-id: string]
    * [--storage-logical_units-logical_unit-id: string]
    * [--storage-logical_units-logical_unit-id: string]
    * [--storage-logical_units-logical_unit-lun_mapping: int]
    * [--storage-logical_units-logical_unit-lun_mapping: int]
    * [--storage-logical_units-logical_unit-lun_mapping: int]
    * [--storage-logical_units-logical_unit-password: string]
    * [--storage-logical_units-logical_unit-password: string]
    * [--storage-logical_units-logical_unit-password: string]
Comment 3 Avihai Shoham 2012-03-26 10:57:09 EDT
sorry - replacing preview comments with the follow one.

i agreed with Ori that this is an issue and file ths BZ

The help command  is not clear

could you please elaborate on what a user should enter.
i tried to create SD , when i miss the id|name CLI return with "StorageDomain [id|name] required for add"

obviously as a user i enter the missing params.

now you say that "you have to tell api which SD to attach," 

i show to few people  and the feeling this command not so intuitive

in any case exception should not occur.
Comment 4 Avihai Shoham 2012-03-26 12:11:36 EDT
in addition , please sync with Ori as you was out of the loop in that case
i'm trying to create storage and not attached

the existing of both options in "create SD" command are not healthy

i will fetch recent sdk&cli and check this issue, as Ori said that few changes were made in the last week.
Comment 5 Michael Pasternak 2012-03-26 12:18:34 EDT
iiuc you want to create the SD, but using attach-sd arguments....,
where do you see in 'help create storagedomain'  --datacenter-identifier

it's not there, by supplying it you change from CREATE SD to 
ATTACH SD, - this is how our API build and this is ain't related to CLI

please use only options mentioned in help and all will work for you.

- also there is nothing to sync, when you open bug among
supplying arguments you used, please explain what you trying to achieve,
the description you used was not much informative.
Comment 6 Michael Pasternak 2012-03-26 12:59:18 EDT
As about Comment 2, you using old and not official SDK that you build
by yourself, as i already mentioned please use *only* rpms officially
released in ovirt upstream repo.


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