You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@deltacloud.apache.org by "Jan Provaznik (JIRA)" <ji...@apache.org> on 2012/10/05 09:44:47 UTC

[jira] [Created] (DTACLOUD-334) vsphere instance is not created on server and no error is reported

Jan Provaznik created DTACLOUD-334:
--------------------------------------

             Summary: vsphere instance is not created on server and no error is reported
                 Key: DTACLOUD-334
                 URL: https://issues.apache.org/jira/browse/DTACLOUD-334
             Project: DeltaCloud
          Issue Type: Bug
          Components: Server
         Environment: dc-core 0.5.x
            Reporter: Jan Provaznik


If I create a vsphere instance, it seems to be created properly (based on dc-core response), but actually the instance is not created on vsphere side:
irb(main):009:0> i = c.create_instance({:hwp_storage=>nil, :hwp_id=>"default", :image_id=>"factory-image-1377d19c-d46a-432f-91c6-cc6b83c1fa14", :keyname=>nil, :hwp_memory=>512, :name=>"jprovazn06-rhel62-vsphere", :hwp_cpu=>1})
=> #<DeltaCloud::API::Stateful::Instance:0x7f72f59dd450 @actions=[], @url="http://localhost:3002/api/instances/jprovazn06-rhel62-vsphere", @base_name="instance", @client=#<DeltaCloud::API:0x7f72f4f9cf68 @password="R3dhat!", @api_uri=#<URI::HTTP:0x7f72f4fb6b48 URL:http://localhost:3002/api>, @verbose=false, @api_version="0.5.0", @api_provider="10.16.120.224", @entry_points={:drivers=>"http://localhost:3002/api/drivers", :storage_snapshots=>"http://localhost:3002/api/storage_snapshots", :instances=>"http://localhost:3002/api/instances", :hardware_profiles=>"http://localhost:3002/api/hardware_profiles", :images=>"http://localhost:3002/api/images", :instance_states=>"http://localhost:3002/api/instance_states", :realms=>"http://localhost:3002/api/realms", :storage_volumes=>"http://localhost:3002/api/storage_volumes"}, @username="Administrator", @driver_name="vsphere", @api_driver="vsphere", @features={:instances=>[:user_iso, :user_data, :user_name]}>, @state="PENDING", @action_urls=[], @objects=[{:type=>:state, :state=>"STOPPED", :method_name=>"stopped?"}, {:type=>:state, :state=>"RUNNING", :method_name=>"running?"}, {:type=>:state, :state=>"PENDING", :method_name=>"pending?"}, {:type=>:state, :state=>"SHUTTING_DOWN", :method_name=>"shutting_down?"}, {:type=>:text, :value=>"jprovazn06-rhel62-vsphere", :method_name=>"name"}, {:type=>:text, :value=>"Administrator", :method_name=>"owner_id"}, {:type=>:link, :id=>"factory-image-1377d19c-d46a-432f-91c6-cc6b83c1fa14", :method_name=>"image"}, {:type=>:text, :value=>"factory-image-1377d19c-d46a-432f-91c6-cc6b83c1fa14", :method_name=>"image_id"}, {:type=>:link, :id=>"datastore1", :method_name=>"realm"}, {:type=>:text, :value=>"datastore1", :method_name=>"realm_id"}, {:type=>:text, :value=>"PENDING", :method_name=>"state"}, {:type=>:link, :id=>"default", :method_name=>"hardware_profile"}, {:type=>:text, :value=>"default", :method_name=>"hardware_profile_id"}, {:type=>:collection, :values=>[], :method_name=>"public_addresses"}, {:type=>:collection, :values=>[], :method_name=>"private_addresses"}], @id="jprovazn06-rhel62-vsphere">
irb(main):010:0> c.instance(i.id)
=> nil
irb(main):011:0> 

dc-core log:
>> Thin web server (v1.2.11 codename Bat-Shit Crazy)
>> Debugging ON
>> Maximum connections set to 1024
>> Listening on localhost:3002, CTRL+C to stop

Processing /api/instances (for 127.0.0.1 at Fri Oct 05 03:05:04 -0400 2012) [POST] [VSphere]
Parameters: {"name"=>"jprovazn06-rhel62-vsphere", "keyname"=>"", "image_id"=>"factory-image-1377d19c-d46a-432f-91c6-cc6b83c1fa14", "hwp_id"=>"default", "hwp_storage"=>"", "hwp_memory"=>"512", "hwp_cpu"=>"1"}
Provider: 10.16.120.224
Authentication: Basic
Server: thin 1.2.11 codename Bat-Shit Crazy
Accept: application/xml


Completed in 0.000000 | 0.000000 | 201 | application/xml | http://localhost:3002/api/instances

Processing /api/instances/jprovazn06-rhel62-vsphere (for 127.0.0.1 at Fri Oct 05 03:05:12 -0400 2012) [GET] [VSphere]
Parameters: {}
Provider: 10.16.120.224
Authentication: Basic
Server: thin 1.2.11 codename Bat-Shit Crazy
Accept: application/xml


Completed in 1.504222 | 0.000000 | 404 | application/xml | http://localhost:3002/api/instances/jprovazn06-rhel62-vsphere


On vsphere server is a cert error in log:
**********2012-10-05T05:12:56.984-04:00 [03000 info 'Default' opID=ceaafc5e] [VpxLRO] -- FINISH task-internal-615740 --  -- vim.LicenseManager.GetLicenseAssignmentManager -- 52feed73-3377-7f01-7421-1f7d58e08338(52148f9c-ca66-faaf-b784-a111d2c2198b)

