Skip to content
This repository has been archived by the owner on Nov 9, 2020. It is now read-only.

Support identifying controllers on secondary PCI buses. #1978

Merged
merged 2 commits into from
Nov 9, 2017

Conversation

govint
Copy link
Contributor

@govint govint commented Nov 7, 2017

Modified the steps to identify the attached device on the client plugin and hence also passing the bus number vs. the PCI slot number. The PCI slot number handles devices on the secondary PCI bus already but doesn't handle devices on non-zero functions of the PCI bridge device.

The change is to identify the PCI bridge behind which the PVSCSI controller is located (per https://kb.vmware.com/s/article/2047927) and pass that to the client.

The client uses the bridge number and find the devices on the PCI bus (secondary) of that PCI bridge. Given only a single device is present on the PCI bridge (the PVSCSI controller) we use that and generate the final disk path.

The server logs look like this,
11/07/17 07:56:40 14630789 [master-VM0.0-sharedVmfs-0._DEFAULT.pci-vol-3] [INFO ] *** disk_attach: VMDK /vmfs/volumes/sharedVmfs-0/dockvols/_DEFAULT/pci-vol-3.vmdk to VM 'master-VM0.0' , bios uuid = 564dc89b-af45-e984-dd7b-0daaf4b09b44, VC uuid=52a51794-7af6-31de-ecfa-860dcf56e686)
11/07/17 07:56:40 14630789 [master-VM0.0-sharedVmfs-0._DEFAULT.pci-vol-3] [INFO ] Found vm name='master-VM0.0'
11/07/17 07:56:40 14630789 [master-VM0.0-sharedVmfs-0._DEFAULT.pci-vol-3] [INFO ] Attaching /vmfs/volumes/sharedVmfs-0/dockvols/_DEFAULT/pci-vol-3.vmdk as independent_persistent
11/07/17 07:56:41 14630789 [master-VM0.0-sharedVmfs-0._DEFAULT.pci-vol-3] [INFO ] Disk /vmfs/volumes/sharedVmfs-0/dockvols/_DEFAULT/pci-vol-3.vmdk successfully attached. controller pci_slot_number=15.0, disk_slot=0
11/07/17 07:56:41 14630789 [master-VM0.0-sharedVmfs-0._DEFAULT.pci-vol-3] [INFO ] executeRequest 'attach' completed with ret={'Unit': '0', 'ControllerPciSlotNumber': '15.0'} <------- the bridge as the client would see it (this is typically PCI bridge 1 in the VM config at a PCI slot number of 21).

Testing: Verified create, attach, re-attach, inspect workflows with the change.

Copy link
Contributor

@shuklanirdesh82 shuklanirdesh82 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants