Failed to mount a shared EVS disk when interconnecting to VMware

Latest reply: Jan 20, 2020 07:58:10 59 1 1 0

Hey there! This is a case about failing to mount a share EVS disk when interconnect to VMware.

Problem Description

Shared EVS disks failed to be mounted due to a computing plug-in Defect in the VM Interconnection scenario, the detail information is as follows:

 155017tbw12bit4w6ruzti.png

155030vwwew88yh38e23id.png


Problem Analysis

1.     The nova-compute reports an error indicating that four SCSI controllers have been used up.

155049mrc7o4c7m75roze1.png


155058yglfvlgfccd684dv.png

 155110qzk1ym1b6b6zm5jm.png


155121nwmeddmrqbyg4d5t.png

2.     Confirm that the disk bus model used by VMware is SCSI.     

155134kwszjnj2f58n8bbs.png

155151tzl8q99q7qkl99f9.png

3.     The core code is analyzed as follows:

def allocate_controller_key_and_unit_number(client_factory, devices,

                                            adapter_type, is_shared=False):

    """This function inspects the current set of hardware devices and returns

    controller_key and unit_number that can be used for attaching a new virtual

    disk to adapter with the given adapter_type.

    """

    if devices.__class__.__name__ == "ArrayOfVirtualDevice":

        devices = devices.VirtualDevice

# Traverse devices,

(1). If the device has controller key and unit number, the dictionary {device.controllerKey: [device.unitNumber]} is generated.

(2). If the device is a SCSI controller

(['VirtualLsiLogicController', 'VirtualLsiLogicSASController', 'VirtualBusLogicController', 'ParaVirtualSCSIController'])

In this case, add the dictionary {device.key: [device.scsiCtlrUnitNumber]} on the basis of (1). #

    taken = vm_util._find_allocated_slots(devices)

    ret = None

    controller_slot = None

    unit_number = None

    if adapter_type == constants.ADAPTER_TYPE_IDE:

        .... ....

    elif adapter_type in [constants.DEFAULT_ADAPTER_TYPE,

                          constants.ADAPTER_TYPE_LSILOGICSAS,

                          constants.ADAPTER_TYPE_BUSLOGIC,

                          constants.ADAPTER_TYPE_PARAVIRTUAL]:

 

# For non-shared volumes and non-shared controllers || Shared volumes and shared controllers, filter out all SCSI controllers, obtain keys, and form a list. #

 

        scsi_keys = [dev.key for dev in devices if

                     vm_util._is_scsi_controller(dev) and not (

                         is_shared ^ _is_shared_controller(dev))]  

# The shared controller checks whether the device contains the sharedBus attribute and the value is physicalSharing.

Traverse scsi_keys based on the used device information and used SCSI controller key. Each key supports 15 devices (unit). A message is returned as long as an available unit is found. #

        controller_slot = vm_util._find_controller_slot(scsi_keys, taken, 16)

        if controller_slot:controller_slot[0]

            unit_number = controller_slot[1]

        if is_shared:

            scsi_keys = [dev.key for dev in devices if

                         vm_util._is_scsi_controller(dev) and

                         (is_shared & _is_shared_controller(dev))]

            controller_slot = vm_util._find_controller_slot(scsi_keys, taken,

                                                            16)

            if controller_slot:

                unit_number = controller_slot[1]

    if ret:

        return ret[0], ret[1], None

    elif controller_slot and unit_number:

        return controller_slot[0], unit_number, None

 

# If there is still no idle unit based on the existing SCSI controllers and used devices, create no more than four SCSI controllers. #

    controller_key = -101

    bus_number = 0

if adapter_type in constants.SCSI_ADAPTER_TYPES:

   bus_number = _get_bus_number_for_scsi_controller(devices)

 # When creating a shared SCSI controller, set virtual_controller.sharedBus = "physicalSharing".

Non-shared: virtual_controller.sharedBus = "noSharing" #

    controller_spec = create_controller_spec(client_factory, controller_key,

                                             adapter_type, is_shared,

                                             bus_number)

 

    if is_shared and unit_number:

        return controller_key, unit_number, controller_spec

    return controller_key, 0, controller_spec

 

4.     Check the information about all devices. The information about the core SCSI controller is as follows:

154503qivvvmmn8v8ietvn.png


   154504woeploo0ce64c7n6.png

     http://image.huawei.com/tiny-lts/v1/images/2d6b6266dc6936fd8a05_447x334.png@900-0-90-f.png

     http://image.huawei.com/tiny-lts/v1/images/28ef7266dc69387d283b_444x332.png@900-0-90-f.png

     http://image.huawei.com/tiny-lts/v1/images/4c1e2266dc6939e16526_467x333.png@900-0-90-f.png

 


5.     The VMware VM has only two disks and four SCSI controllers, among which three controllers are shared. Each controller can be attached with 15 disks. Therefore, the VMware is normal. The computing plug-in code needs to be checked.

Add the following log information:

http://image.huawei.com/tiny-lts/v1/images/17e05266dc693b9e982f_883x113.jpg@900-0-90-f.jpg

6.     Confirm that the plug-in has found a proper SCSI controller and idle slot, but the error persists

       http://image.huawei.com/tiny-lts/v1/images/266c4266dc693c56c52a_470x230.png@900-0-90-f.png

    The value type of unit_number is an integer. The value is 0 according to the log. This problem occurs when the value is determined in the elif.

         http://image.huawei.com/tiny-lts/v1/images/612d1266dc693d308c2c_152x79.png@900-0-90-f.png

7.     Check whether the community code is correct.

  http://image.huawei.com/tiny-lts/v1/images/8cd72266dc693ded3af0_507x382.png@900-0-90-f.png

  

Root Cause

 The VMware plug-in has an integer variable in the volume attaching process. The if statement is used to determine the low-level problem. In addition, the returned idle slot of the SCSI controller may be 0.

As a result, the plug-in considers that the SCSI controller slots are insufficient and applies for a new SCSI controller.


Solution

Add the condition that the number of idle controller slots may be 0 to the judgment statement

elif controller_slot and (unit_number or unit_number == 0)

 

Thanks!


  • x
  • convention:

olive.zhao
Admin Created Jan 20, 2020 07:58:10 Helpful(0) Helpful(0)

Thanks for your share!
  • x
  • convention:

Smile%20turned%2C%20with%20the%20back%20to%20let%20the%20story%20end

Comment

You need to log in to reply to the post Login | Register

Notice Notice: To protect the legitimate rights and interests of you, the community, and third parties, do not release content that may bring legal risks to all parties, including but are not limited to the following:
  • Politically sensitive content
  • Content concerning pornography, gambling, and drug abuse
  • Content that may disclose or infringe upon others ' commercial secrets, intellectual properties, including trade marks, copyrights, and patents, and personal privacy
Do not share your account and password with others. All operations performed using your account will be regarded as your own actions and all consequences arising therefrom will be borne by you. For details, see " Privacy."
If the attachment button is not available, update the Adobe Flash Player to the latest version!
Login and enjoy all the member benefits

Login and enjoy all the member benefits

Login