2012-10-05T05:12:56.984-04:00 [03000 verbose 'Default'] [VpxLRO::ClearCurrentMain] Clearing _currentMain

2012-10-05T05:12:56.984-04:00 [02300 verbose 'ProxySvc Req69512'] New proxy client TCPStreamWin32(socket=TCP(fd=3544) local=127.0.0.1:80,  peer=127.0.0.1:58573)

2012-10-05T05:12:56.984-04:00 [01804 warning 'Libs'] Encountered other certificate error: 27

2012-10-05T05:12:56.984-04:00 [01804 warning 'Libs'] Encountered other certificate error: 27

2012-10-05T05:12:57.000-04:00 [03792 verbose 'SSL SoapAdapter.HTTPService'] User agent is 'VMware vim-java 1.0'

2012-10-05T05:12:57.000-04:00 [03792 verbose 'Default'] [VpxVmomi] Invoking [queryAssignedLicenses] on [vim.LicenseAssignmentManager:LicenseAssignmentManager] session [52feed73-3377-7f01-7421-1f7d58e08338(52148f9c-ca66-faaf-b784-a111d2c2198b)]

2012-10-05T05:12:57.000-04:00 [03792 verbose 'Default'] [VpxLroList::ThreadMainEntry] Unlocked _propProvider to call into external code

2012-10-05T05:12:57.000-04:00 [03792 verbose 'Default'] [VpxLRO::LroMain] Invoking _currentMain

2012-10-05T05:12:57.000-04:00 [03792 info 'Default' opID=c7b77a5b] [VpxLRO] -- BEGIN task-internal-615741 --  -- vim.LicenseAssignmentManager.queryAssignedLicenses -- 52feed73-3377-7f01-7421-1f7d58e08338(52148f9c-ca66-faaf-b784-a111d2c2198b)

2012-10-05T05:12:57.015-04:00 [03792 verbose 'Default' opID=c7b77a5b] [VpxVmomi] Invoke done: vim.LicenseAssignmentManager.queryAssignedLicenses session: 52feed73-3377-7f01-7421-1f7d58e08338

2012-10-05T05:12:57.031-04:00 [03792 verbose 'SSL SoapAdapter.HTTPService' opID=c7b77a5b] HTTP Response: Complete (processed 7666 bytes)

2012-10-05T05:12:57.031-04:00 [03792 info 'Default' opID=c7b77a5b] [VpxLRO] -- FINISH task-internal-615741 --  -- vim.LicenseAssignmentManager.queryAssignedLicenses -- 52feed73-3377-7f01-7421-1f7d58e08338(52148f9c-ca66-faaf-b784-a111d2c2198b)

2012-10-05T05:12:57.031-04:00 [03792 verbose 'Default'] [VpxLRO::ClearCurrentMain] Clearing _currentMain

2012-10-05T05:12:57.031-04:00 [02300 verbose 'ProxySvc Req69513'] New proxy client TCPStreamWin32(socket=TCP(fd=5020) local=127.0.0.1:80,  peer=127.0.0.1:58575)

2012-10-05T05:12:57.031-04:00 [01804 warning 'Libs'] Encountered other certificate error: 27

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (DTACLOUD-334) vsphere instance is not created on server and no error is reported

Posted by "Jan Provaznik (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DTACLOUD-334?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jan Provaznik updated DTACLOUD-334:
-----------------------------------

    Description: 
If I create a vsphere instance, it seems to be created properly (based on dc-core response), but actually the instance is not created on vsphere side:
irb(main):009:0> i = c.create_instance({:hwp_storage=>nil, :hwp_id=>"default", :image_id=>"factory-image-1377d19c-d46a-432f-91c6-cc6b83c1fa14", :keyname=>nil, :hwp_memory=>512, :name=>"jprovazn06-rhel62-vsphere", :hwp_cpu=>1})
=> #<DeltaCloud::API::Stateful::Instance:0x7f72f59dd450 @actions=[], @url="http://localhost:3002/api/instances/jprovazn06-rhel62-vsphere", @base_name="instance", @client=#<DeltaCloud::API:0x7f72f4f9cf68 @password="R3dhat!", @api_uri=#<URI::HTTP:0x7f72f4fb6b48 URL:http://localhost:3002/api>, @verbose=false, @api_version="0.5.0", @api_provider="10.16.120.224", @entry_points={:drivers=>"http://localhost:3002/api/drivers", :storage_snapshots=>"http://localhost:3002/api/storage_snapshots", :instances=>"http://localhost:3002/api/instances", :hardware_profiles=>"http://localhost:3002/api/hardware_profiles", :images=>"http://localhost:3002/api/images", :instance_states=>"http://localhost:3002/api/instance_states", :realms=>"http://localhost:3002/api/realms", :storage_volumes=>"http://localhost:3002/api/storage_volumes"}, @username="Administrator", @driver_name="vsphere", @api_driver="vsphere", @features={:instances=>[:user_iso, :user_data, :user_name]}>, @state="PENDING", @action_urls=[], @objects=[{:type=>:state, :state=>"STOPPED", :method_name=>"stopped?"}, {:type=>:state, :state=>"RUNNING", :method_name=>"running?"}, {:type=>:state, :state=>"PENDING", :method_name=>"pending?"}, {:type=>:state, :state=>"SHUTTING_DOWN", :method_name=>"shutting_down?"}, {:type=>:text, :value=>"jprovazn06-rhel62-vsphere", :method_name=>"name"}, {:type=>:text, :value=>"Administrator", :method_name=>"owner_id"}, {:type=>:link, :id=>"factory-image-1377d19c-d46a-432f-91c6-cc6b83c1fa14", :method_name=>"image"}, {:type=>:text, :value=>"factory-image-1377d19c-d46a-432f-91c6-cc6b83c1fa14", :method_name=>"image_id"}, {:type=>:link, :id=>"datastore1", :method_name=>"realm"}, {:type=>:text, :value=>"datastore1", :method_name=>"realm_id"}, {:type=>:text, :value=>"PENDING", :method_name=>"state"}, {:type=>:link, :id=>"default", :method_name=>"hardware_profile"}, {:type=>:text, :value=>"default", :method_name=>"hardware_profile_id"}, {:type=>:collection, :values=>[], :method_name=>"public_addresses"}, {:type=>:collection, :values=>[], :method_name=>"private_addresses"}], @id="jprovazn06-rhel62-vsphere">
irb(main):010:0> c.instance(i.id)
=> nil
irb(main):011:0> 

