[Kimchi-devel] [PATCH] API.json: allow scsi storage devices

Daniel H Barboza danielhb at linux.vnet.ibm.com
Tue Sep 16 15:04:23 UTC 2014


On 09/16/2014 11:13 AM, Daniel H Barboza wrote:
>
> On 09/16/2014 12:07 AM, Royce Lv wrote:
>> On 2014年09月16日 10:47, Daniel Henrique Barboza wrote:
>>> Kimchi does not allow scsi devices to be attached in a VM (devices
>>> with names sdb,sdc ...). A simple change in API.json regex of
>>> vmstorages_create fixes it.
>>>
>>> Signed-off-by: Daniel Henrique Barboza <danielhb at linux.vnet.ibm.com>
>>> ---
>>>   src/kimchi/API.json | 2 +-
>>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/src/kimchi/API.json b/src/kimchi/API.json
>>> index 1319531..4a3cd03 100644
>>> --- a/src/kimchi/API.json
>>> +++ b/src/kimchi/API.json
>>> @@ -489,7 +489,7 @@
>>>                   "dev": {
>>>                       "description": "The storage device name",
>>>                       "type": "string",
>>> -                    "pattern": "^h|vd[b-z]$",
>>> +                    "pattern": "^h|s|vd[b-z]$",
>>>                       "error": "KCHVMSTOR0001E"
>>>                   },
>>>                   "type": {
>> I'm good with this change itself.
>>
>> As I commented in bugzilla, if we consider this case:
>> pass "hda" as name while platform does not support IDE bus,
>> disk is actually created as SCSI disk but named as "hda"
>> it may course confusion about why scsi disk accept name start with 'hd'.
>>
>> So allow all patterns have problem too. I suggest we add logic to 
>> check what bus are accepted to decide if a name convention is right.
>>
>> I guess refer to "_get_storage_device_name()" and make some changes 
>> will do.
> I agree. I'll send a v2.

The v2 of this work was sent in the patch "[PATCH] vmstorages changes 
for Power: allow SCSI devs, block IDE devs"

Thanks!

>
> Thanks!
>
>>
>>
>
> _______________________________________________
> Kimchi-devel mailing list
> Kimchi-devel at ovirt.org
> http://lists.ovirt.org/mailman/listinfo/kimchi-devel




More information about the Kimchi-devel mailing list