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

vm creation is failing on vsanDatastore #836

Closed
shaominchen opened this issue Dec 22, 2016 · 4 comments
Closed

vm creation is failing on vsanDatastore #836

shaominchen opened this issue Dec 22, 2016 · 4 comments

Comments

@shaominchen
Copy link
Contributor

I have a VSAN setup where there's only one single vsanDatastore. I tried to run test-esx in this environment and some test cases failed:

Running unit tests in /tmp/vmdk_ops_unittest15141/vmdk_ops_test.py...
..E.........EEE.

ERROR: testAttachDetach (main.VmdkAttachDetachTestCase)

Traceback (most recent call last):
File "/tmp/vmdk_ops_unittest15141/vmdk_ops_test.py", line 482, in setUp
datastore=self.datastore_name)
File "/tmp/vmdk_ops_unittest15141/vmdk_ops_test.py", line 420, in create_vm
vmdk_ops.wait_for_tasks(si, [task])
File "/tmp/vmdk_ops_unittest15141/vmdk_ops.py", line 1497, in wait_for_tasks
raise task.info.error
vim.fault.FileNotFound: (vim.fault.FileNotFound) {
dynamicType = ,
dynamicProperty = (vmodl.DynamicProperty) [],
msg = 'File was not found',
faultCause = ,
faultMessage = (vmodl.LocalizableMessage) [
(vmodl.LocalizableMessage) {
dynamicType = ,
dynamicProperty = (vmodl.DynamicProperty) [],
key = 'com.vmware.esx.hostctl.default',
arg = (vmodl.KeyAnyValue) [
(vmodl.KeyAnyValue) {
dynamicType = ,
dynamicProperty = (vmodl.DynamicProperty) [],
key = 'reason',
value = 'Could not get ObjectStoreFileSystem for /vmfs/volumes/vsan:52b2067d4d8fa677-de50f4c784493a59/test-vm/test-vm (File Not Found)'
}
],
message = 'Operation failed, diagnostics report: Could not get ObjectStoreFileSystem for /vmfs/volumes/vsan:52b2067d4d8fa677-de50f4c784493a59/test-vm/test-vm (File Not Found)'
}
],
file = ''
}

======================================================================
ERROR: test_vmdkops_on_default_tenant_vm (main.VmdkTenantTestCase)
Test vmdk life cycle on a VM which belongs to DEFAULT tenant
This operation may take a while. Please be patient.
This operation may take a while. Please be patient.

Traceback (most recent call last):
File "/tmp/vmdk_ops_unittest15141/vmdk_ops_test.py", line 746, in setUp
datastore=self.datastore_name)
File "/tmp/vmdk_ops_unittest15141/vmdk_ops_test.py", line 420, in create_vm
vmdk_ops.wait_for_tasks(si, [task])
File "/tmp/vmdk_ops_unittest15141/vmdk_ops.py", line 1497, in wait_for_tasks
raise task.info.error
vim.fault.FileNotFound: (vim.fault.FileNotFound) {
dynamicType = ,
dynamicProperty = (vmodl.DynamicProperty) [],
msg = 'File was not found',
faultCause = ,
faultMessage = (vmodl.LocalizableMessage) [
(vmodl.LocalizableMessage) {
dynamicType = ,
dynamicProperty = (vmodl.DynamicProperty) [],
key = 'com.vmware.esx.hostctl.default',
arg = (vmodl.KeyAnyValue) [
(vmodl.KeyAnyValue) {
dynamicType = ,
dynamicProperty = (vmodl.DynamicProperty) [],
key = 'reason',
value = 'Could not get ObjectStoreFileSystem for /vmfs/volumes/vsan:52b2067d4d8fa677-de50f4c784493a59/test_vm1/test_vm1 (File Not Found)'
}
],
message = 'Operation failed, diagnostics report: Could not get ObjectStoreFileSystem for /vmfs/volumes/vsan:52b2067d4d8fa677-de50f4c784493a59/test_vm1/test_vm1 (File Not Found)'
}
],
file = ''
}

======================================================================
ERROR: test_vmdkops_on_different_tenants (main.VmdkTenantTestCase)
Test vmdkops on VMs which belong to different tenant

Traceback (most recent call last):
File "/tmp/vmdk_ops_unittest15141/vmdk_ops_test.py", line 746, in setUp
datastore=self.datastore_name)
File "/tmp/vmdk_ops_unittest15141/vmdk_ops_test.py", line 420, in create_vm
vmdk_ops.wait_for_tasks(si, [task])
File "/tmp/vmdk_ops_unittest15141/vmdk_ops.py", line 1497, in wait_for_tasks
raise task.info.error
vim.fault.FileNotFound: (vim.fault.FileNotFound) {
dynamicType = ,
dynamicProperty = (vmodl.DynamicProperty) [],
msg = 'File was not found',
faultCause = ,
faultMessage = (vmodl.LocalizableMessage) [
(vmodl.LocalizableMessage) {
dynamicType = ,
dynamicProperty = (vmodl.DynamicProperty) [],
key = 'com.vmware.esx.hostctl.default',
arg = (vmodl.KeyAnyValue) [
(vmodl.KeyAnyValue) {
dynamicType = ,
dynamicProperty = (vmodl.DynamicProperty) [],
key = 'reason',
value = 'Could not get ObjectStoreFileSystem for /vmfs/volumes/vsan:52b2067d4d8fa677-de50f4c784493a59/test_vm1/test_vm1 (File Not Found)'
}
],
message = 'Operation failed, diagnostics report: Could not get ObjectStoreFileSystem for /vmfs/volumes/vsan:52b2067d4d8fa677-de50f4c784493a59/test_vm1/test_vm1 (File Not Found)'
}
],
file = ''
}