dc-core log:
>> Thin web server (v1.2.11 codename Bat-Shit Crazy)
>> Debugging ON
>> Maximum connections set to 1024
>> Listening on localhost:3002, CTRL+C to stop

Processing /api/instances (for 127.0.0.1 at Fri Oct 05 03:05:04 -0400 2012) [POST] [VSphere]
Parameters: {"name"=>"jprovazn06-rhel62-vsphere", "keyname"=>"", "image_id"=>"factory-image-1377d19c-d46a-432f-91c6-cc6b83c1fa14", "hwp_id"=>"default", "hwp_storage"=>"", "hwp_memory"=>"512", "hwp_cpu"=>"1"}
Provider: 10.16.120.224
Authentication: Basic
Server: thin 1.2.11 codename Bat-Shit Crazy
Accept: application/xml


Completed in 0.000000 | 0.000000 | 201 | application/xml | http://localhost:3002/api/instances

Processing /api/instances/jprovazn06-rhel62-vsphere (for 127.0.0.1 at Fri Oct 05 03:05:12 -0400 2012) [GET] [VSphere]
Parameters: {}
Provider: 10.16.120.224
Authentication: Basic
Server: thin 1.2.11 codename Bat-Shit Crazy
Accept: application/xml


Completed in 1.504222 | 0.000000 | 404 | application/xml | http://localhost:3002/api/instances/jprovazn06-rhel62-vsphere


On vsphere server is a cert error in log:
**********2012-10-05T05:12:56.984-04:00 [03000 info 'Default' opID=ceaafc5e] [VpxLRO] -- FINISH task-internal-615740 --  -- vim.LicenseManager.GetLicenseAssignmentManager -- 52feed73-3377-7f01-7421-1f7d58e08338(52148f9c-ca66-faaf-b784-a111d2c2198b)

2012-10-05T05:12:56.984-04:00 [03000 verbose 'Default'] [VpxLRO::ClearCurrentMain] Clearing _currentMain

2012-10-05T05:12:56.984-04:00 [02300 verbose 'ProxySvc Req69512'] New proxy client TCPStreamWin32(socket=TCP(fd=3544) local=127.0.0.1:80,  peer=127.0.0.1:58573)

2012-10-05T05:12:56.984-04:00 [01804 warning 'Libs'] Encountered other certificate error: 27

2012-10-05T05:12:56.984-04:00 [01804 warning 'Libs'] Encountered other certificate error: 27

2012-10-05T05:12:57.000-04:00 [03792 verbose 'SSL SoapAdapter.HTTPService'] User agent is 'VMware vim-java 1.0'

2012-10-05T05:12:57.000-04:00 [03792 verbose 'Default'] [VpxVmomi] Invoking [queryAssignedLicenses] on [vim.LicenseAssignmentManager:LicenseAssignmentManager] session [52feed73-3377-7f01-7421-1f7d58e08338(52148f9c-ca66-faaf-b784-a111d2c2198b)]

2012-10-05T05:12:57.000-04:00 [03792 verbose 'Default'] [VpxLroList::ThreadMainEntry] Unlocked _propProvider to call into external code

2012-10-05T05:12:57.000-04:00 [03792 verbose 'Default'] [VpxLRO::LroMain] Invoking _currentMain

2012-10-05T05:12:57.000-04:00 [03792 info 'Default' opID=c7b77a5b] [VpxLRO] -- BEGIN task-internal-615741 --  -- vim.LicenseAssignmentManager.queryAssignedLicenses -- 52feed73-3377-7f01-7421-1f7d58e08338(52148f9c-ca66-faaf-b784-a111d2c2198b)

2012-10-05T05:12:57.015-04:00 [03792 verbose 'Default' opID=c7b77a5b] [VpxVmomi] Invoke done: vim.LicenseAssignmentManager.queryAssignedLicenses session: 52feed73-3377-7f01-7421-1f7d58e08338

2012-10-05T05:12:57.031-04:00 [03792 verbose 'SSL SoapAdapter.HTTPService' opID=c7b77a5b] HTTP Response: Complete (processed 7666 bytes)

