[Kimchi-devel] [PATCH] kimchi.disks: Ignore unsupported partition table
Rodrigo Trujillo
rodrigo.trujillo at linux.vnet.ibm.com
Fri Apr 11 15:34:12 UTC 2014
Reviewed-by: Rodrigo Trujillo <rodrigo.trujillo at linux.vnet.ibm.com>
Tested-by: Rodrigo Trujillo <rodrigo.trujillo at linux.vnet.ibm.com>
On 04/11/2014 02:57 AM, zhshzhou at linux.vnet.ibm.com wrote:
> From: Zhou Zheng Sheng <zhshzhou at linux.vnet.ibm.com>
>
> Some types of partition table such as AIX partition table are used by
> proprietary systems. The open-source disk tools such as fdisk and parted
> can not handle these partition tables. There is no obvious way to get
> extended partition until those proprietary partition tables are
> supported by Linux officially.
>
> In this patch we treate unsupported partiton table as if it does not
> contain extended partition.
>
> bug-url: https://bugzilla.redhat.com/show_bug.cgi?id=566722
>
> Signed-off-by: Zhou Zheng Sheng <zhshzhou at linux.vnet.ibm.com>
> ---
> src/kimchi/disks.py | 10 +++++++++-
> 1 file changed, 9 insertions(+), 1 deletion(-)
>
> diff --git a/src/kimchi/disks.py b/src/kimchi/disks.py
> index 5f004b3..842fd48 100644
> --- a/src/kimchi/disks.py
> +++ b/src/kimchi/disks.py
> @@ -97,7 +97,15 @@ def _is_dev_extended_partition(devType, devNodePath):
> return False
> diskPath = devNodePath.rstrip('0123456789')
> device = PDevice(diskPath)
> - extended_part = PDisk(device).getExtendedPartition()
> + try:
> + extended_part = PDisk(device).getExtendedPartition()
> + except NotImplementedError as e:
> + kimchi_log.warning(
> + "Error getting extended partition info for dev %s type %s: %s",
> + devNodePath, devType, e.message)
> + # Treate disk with unsupported partiton table as if it does not
> + # contain extended partitions.
> + return False
> if extended_part and extended_part.path == devNodePath:
> return True
> return False
More information about the Kimchi-devel
mailing list