[Kimchi-devel] [PATCH] Fix: retrieve right bus type in vmstorage update

Christy Perez christy at linux.vnet.ibm.com
Mon Sep 29 14:57:41 UTC 2014


Reviewed-By: Christy Perez <christy at linux.vnet.ibm.com>


On 09/26/2014 03:40 AM, lvroyce at linux.vnet.ibm.com wrote:
> From: Royce Lv <lvroyce at linux.vnet.ibm.com>
> 
> When disk source does not present in xml(i.e. cdrom ejected),
> bus type probe will be ignored because of former exception.
> Retrive right bus type before source probe to fix this.
> 
> Signed-off-by: Royce Lv <lvroyce at linux.vnet.ibm.com>
> ---
>  src/kimchi/vmdisks.py | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/src/kimchi/vmdisks.py b/src/kimchi/vmdisks.py
> index 6012ada..b61c883 100644
> --- a/src/kimchi/vmdisks.py
> +++ b/src/kimchi/vmdisks.py
> @@ -43,7 +43,7 @@ def get_vm_disk(dom, dev_name):
>                  "KCHVMSTOR0007E",
>                  {'dev_name': dev_name, 'vm_name': dom.name()})
>      path = ""
> -    dev_bus = 'ide'
> +    dev_bus = disk.target.attrib['bus']
>      try:
>          source = disk.source
>          if source is not None:
> @@ -55,8 +55,6 @@ def get_vm_disk(dom, dev_name):
>                          host.attrib['port'] + source.attrib['name'])
>              else:
>                  path = source.attrib[DEV_TYPE_SRC_ATTR_MAP[src_type]]
> -        # Retrieve storage bus type
> -        dev_bus = disk.target.attrib['bus']
>      except:
>          pass
>      dev_type = disk.attrib['device']
> 




More information about the Kimchi-devel mailing list