2012-10-05T05:12:57.031-04:00 [03792 info 'Default' opID=c7b77a5b] [VpxLRO] -- FINISH task-internal-615741 --  -- vim.LicenseAssignmentManager.queryAssignedLicenses -- 52feed73-3377-7f01-7421-1f7d58e08338(52148f9c-ca66-faaf-b784-a111d2c2198b)

2012-10-05T05:12:57.031-04:00 [03792 verbose 'Default'] [VpxLRO::ClearCurrentMain] Clearing _currentMain

2012-10-05T05:12:57.031-04:00 [02300 verbose 'ProxySvc Req69513'] New proxy client TCPStreamWin32(socket=TCP(fd=5020) local=127.0.0.1:80,  peer=127.0.0.1:58575)

2012-10-05T05:12:57.031-04:00 [01804 warning 'Libs'] Encountered other certificate error: 27


It would be nice if dc-core could check for such errors and report them back to client.

  was:
If I create a vsphere instance, it seems to be created properly (based on dc-core response), but actually the instance is not created on vsphere side:
irb(main):009:0> i = c.create_instance({:hwp_storage=>nil, :hwp_id=>"default", :image_id=>"factory-image-1377d19c-d46a-432f-91c6-cc6b83c1fa14", :keyname=>nil, :hwp_memory=>512, :name=>"jprovazn06-rhel62-vsphere", :hwp_cpu=>1})
=> #<DeltaCloud::API::Stateful::Instance:0x7f72f59dd450 @actions=[], @url="http://localhost:3002/api/instances/jprovazn06-rhel62-vsphere", @base_name="instance", @client=#<DeltaCloud::API:0x7f72f4f9cf68 @password="R3dhat!", @api_uri=#<URI::HTTP:0x7f72f4fb6b48 URL:http://localhost:3002/api>, @verbose=false, @api_version="0.5.0", @api_provider="10.16.120.224", @entry_points={:drivers=>"http://localhost:3002/api/drivers", :storage_snapshots=>"http://localhost:3002/api/storage_snapshots", :instances=>"http://localhost:3002/api/instances", :hardware_profiles=>"http://localhost:3002/api/hardware_profiles", :images=>"http://localhost:3002/api/images", :instance_states=>"http://localhost:3002/api/instance_states", :realms=>"http://localhost:3002/api/realms", :storage_volumes=>"http://localhost:3002/api/storage_volumes"}, @username="Administrator", @driver_name="vsphere", @api_driver="vsphere", @features={:instances=>[:user_iso, :user_data, :user_name]}>, @state="PENDING", @action_urls=[], @objects=[{:type=>:state, :state=>"STOPPED", :method_name=>"stopped?"}, {:type=>:state, :state=>"RUNNING", :method_name=>"running?"}, {:type=>:state, :state=>"PENDING", :method_name=>"pending?"}, {:type=>:state, :state=>"SHUTTING_DOWN", :method_name=>"shutting_down?"}, {:type=>:text, :value=>"jprovazn06-rhel62-vsphere", :method_name=>"name"}, {:type=>:text, :value=>"Administrator", :method_name=>"owner_id"}, {:type=>:link, :id=>"factory-image-1377d19c-d46a-432f-91c6-cc6b83c1fa14", :method_name=>"image"}, {:type=>:text, :value=>"factory-image-1377d19c-d46a-432f-91c6-cc6b83c1fa14", :method_name=>"image_id"}, {:type=>:link, :id=>"datastore1", :method_name=>"realm"}, {:type=>:text, :value=>"datastore1", :method_name=>"realm_id"}, {:type=>:text, :value=>"PENDING", :method_name=>"state"}, {:type=>:link, :id=>"default", :method_name=>"hardware_profile"}, {:type=>:text, :value=>"default", :method_name=>"hardware_profile_id"}, {:type=>:collection, :values=>[], :method_name=>"public_addresses"}, {:type=>:collection, :values=>[], :method_name=>"private_addresses"}], @id="jprovazn06-rhel62-vsphere">
irb(main):010:0> c.instance(i.id)
=> nil
irb(main):011:0> 

dc-core log:
>> Thin web server (v1.2.11 codename Bat-Shit Crazy)
>> Debugging ON
>> Maximum connections set to 1024
>> Listening on localhost:3002, CTRL+C to stop

Processing /api/instances (for 127.0.0.1 at Fri Oct 05 03:05:04 -0400 2012) [POST] [VSphere]
Parameters: {"name"=>"jprovazn06-rhel62-vsphere", "keyname"=>"", "image_id"=>"factory-image-1377d19c-d46a-432f-91c6-cc6b83c1fa14", "hwp_id"=>"default", "hwp_storage"=>"", "hwp_memory"=>"512", "hwp_cpu"=>"1"}
Provider: 10.16.120.224
Authentication: Basic
Server: thin 1.2.11 codename Bat-Shit Crazy
Accept: application/xml


Completed in 0.000000 | 0.000000 | 201 | application/xml | http://localhost:3002/api/instances

Processing /api/instances/jprovazn06-rhel62-vsphere (for 127.0.0.1 at Fri Oct 05 03:05:12 -0400 2012) [GET] [VSphere]
Parameters: {}
Provider: 10.16.120.224
Authentication: Basic
Server: thin 1.2.11 codename Bat-Shit Crazy
Accept: application/xml


Completed in 1.504222 | 0.000000 | 404 | application/xml | http://localhost:3002/api/instances/jprovazn06-rhel62-vsphere