======================================================================
ERROR: test_vmdkops_on_tenant_vm (main.VmdkTenantTestCase)
Test vmdk life cycle on a VM which belongs to a tenant

Traceback (most recent call last):
File "/tmp/vmdk_ops_unittest15141/vmdk_ops_test.py", line 746, in setUp
datastore=self.datastore_name)
File "/tmp/vmdk_ops_unittest15141/vmdk_ops_test.py", line 420, in create_vm
vmdk_ops.wait_for_tasks(si, [task])
File "/tmp/vmdk_ops_unittest15141/vmdk_ops.py", line 1497, in wait_for_tasks
raise task.info.error
vim.fault.FileNotFound: (vim.fault.FileNotFound) {
dynamicType = ,
dynamicProperty = (vmodl.DynamicProperty) [],
msg = 'File was not found',
faultCause = ,
faultMessage = (vmodl.LocalizableMessage) [
(vmodl.LocalizableMessage) {
dynamicType = ,
dynamicProperty = (vmodl.DynamicProperty) [],
key = 'com.vmware.esx.hostctl.default',
arg = (vmodl.KeyAnyValue) [
(vmodl.KeyAnyValue) {
dynamicType = ,
dynamicProperty = (vmodl.DynamicProperty) [],
key = 'reason',
value = 'Could not get ObjectStoreFileSystem for /vmfs/volumes/vsan:52b2067d4d8fa677-de50f4c784493a59/test_vm1/test_vm1 (File Not Found)'
}
],
message = 'Operation failed, diagnostics report: Could not get ObjectStoreFileSystem for /vmfs/volumes/vsan:52b2067d4d8fa677-de50f4c784493a59/test_vm1/test_vm1 (File Not Found)'
}
],
file = ''
}


Ran 16 tests in 30.362s

FAILED (errors=4)

......

Running unit tests in /tmp/vmdk_ops_unittest15141/vsan_policy_test.py...

...INFO:Delete_nonexistent_policy:
This is a negative test to delete a non-existent vsan policy.
Test is expected to raise exception log - Failed to remove the policy file error.

ERROR:root:Failed to remove test_policy policy file
Traceback (most recent call last):
File "/tmp/vmdk_ops_unittest15141/vsan_policy.py", line 209, in delete
os.remove(policy_path(name))
OSError: [Errno 2] No such file or directory: '/vmfs/volumes/vsanDatastore/dockvols/policies/test_policy'
..

Ran 5 tests in 1.109s

Ritesh also helped to take a look. For the first 4 failures, it looks like our create_vm() test code is calling some API which is not applicable to vsanDatastore. Last test_policy seems a different issue.

Anyway, our test suite should support VSAN datastore.

@shuklanirdesh82
Copy link
Contributor

shuklanirdesh82 commented Dec 22, 2016

@shaominchen can you please share vc/esx IP to take a look? I have run tests recently and the same 4 tests are failing with other reason and raised the issue #832

Last test_policy seems a different issue.

the last failure is negative test case and it is just logging the error message in fact test has passed.

@shaominchen
Copy link
Contributor Author

@shuklanirdesh82 Here is my VC (10.160.179.66) and here is one of my ESX hosts: 10.160.188.18

@shuklanirdesh82 shuklanirdesh82 changed the title Some test-esx test cases failed on vsanDatastore vm creation is failing on vsanDatastore Dec 22, 2016
@msterin
Copy link
Contributor

msterin commented Dec 22, 2016

The log says

value = 'Could not get ObjectStoreFileSystem for /vmfs/volumes/vsan:52b2067d4d8fa677-de50f4c784493a59/test_vm1/test_vm1 (File Not Found)'
}

And /vmfs/volumes/vsan:52b2067d4d8fa677-de50f4c784493a59/test_vm1/test_vm1 is NOT SUPPOSED to be OSFS file system. It is a regular directory under /vmfs/volumes/vsan:52b2067d4d8fa677-de50f4c784493a59/test_vm OSFS file system.

Something is broken in test directory names generation

shuklanirdesh82 added a commit to shuklanirdesh82/vsphere-storage-for-docker that referenced this issue Dec 22, 2016
shuklanirdesh82 added a commit to shuklanirdesh82/vsphere-storage-for-docker that referenced this issue Dec 22, 2016
…anDatastore"

Addressing Mark's comment (renaming method parameter to more meaningful name)
shuklanirdesh82 added a commit to shuklanirdesh82/vsphere-storage-for-docker that referenced this issue Dec 22, 2016
…anDatastore"

Addressing Mark's comment (renaming method parameter to more meaningful name)

Correcting the lint errors
@shuklanirdesh82 shuklanirdesh82 self-assigned this Dec 22, 2016
shuklanirdesh82 added a commit that referenced this issue Dec 23, 2016
…839)

* Supplying a fix for "#836: vm creation is failing on vsanDatastore"

Addressing Mark's comment (renaming method parameter to more meaningful name)

Correcting the lint errors

* Addressing Mark's comment to use more meaningful name to improve readability
@shuklanirdesh82
Copy link
Contributor

changes are merged (see #839) so closing this one.

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

No branches or pull requests

3 participants