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

Creating volume failed on PhotonOS #614

Closed
pdhamdhere opened this issue Oct 6, 2016 · 5 comments
Closed

Creating volume failed on PhotonOS #614

pdhamdhere opened this issue Oct 6, 2016 · 5 comments
Assignees
Milestone

Comments

@pdhamdhere
Copy link
Contributor

ESX: VMware ESXi 6.0.0 build-3620759
VM: Photon (photon-custom-hw11-1.0-13c08b6-GA.ova)
DVD Release: 0.7
Docker version: Server Version: 1.11.0

docker volume create -d vmdk --name=v1
Error response from daemon: create v1: Post http://%2Frun%2Fdocker%2Fplugins%2Fvmdk.sock/VolumeDriver.Create: http: ContentLength=24 with Body length 0

ESX Log:

10/06/16 20:47:28 92462 [P1] [INFO   ] *** createVMDK: /vmfs/volumes/Storage1/dockvols/v1.vmdk opts = {u'fstype': u'ext4'}
10/06/16 20:47:29 92462 [P1] [INFO   ] executeRequest 'create' completed with ret=None
10/06/16 20:47:29 92462 [P1] [WARNING] Failed to find VM by uuid=564dabc0-da80-2e80-1174-d92d69585cc4, retrying...
[Errno 104] Connection reset by peer
10/06/16 20:47:30 92462 [P1] [INFO   ] Found VM name=P1, id=564dabc0-da80-2e80-1174-d92d69585cc4
10/06/16 20:47:30 92462 [P1] [INFO   ] *** attachVMDK: /vmfs/volumes/Storage1/dockvols/v1.vmdk to P1 VM uuid = 564dabc0-da80-2e80-1174-d92d69585cc4
10/06/16 20:47:30 92462 [P1] [INFO   ] Attaching /vmfs/volumes/Storage1/dockvols/v1.vmdk as independent_persistent
10/06/16 20:47:30 92462 [P1] [INFO   ] Adding a PVSCSI controller
10/06/16 20:47:32 92462 [P1] [INFO   ] Added a PVSCSI controller, controller_key=1001 pci_slot_number=192
10/06/16 20:47:33 92462 [P1] [INFO   ] Disk /vmfs/volumes/Storage1/dockvols/v1.vmdk successfully attached. controller pci_slot_number=192, disk_slot=0
10/06/16 20:47:33 92462 [P1] [INFO   ] executeRequest 'attach' completed with ret={'ControllerPciSlotNumber': '192', 'Unit': '0'}
10/06/16 20:47:33 92462 [P1] [INFO   ] *** detachVMDK: /vmfs/volumes/Storage1/dockvols/v1.vmdk from P1 VM uuid = 564dabc0-da80-2e80-1174-d92d69585cc4
10/06/16 20:47:33 92462 [P1] [INFO   ] Disk detached /vmfs/volumes/Storage1/dockvols/v1.vmdk
10/06/16 20:47:33 92462 [P1] [INFO   ] executeRequest 'detach' completed with ret=None
10/06/16 20:47:33 92462 [P1] [INFO   ] *** removeVMDK: /vmfs/volumes/Storage1/dockvols/v1.vmdk
10/06/16 20:47:34 92462 [P1] [INFO   ] executeRequest 'remove' completed with ret=None

Plugin log:

2016-10-06 20:47:29.594555275 +0000 UTC [INFO] Attaching volume and creating filesystem fstype=ext4 name=v1
2016-10-06 20:47:32.496573328 +0000 UTC [WARNING] Get device path failed for unit# %s @ PCI slot %s: 0192Error="open /sys/bus/pci/slots/192/address: no such file or directory"
2016-10-06 20:47:32.498475429 +0000 UTC [ERROR] Could not find attached device, removing the volume error="Device not found" name=v1
@govint
Copy link
Contributor

govint commented Oct 7, 2016

Issue is different Linux OS versions support different ways of identifying the devices on the PCI bus (in the /sys/bus/ hierarchy). I'll have to check Photon OS and will need to add in alternatives if one approach doesn't apply.

@govint govint added this to the v1 GA milestone Oct 7, 2016
@govint
Copy link
Contributor

govint commented Oct 7, 2016

Looked at the VM, scsi0 is itself a pvscsi controller. Why did the plugin server try adding a pvscsi controller at scsi1? The vmx for P1 has pci slot number for scsi1 set to -1. And the Photon guest has no device except scsi0:0. Curiouser and curiouser.....

@pdhamdhere
Copy link
Contributor Author

Be default Photon OS has LSILogic. I changed it to pvscsi to see if it helps but no luck.
BTW, I had used same OVA for VMworld demo and that worked.

@govint
Copy link
Contributor

govint commented Oct 13, 2016

Per issue 541 on Photon the below commands help fix the issue:

tdnf install linux

Upgrading:
linux x86_64 4.4.8-11.ph1 44.60 M

Total installed size: 44.60 M
Is this ok [y/N]:y

Downloading:
linux 18821367 100%
Testing transaction
Running transaction

Complete!

Am able to run a container with a vmdk volume:

docker run --rm -it -w /data -v v12:/data busybox sh

Unable to find image 'busybox:latest' locally
latest: Pulling from library/busybox

56bec22e3559: Pull complete
Digest: sha256:29f5d56d12684887bdfa50dcd29fc31eea4aaf4ad3bec43daf19026a7ce69912
Status: Downloaded newer image for busybox:latest
/data #

And /proc/mounts shows this:

/dev/disk/by-path/pci-0000:0b:00.0-scsi-0:0:1:0 /mnt/vmdk/v12 ext4 rw,relatime,data=ordered 0 0

Closing with no changes as this is a Photon specific issue. Photon 1.0 is said to have fixed this issue.

@kerneltime
Copy link
Contributor

vmware/photon#541

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

No branches or pull requests

3 participants