On vsphere server is a cert error in log:
**********2012-10-05T05:12:56.984-04:00 [03000 info 'Default' opID=ceaafc5e] [VpxLRO] -- FINISH task-internal-615740 --  -- vim.LicenseManager.GetLicenseAssignmentManager -- 52feed73-3377-7f01-7421-1f7d58e08338(52148f9c-ca66-faaf-b784-a111d2c2198b)

2012-10-05T05:12:56.984-04:00 [03000 verbose 'Default'] [VpxLRO::ClearCurrentMain] Clearing _currentMain

2012-10-05T05:12:56.984-04:00 [02300 verbose 'ProxySvc Req69512'] New proxy client TCPStreamWin32(socket=TCP(fd=3544) local=127.0.0.1:80,  peer=127.0.0.1:58573)

2012-10-05T05:12:56.984-04:00 [01804 warning 'Libs'] Encountered other certificate error: 27

2012-10-05T05:12:56.984-04:00 [01804 warning 'Libs'] Encountered other certificate error: 27

2012-10-05T05:12:57.000-04:00 [03792 verbose 'SSL SoapAdapter.HTTPService'] User agent is 'VMware vim-java 1.0'

2012-10-05T05:12:57.000-04:00 [03792 verbose 'Default'] [VpxVmomi] Invoking [queryAssignedLicenses] on [vim.LicenseAssignmentManager:LicenseAssignmentManager] session [52feed73-3377-7f01-7421-1f7d58e08338(52148f9c-ca66-faaf-b784-a111d2c2198b)]

2012-10-05T05:12:57.000-04:00 [03792 verbose 'Default'] [VpxLroList::ThreadMainEntry] Unlocked _propProvider to call into external code

2012-10-05T05:12:57.000-04:00 [03792 verbose 'Default'] [VpxLRO::LroMain] Invoking _currentMain

2012-10-05T05:12:57.000-04:00 [03792 info 'Default' opID=c7b77a5b] [VpxLRO] -- BEGIN task-internal-615741 --  -- vim.LicenseAssignmentManager.queryAssignedLicenses -- 52feed73-3377-7f01-7421-1f7d58e08338(52148f9c-ca66-faaf-b784-a111d2c2198b)

2012-10-05T05:12:57.015-04:00 [03792 verbose 'Default' opID=c7b77a5b] [VpxVmomi] Invoke done: vim.LicenseAssignmentManager.queryAssignedLicenses session: 52feed73-3377-7f01-7421-1f7d58e08338

2012-10-05T05:12:57.031-04:00 [03792 verbose 'SSL SoapAdapter.HTTPService' opID=c7b77a5b] HTTP Response: Complete (processed 7666 bytes)

2012-10-05T05:12:57.031-04:00 [03792 info 'Default' opID=c7b77a5b] [VpxLRO] -- FINISH task-internal-615741 --  -- vim.LicenseAssignmentManager.queryAssignedLicenses -- 52feed73-3377-7f01-7421-1f7d58e08338(52148f9c-ca66-faaf-b784-a111d2c2198b)

2012-10-05T05:12:57.031-04:00 [03792 verbose 'Default'] [VpxLRO::ClearCurrentMain] Clearing _currentMain

2012-10-05T05:12:57.031-04:00 [02300 verbose 'ProxySvc Req69513'] New proxy client TCPStreamWin32(socket=TCP(fd=5020) local=127.0.0.1:80,  peer=127.0.0.1:58575)

