Hide Forgot
Description of problem: ============================== bugzilla tracker for deltacloud jira issue: https://issues.apache.org/jira/browse/DTACLOUD-126 Basically if you deploy to rhevm without specifying a specific realm, deltacloud throws a stack trace which is displayed in the web ui. ^[[1;29mProcessing /api/instances^[[0m (for 127.0.0.1 at Fri Jan 13 12:31:20 -0500 2012) [POST] [^[[1;29mRHEVM^[[0m] thin server (localhost:3002) [deltacloud-mock][8251]: Parameters: {"name"=>"try3-dj-rhel6-charlie", "hwp_memory"=>"512", "image_id"=>"62392110-ae69-4bf6-a35d-b072bfcdc3f3", "keyname"=>"", "hwp_id"=>"SERVER", "hwp_cpu"=>"1", "hwp_storage"=>"1"} thin server (localhost:3002) [deltacloud-mock][8251]: Provider: https://qeblade26.rhq.lab.eng.bos.redhat.com:8443/api;045ba8ee-2a60-11e1-a69d-5cf3fc1c861c thin server (localhost:3002) [deltacloud-mock][8251]: Authentication: Basic thin server (localhost:3002) [deltacloud-mock][8251]: Server: thin 1.2.11 codename Bat-Shit Crazy thin server (localhost:3002) [deltacloud-mock][8251]: Accept: application/xml thin server (localhost:3002) [deltacloud-mock][8251]: [NO HANDLED] NoMethodError: undefined method `empty?' for nil:NilClass /usr/share/deltacloud-core/bin/../lib/deltacloud/drivers/rhevm/rhevm_client.rb:129:in `create_vm' /usr/lib/ruby/gems/1.8/gems/nokogiri-1.5.0.beta.4/lib/nokogiri/xml/builder.rb:364:in `instance_eval' /usr/lib/ruby/gems/1.8/gems/nokogiri-1.5.0.beta.4/lib/nokogiri/xml/builder.rb:364:in `insert' /usr/lib/ruby/gems/1.8/gems/nokogiri-1.5.0.beta.4/lib/nokogiri/xml/builder.rb:350:in `method_missing' /usr/share/deltacloud-core/bin/../lib/deltacloud/drivers/rhevm/rhevm_client.rb:126:in `create_vm' /usr/lib/ruby/gems/1.8/gems/nokogiri-1.5.0.beta.4/lib/nokogiri/xml/builder.rb:291:in `instance_eval' /usr/lib/ruby/gems/1.8/gems/nokogiri-1.5.0.beta.4/lib/nokogiri/xml/builder.rb:291:in `initialize' /usr/share/deltacloud-core/bin/../lib/deltacloud/drivers/rhevm/rhevm_client.rb:125:in `new' /usr/share/deltacloud-core/bin/../lib/deltacloud/drivers/rhevm/rhevm_client.rb:125:in `create_vm' /usr/share/deltacloud-core/bin/../lib/deltacloud/drivers/rhevm/rhevm_driver.rb:202:in `create_instance' /usr/share/deltacloud-core/bin/../lib/deltacloud/base_driver/exceptions.rb:151:in `call' /usr/share/deltacloud-core/bin/../lib/deltacloud/base_driver/exceptions.rb:151:in `safely' /usr/share/deltacloud-core/bin/../lib/deltacloud/drivers/rhevm/rhevm_driver.rb:193:in `create_instance' /usr/share/deltacloud-core/bin/../lib/deltacloud/server.rb:478 /usr/share/deltacloud-core/bin/../lib/sinatra/rabbit.rb:125:in `instance_eval' /usr/share/deltacloud-core/bin/../lib/sinatra/rabbit.rb:125:in `POST /api/instances' /usr/lib/ruby/gems/1.8/gems/sinatra-1.2.6/lib/sinatra/base.rb:1151:in `call' /usr/lib/ruby/gems/1.8/gems/sinatra-1.2.6/lib/sinatra/base.rb:1151:in `compile!' Version-Release number of selected component (if applicable): ===================================================================== aeolus-all-0.8.0-5.el6.noarch aeolus-conductor-0.8.0-5.el6.noarch aeolus-conductor-daemons-0.8.0-5.el6.noarch aeolus-conductor-doc-0.8.0-5.el6.noarch aeolus-configure-2.5.0-4.el6.noarch deltacloud-core-0.5.0-0.rc1.el6.noarch deltacloud-core-ec2-0.5.0-0.rc1.el6.noarch deltacloud-core-rhevm-0.5.0-0.rc1.el6.noarch deltacloud-core-vsphere-0.5.0-0.rc1.el6.noarch rubygem-aeolus-cli-0.3.0-3.el6.noarch rubygem-aeolus-image-0.3.0-2.el6.noarch rubygem-deltacloud-client-0.4.0-3.el6.noarch
Created attachment 555121 [details] ss
Hi, I have patch in list that will fix this issue: http://mail-archives.apache.org/mod_mbox/deltacloud-dev/201201.mbox/raw/%3C1326368315-28892-2-git-send-email-mfojtik%40redhat.com%3E It's related to DTACLOUD-126
Tested this change using rhevm with multiple datacenters and two realms (clusters) in the datacenter under test: >> Find images in datacenter curl -X GET --user 'username:password "server:3001/api/images?format=xml" <?xml version='1.0' encoding='utf-8' ?> <images> <image href='server:3001/api/images/ccf52584-4ec8-49cb-9f1b-9d214abfff5f' id='ccf52584-4ec8-49cb-9f1b-9d214abfff5f'> <name>63fa88a6-b9f2-452d-a2be-fdf3b0a72c2e</name> <owner_id>xxxl</owner_id> <description>Template by iwhd</description> <architecture>x86_64</architecture> <state>ok</state> <actions> <link href='server:3001/api/instances;image_id=ccf52584-4ec8-49cb-9f1b-9d214abfff5f' method='post' rel='create_instance' /> </actions> </image> </images> >> Create instance - no realm specified curl -X POST -F "image_id=ccf52584-4ec8-49cb-9f1b-9d214abfff5f" -F "name=noRealmSpecified" --user 'username:password' "server:3001/api/instances?format=xml"<?xml version='1.0' encoding='utf-8' ?> <instance href='server:3001/api/instances/07d8538f-e459-4138-aa9f-318bb547a99f' id='07d8538f-e459-4138-aa9f-318bb547a99f'> <name>noRealmSpecified</name> <owner_id>xxx</owner_id> <image href='server:3001/api/images/ccf52584-4ec8-49cb-9f1b-9d214abfff5f' id='ccf52584-4ec8-49cb-9f1b-9d214abfff5f'></image> <realm href='server:3001/api/realms/d21bab08-4086-11e1-922a-5cf3fc1c861c' id='d21bab08-4086-11e1-922a-5cf3fc1c861c'></realm> <state>PENDING</state> <hardware_profile href='server:3001/api/hardware_profiles/DESKTOP' id='DESKTOP'> <property kind='fixed' name='memory' unit='MB' value='512'></property> <property kind='fixed' name='storage' unit='GB' value='1'></property> <property kind='fixed' name='cpu' unit='count' value='1'></property> </hardware_profile> <actions> <link href='server:3001/api/images;instance_id=07d8538f-e459-4138-aa9f-318bb547a99f' method='post' rel='create_image' /> </actions> <launch_time>2012-01-17T09:54:11.017-05:00</launch_time> <public_addresses><address port='5890' type='vnc'>xxx</address></public_addresses> <private_addresses></private_addresses> </instance> >> Create Instance - specify different realm - same datacenter curl -X POST -F "image_id=ccf52584-4ec8-49cb-9f1b-9d214abfff5f" -F "name=differentRealmSpecified" -F "realm_id=bdce3f96-4070-11e1-9f90-5cf3fc1c861c" --user 'username:password' "server:3001/api/instances?format=xml" <?xml version='1.0' encoding='utf-8' ?> <instance href='serverm:3001/api/instances/0c71d995-954e-4292-ace5-ed0890e5bb61' id='0c71d995-954e-4292-ace5-ed0890e5bb61'> <name>differentRealmSpecified</name> <owner_id>xxx</owner_id> <image href='server:3001/api/images/ccf52584-4ec8-49cb-9f1b-9d214abfff5f' id='ccf52584-4ec8-49cb-9f1b-9d214abfff5f'></image> <realm href='server:3001/api/realms/bdce3f96-4070-11e1-9f90-5cf3fc1c861c' id='bdce3f96-4070-11e1-9f90-5cf3fc1c861c'></realm> <state>PENDING</state> <hardware_profile href='server:3001/api/hardware_profiles/DESKTOP' id='DESKTOP'> <property kind='fixed' name='memory' unit='MB' value='512'></property> <property kind='fixed' name='storage' unit='GB' value='1'></property> <property kind='fixed' name='cpu' unit='count' value='1'></property> </hardware_profile> <actions> <link href='server:3001/api/images;instance_id=0c71d995-954e-4292-ace5-ed0890e5bb61' method='post' rel='create_image' /> </actions> <launch_time>2012-01-17T09:57:41.841-05:00</launch_time> <public_addresses><address port='5890' type='vnc'>xxx</address></public_addresses> <private_addresses></private_addresses> </instance> >> same cluster/realm specified curl -X POST -F "image_id=ccf52584-4ec8-49cb-9f1b-9d214abfff5f" -F "name=sameRealmSpecified" -F "realm_id=d21bab08-4086-11e1-922a-5cf3fc1c861c" --user username:password' "server:3001/api/instances?format=xml" <?xml version='1.0' encoding='utf-8' ?> <instance href='server:3001/api/instances/4cbeda67-cd5f-4614-a40e-39a661f5fd0b' id='4cbeda67-cd5f-4614-a40e-39a661f5fd0b'> <name>sameRealmSpecified</name> <owner_id>xxx</owner_id> <image href='server:3001/api/images/ccf52584-4ec8-49cb-9f1b-9d214abfff5f' id='ccf52584-4ec8-49cb-9f1b-9d214abfff5f'></image> <realm href='server:3001/api/realms/d21bab08-4086-11e1-922a-5cf3fc1c861c' id='d21bab08-4086-11e1-922a-5cf3fc1c861c'></realm> <state>PENDING</state> <hardware_profile href='http://bigisis.rhts.eng.bos.redhat.com:3001/api/hardware_profiles/DESKTOP' id='DESKTOP'> <property kind='fixed' name='memory' unit='MB' value='512'></property> <property kind='fixed' name='storage' unit='GB' value='1'></property> <property kind='fixed' name='cpu' unit='count' value='1'></property> </hardware_profile> <actions> <link href='server:3001/api/images;instance_id=4cbeda67-cd5f-4614-a40e-39a661f5fd0b' method='post' rel='create_image' /> </actions> <launch_time>2012-01-17T10:15:58.704-05:00</launch_time> <public_addresses><address port='5890' type='vnc'>xxx</address></public_addresses> <private_addresses></private_addresses> </instance>
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHEA-2012-0587.html