2012-10-05T05:12:57.031-04:00 [01804 warning 'Libs'] Encountered other certificate error: 27

    
> vsphere instance is not created on server and no error is reported
> ------------------------------------------------------------------
>
>                 Key: DTACLOUD-334
>                 URL: https://issues.apache.org/jira/browse/DTACLOUD-334
>             Project: DeltaCloud
>          Issue Type: Bug
>          Components: Server
>         Environment: dc-core 0.5.x
>            Reporter: Jan Provaznik
>
> If I create a vsphere instance, it seems to be created properly (based on dc-core response), but actually the instance is not created on vsphere side:
> irb(main):009:0> i = c.create_instance({:hwp_storage=>nil, :hwp_id=>"default", :image_id=>"factory-image-1377d19c-d46a-432f-91c6-cc6b83c1fa14", :keyname=>nil, :hwp_memory=>512, :name=>"jprovazn06-rhel62-vsphere", :hwp_cpu=>1})
> => #<DeltaCloud::API::Stateful::Instance:0x7f72f59dd450 @actions=[], @url="http://localhost:3002/api/instances/jprovazn06-rhel62-vsphere", @base_name="instance", @client=#<DeltaCloud::API:0x7f72f4f9cf68 @password="R3dhat!", @api_uri=#<URI::HTTP:0x7f72f4fb6b48 URL:http://localhost:3002/api>, @verbose=false, @api_version="0.5.0", @api_provider="10.16.120.224", @entry_points={:drivers=>"http://localhost:3002/api/drivers", :storage_snapshots=>"http://localhost:3002/api/storage_snapshots", :instances=>"http://localhost:3002/api/instances", :hardware_profiles=>"http://localhost:3002/api/hardware_profiles", :images=>"http://localhost:3002/api/images", :instance_states=>"http://localhost:3002/api/instance_states", :realms=>"http://localhost:3002/api/realms", :storage_volumes=>"http://localhost:3002/api/storage_volumes"}, @username="Administrator", @driver_name="vsphere", @api_driver="vsphere", @features={:instances=>[:user_iso, :user_data, :user_name]}>, @state="PENDING", @action_urls=[], @objects=[{:type=>:state, :state=>"STOPPED", :method_name=>"stopped?"}, {:type=>:state, :state=>"RUNNING", :method_name=>"running?"}, {:type=>:state, :state=>"PENDING", :method_name=>"pending?"}, {:type=>:state, :state=>"SHUTTING_DOWN", :method_name=>"shutting_down?"}, {:type=>:text, :value=>"jprovazn06-rhel62-vsphere", :method_name=>"name"}, {:type=>:text, :value=>"Administrator", :method_name=>"owner_id"}, {:type=>:link, :id=>"factory-image-1377d19c-d46a-432f-91c6-cc6b83c1fa14", :method_name=>"image"}, {:type=>:text, :value=>"factory-image-1377d19c-d46a-432f-91c6-cc6b83c1fa14", :method_name=>"image_id"}, {:type=>:link, :id=>"datastore1", :method_name=>"realm"}, {:type=>:text, :value=>"datastore1", :method_name=>"realm_id"}, {:type=>:text, :value=>"PENDING", :method_name=>"state"}, {:type=>:link, :id=>"default", :method_name=>"hardware_profile"}, {:type=>:text, :value=>"default", :method_name=>"hardware_profile_id"}, {:type=>:collection, :values=>[], :method_name=>"public_addresses"}, {:type=>:collection, :values=>[], :method_name=>"private_addresses"}], @id="jprovazn06-rhel62-vsphere">
> irb(main):010:0> c.instance(i.id)
> => nil
> irb(main):011:0> 
> dc-core log:
> >> Thin web server (v1.2.11 codename Bat-Shit Crazy)
> >> Debugging ON
> >> Maximum connections set to 1024
> >> Listening on localhost:3002, CTRL+C to stop
> Processing /api/instances (for 127.0.0.1 at Fri Oct 05 03:05:04 -0400 2012) [POST] [VSphere]
> Parameters: {"name"=>"jprovazn06-rhel62-vsphere", "keyname"=>"", "image_id"=>"factory-image-1377d19c-d46a-432f-91c6-cc6b83c1fa14", "hwp_id"=>"default", "hwp_storage"=>"", "hwp_memory"=>"512", "hwp_cpu"=>"1"}
> Provider: 10.16.120.224
> Authentication: Basic
> Server: thin 1.2.11 codename Bat-Shit Crazy
> Accept: application/xml
> Completed in 0.000000 | 0.000000 | 201 | application/xml | http://localhost:3002/api/instances
> Processing /api/instances/jprovazn06-rhel62-vsphere (for 127.0.0.1 at Fri Oct 05 03:05:12 -0400 2012) [GET] [VSphere]
> Parameters: {}
> Provider: 10.16.120.224
> Authentication: Basic
> Server: thin 1.2.11 codename Bat-Shit Crazy
> Accept: application/xml
> Completed in 1.504222 | 0.000000 | 404 | application/xml | http://localhost:3002/api/instances/jprovazn06-rhel62-vsphere
> On vsphere server is a cert error in log:
> **********2012-10-05T05:12:56.984-04:00 [03000 info 'Default' opID=ceaafc5e] [VpxLRO] -- FINISH task-internal-615740 --  -- vim.LicenseManager.GetLicenseAssignmentManager -- 52feed73-3377-7f01-7421-1f7d58e08338(52148f9c-ca66-faaf-b784-a111d2c2198b)
> 2012-10-05T05:12:56.984-04:00 [03000 verbose 'Default'] [VpxLRO::ClearCurrentMain] Clearing _currentMain
> 2012-10-05T05:12:56.984-04:00 [02300 verbose 'ProxySvc Req69512'] New proxy client TCPStreamWin32(socket=TCP(fd=3544) local=127.0.0.1:80,  peer=127.0.0.1:58573)
> 2012-10-05T05:12:56.984-04:00 [01804 warning 'Libs'] Encountered other certificate error: 27
> 2012-10-05T05:12:56.984-04:00 [01804 warning 'Libs'] Encountered other certificate error: 27
> 2012-10-05T05:12:57.000-04:00 [03792 verbose 'SSL SoapAdapter.HTTPService'] User agent is 'VMware vim-java 1.0'
> 2012-10-05T05:12:57.000-04:00 [03792 verbose 'Default'] [VpxVmomi] Invoking [queryAssignedLicenses] on [vim.LicenseAssignmentManager:LicenseAssignmentManager] session [52feed73-3377-7f01-7421-1f7d58e08338(52148f9c-ca66-faaf-b784-a111d2c2198b)]
> 2012-10-05T05:12:57.000-04:00 [03792 verbose 'Default'] [VpxLroList::ThreadMainEntry] Unlocked _propProvider to call into external code
> 2012-10-05T05:12:57.000-04:00 [03792 verbose 'Default'] [VpxLRO::LroMain] Invoking _currentMain
> 2012-10-05T05:12:57.000-04:00 [03792 info 'Default' opID=c7b77a5b] [VpxLRO] -- BEGIN task-internal-615741 --  -- vim.LicenseAssignmentManager.queryAssignedLicenses -- 52feed73-3377-7f01-7421-1f7d58e08338(52148f9c-ca66-faaf-b784-a111d2c2198b)
> 2012-10-05T05:12:57.015-04:00 [03792 verbose 'Default' opID=c7b77a5b] [VpxVmomi] Invoke done: vim.LicenseAssignmentManager.queryAssignedLicenses session: 52feed73-3377-7f01-7421-1f7d58e08338
> 2012-10-05T05:12:57.031-04:00 [03792 verbose 'SSL SoapAdapter.HTTPService' opID=c7b77a5b] HTTP Response: Complete (processed 7666 bytes)
> 2012-10-05T05:12:57.031-04:00 [03792 info 'Default' opID=c7b77a5b] [VpxLRO] -- FINISH task-internal-615741 --  -- vim.LicenseAssignmentManager.queryAssignedLicenses -- 52feed73-3377-7f01-7421-1f7d58e08338(52148f9c-ca66-faaf-b784-a111d2c2198b)
> 2012-10-05T05:12:57.031-04:00 [03792 verbose 'Default'] [VpxLRO::ClearCurrentMain] Clearing _currentMain
> 2012-10-05T05:12:57.031-04:00 [02300 verbose 'ProxySvc Req69513'] New proxy client TCPStreamWin32(socket=TCP(fd=5020) local=127.0.0.1:80,  peer=127.0.0.1:58575)
> 2012-10-05T05:12:57.031-04:00 [01804 warning 'Libs'] Encountered other certificate error: 27
> It would be nice if dc-core could check for such errors and report them back to client.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (DTACLOUD-334) vsphere instance is not created on server and no error is reported

Posted by "Michal Fojtik (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DTACLOUD-334?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13471490#comment-13471490 ] 

Michal Fojtik commented on DTACLOUD-334:
----------------------------------------

That is true and there is no workaround currently for this. VSphere create instance as a Task and we can't wait in request for this task to complete. So we return a 'fake' instance object with 'state' set to 'pending'. In parallel we create a YAML representation of this instance and upload it to the Datastore on VSphere. So after you create an instance for a short period of time you get this YAML files back instead of 'real' instance. Once the task finish and the instance appears, the YAML file is removed from the Datastore and 'real' instance is returned. I can't see any other possible way how to make this work.

DC **can't** check for that errors because they happen asynchronously on VSphere site :/
                
> vsphere instance is not created on server and no error is reported
> ------------------------------------------------------------------
>
>                 Key: DTACLOUD-334
>                 URL: https://issues.apache.org/jira/browse/DTACLOUD-334
>             Project: DeltaCloud
>          Issue Type: Bug
>          Components: Server
>         Environment: dc-core 0.5.x
>            Reporter: Jan Provaznik
>
> If I create a vsphere instance, it seems to be created properly (based on dc-core response), but actually the instance is not created on vsphere side:
> irb(main):009:0> i = c.create_instance({:hwp_storage=>nil, :hwp_id=>"default", :image_id=>"factory-image-1377d19c-d46a-432f-91c6-cc6b83c1fa14", :keyname=>nil, :hwp_memory=>512, :name=>"jprovazn06-rhel62-vsphere", :hwp_cpu=>1})
> => #<DeltaCloud::API::Stateful::Instance:0x7f72f59dd450 @actions=[], @url="http://localhost:3002/api/instances/jprovazn06-rhel62-vsphere", @base_name="instance", @client=#<DeltaCloud::API:0x7f72f4f9cf68 @password="R3dhat!", @api_uri=#<URI::HTTP:0x7f72f4fb6b48 URL:http://localhost:3002/api>, @verbose=false, @api_version="0.5.0", @api_provider="10.16.120.224", @entry_points={:drivers=>"http://localhost:3002/api/drivers", :storage_snapshots=>"http://localhost:3002/api/storage_snapshots", :instances=>"http://localhost:3002/api/instances", :hardware_profiles=>"http://localhost:3002/api/hardware_profiles", :images=>"http://localhost:3002/api/images", :instance_states=>"http://localhost:3002/api/instance_states", :realms=>"http://localhost:3002/api/realms", :storage_volumes=>"http://localhost:3002/api/storage_volumes"}, @username="Administrator", @driver_name="vsphere", @api_driver="vsphere", @features={:instances=>[:user_iso, :user_data, :user_name]}>, @state="PENDING", @action_urls=[], @objects=[{:type=>:state, :state=>"STOPPED", :method_name=>"stopped?"}, {:type=>:state, :state=>"RUNNING", :method_name=>"running?"}, {:type=>:state, :state=>"PENDING", :method_name=>"pending?"}, {:type=>:state, :state=>"SHUTTING_DOWN", :method_name=>"shutting_down?"}, {:type=>:text, :value=>"jprovazn06-rhel62-vsphere", :method_name=>"name"}, {:type=>:text, :value=>"Administrator", :method_name=>"owner_id"}, {:type=>:link, :id=>"factory-image-1377d19c-d46a-432f-91c6-cc6b83c1fa14", :method_name=>"image"}, {:type=>:text, :value=>"factory-image-1377d19c-d46a-432f-91c6-cc6b83c1fa14", :method_name=>"image_id"}, {:type=>:link, :id=>"datastore1", :method_name=>"realm"}, {:type=>:text, :value=>"datastore1", :method_name=>"realm_id"}, {:type=>:text, :value=>"PENDING", :method_name=>"state"}, {:type=>:link, :id=>"default", :method_name=>"hardware_profile"}, {:type=>:text, :value=>"default", :method_name=>"hardware_profile_id"}, {:type=>:collection, :values=>[], :method_name=>"public_addresses"}, {:type=>:collection, :values=>[], :method_name=>"private_addresses"}], @id="jprovazn06-rhel62-vsphere">
> irb(main):010:0> c.instance(i.id)
> => nil
> irb(main):011:0> 
> dc-core log:
> >> Thin web server (v1.2.11 codename Bat-Shit Crazy)
> >> Debugging ON
> >> Maximum connections set to 1024
> >> Listening on localhost:3002, CTRL+C to stop
> Processing /api/instances (for 127.0.0.1 at Fri Oct 05 03:05:04 -0400 2012) [POST] [VSphere]
> Parameters: {"name"=>"jprovazn06-rhel62-vsphere", "keyname"=>"", "image_id"=>"factory-image-1377d19c-d46a-432f-91c6-cc6b83c1fa14", "hwp_id"=>"default", "hwp_storage"=>"", "hwp_memory"=>"512", "hwp_cpu"=>"1"}
> Provider: 10.16.120.224
> Authentication: Basic
> Server: thin 1.2.11 codename Bat-Shit Crazy
> Accept: application/xml
> Completed in 0.000000 | 0.000000 | 201 | application/xml | http://localhost:3002/api/instances
> Processing /api/instances/jprovazn06-rhel62-vsphere (for 127.0.0.1 at Fri Oct 05 03:05:12 -0400 2012) [GET] [VSphere]
> Parameters: {}
> Provider: 10.16.120.224
> Authentication: Basic
> Server: thin 1.2.11 codename Bat-Shit Crazy
> Accept: application/xml
> Completed in 1.504222 | 0.000000 | 404 | application/xml | http://localhost:3002/api/instances/jprovazn06-rhel62-vsphere
> On vsphere server is a cert error in log:
> **********2012-10-05T05:12:56.984-04:00 [03000 info 'Default' opID=ceaafc5e] [VpxLRO] -- FINISH task-internal-615740 --  -- vim.LicenseManager.GetLicenseAssignmentManager -- 52feed73-3377-7f01-7421-1f7d58e08338(52148f9c-ca66-faaf-b784-a111d2c2198b)
> 2012-10-05T05:12:56.984-04:00 [03000 verbose 'Default'] [VpxLRO::ClearCurrentMain] Clearing _currentMain
> 2012-10-05T05:12:56.984-04:00 [02300 verbose 'ProxySvc Req69512'] New proxy client TCPStreamWin32(socket=TCP(fd=3544) local=127.0.0.1:80,  peer=127.0.0.1:58573)
> 2012-10-05T05:12:56.984-04:00 [01804 warning 'Libs'] Encountered other certificate error: 27
> 2012-10-05T05:12:56.984-04:00 [01804 warning 'Libs'] Encountered other certificate error: 27
> 2012-10-05T05:12:57.000-04:00 [03792 verbose 'SSL SoapAdapter.HTTPService'] User agent is 'VMware vim-java 1.0'
> 2012-10-05T05:12:57.000-04:00 [03792 verbose 'Default'] [VpxVmomi] Invoking [queryAssignedLicenses] on [vim.LicenseAssignmentManager:LicenseAssignmentManager] session [52feed73-3377-7f01-7421-1f7d58e08338(52148f9c-ca66-faaf-b784-a111d2c2198b)]
> 2012-10-05T05:12:57.000-04:00 [03792 verbose 'Default'] [VpxLroList::ThreadMainEntry] Unlocked _propProvider to call into external code
> 2012-10-05T05:12:57.000-04:00 [03792 verbose 'Default'] [VpxLRO::LroMain] Invoking _currentMain
> 2012-10-05T05:12:57.000-04:00 [03792 info 'Default' opID=c7b77a5b] [VpxLRO] -- BEGIN task-internal-615741 --  -- vim.LicenseAssignmentManager.queryAssignedLicenses -- 52feed73-3377-7f01-7421-1f7d58e08338(52148f9c-ca66-faaf-b784-a111d2c2198b)
> 2012-10-05T05:12:57.015-04:00 [03792 verbose 'Default' opID=c7b77a5b] [VpxVmomi] Invoke done: vim.LicenseAssignmentManager.queryAssignedLicenses session: 52feed73-3377-7f01-7421-1f7d58e08338
> 2012-10-05T05:12:57.031-04:00 [03792 verbose 'SSL SoapAdapter.HTTPService' opID=c7b77a5b] HTTP Response: Complete (processed 7666 bytes)
> 2012-10-05T05:12:57.031-04:00 [03792 info 'Default' opID=c7b77a5b] [VpxLRO] -- FINISH task-internal-615741 --  -- vim.LicenseAssignmentManager.queryAssignedLicenses -- 52feed73-3377-7f01-7421-1f7d58e08338(52148f9c-ca66-faaf-b784-a111d2c2198b)
> 2012-10-05T05:12:57.031-04:00 [03792 verbose 'Default'] [VpxLRO::ClearCurrentMain] Clearing _currentMain
> 2012-10-05T05:12:57.031-04:00 [02300 verbose 'ProxySvc Req69513'] New proxy client TCPStreamWin32(socket=TCP(fd=5020) local=127.0.0.1:80,  peer=127.0.0.1:58575)
> 2012-10-05T05:12:57.031-04:00 [01804 warning 'Libs'] Encountered other certificate error: 27
> It would be nice if dc-core could check for such errors and report them back to client.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira