DeltaCloud
  1. DeltaCloud
  2. DTACLOUD-153

Unhandled exception or status code (Required VDSM hook 'floppyinject' not supported by RHEV-M) - 500 - Internal Server Error

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Blocker Blocker
    • Resolution: Cannot Reproduce
    • Component/s: Server
    • Labels:
      None
    • Environment:

      Description

      Attempting to create an instance with user_data in a rhevm environment where floppyinject hook does not exist results in an 'Unhandled exception':

      Deltacloud::ExceptionHandler::BackendError - Unhandled exception or status code (Required VDSM hook 'floppyinject' not supported by RHEV-M)

      The error itself is correct - the handling is not.

      Backtrace:

      /usr/share/deltacloud-core/lib/deltacloud/drivers/rhevm/rhevm_client.rb:148: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/lib/deltacloud/drivers/rhevm/rhevm_client.rb:137: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/lib/deltacloud/drivers/rhevm/rhevm_client.rb:136:in `new'
      /usr/share/deltacloud-core/lib/deltacloud/drivers/rhevm/rhevm_client.rb:136:in `create_vm'
      /usr/share/deltacloud-core/lib/deltacloud/drivers/rhevm/rhevm_driver.rb:206:in `create_instance'
      /usr/share/deltacloud-core/lib/deltacloud/base_driver/exceptions.rb:151:in `call'
      /usr/share/deltacloud-core/lib/deltacloud/base_driver/exceptions.rb:151:in `safely'
      /usr/share/deltacloud-core/lib/deltacloud/drivers/rhevm/rhevm_driver.rb:197:in `create_instance'
      /usr/share/deltacloud-core/lib/deltacloud/server.rb:480
      /usr/share/deltacloud-core/lib/sinatra/rabbit.rb:125:in `instance_eval'
      /usr/share/deltacloud-core/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!'
      /usr/lib/ruby/gems/1.8/gems/sinatra-1.2.6/lib/sinatra/base.rb:724:in `instance_eval'
      /usr/lib/ruby/gems/1.8/gems/sinatra-1.2.6/lib/sinatra/base.rb:724:in `route_eval'
      /usr/lib/ruby/gems/1.8/gems/sinatra-1.2.6/lib/sinatra/base.rb:708:in `route!'
      /usr/lib/ruby/gems/1.8/gems/sinatra-1.2.6/lib/sinatra/base.rb:758:in `process_route'
      /usr/lib/ruby/gems/1.8/gems/sinatra-1.2.6/lib/sinatra/base.rb:755:in `catch'
      /usr/lib/ruby/gems/1.8/gems/sinatra-1.2.6/lib/sinatra/base.rb:755:in `process_route'
      /usr/lib/ruby/gems/1.8/gems/sinatra-1.2.6/lib/sinatra/base.rb:707:in `route!'
      /usr/lib/ruby/gems/1.8/gems/sinatra-1.2.6/lib/sinatra/base.rb:706:in `each'
      /usr/lib/ruby/gems/1.8/gems/sinatra-1.2.6/lib/sinatra/base.rb:706:in `route!'
      /usr/lib/ruby/gems/1.8/gems/sinatra-1.2.6/lib/sinatra/base.rb:843:in `dispatch!'
      /usr/lib/ruby/gems/1.8/gems/sinatra-1.2.6/lib/sinatra/base.rb:644:in `call!'
      /usr/lib/ruby/gems/1.8/gems/sinatra-1.2.6/lib/sinatra/base.rb:808:in `instance_eval'
      /usr/lib/ruby/gems/1.8/gems/sinatra-1.2.6/lib/sinatra/base.rb:808:in `invoke'
      /usr/lib/ruby/gems/1.8/gems/sinatra-1.2.6/lib/sinatra/base.rb:808:in `catch'
      /usr/lib/ruby/gems/1.8/gems/sinatra-1.2.6/lib/sinatra/base.rb:808:in `invoke'
      /usr/lib/ruby/gems/1.8/gems/sinatra-1.2.6/lib/sinatra/base.rb:644:in `call!'
      /usr/lib/ruby/gems/1.8/gems/sinatra-1.2.6/lib/sinatra/base.rb:629:in `call'
      /usr/share/deltacloud-core/lib/sinatra/rack_date.rb:31:in `call'
      /usr/share/deltacloud-core/lib/sinatra/rack_accept.rb:149:in `call'
      /usr/lib/ruby/gems/1.8/gems/rack-1.3.0/lib/rack/head.rb:9:in `call'
      /usr/lib/ruby/gems/1.8/gems/sinatra-1.2.6/lib/sinatra/showexceptions.rb:21:in `call'
      /usr/share/deltacloud-core/lib/sinatra/rack_driver_select.rb:45:in `call'
      /usr/share/deltacloud-core/lib/sinatra/rack_matrix_params.rb:106:in `call'
      /usr/share/deltacloud-core/lib/sinatra/rack_runtime.rb:36:in `call'
      /usr/share/deltacloud-core/lib/sinatra/rack_etag.rb:41:in `call'
      /usr/lib/ruby/gems/1.8/gems/rack-accept-0.4.3/lib/rack/accept/context.rb:22:in `call'
      /usr/lib/ruby/gems/1.8/gems/rack-1.3.0/lib/rack/head.rb:9:in `call'
      /usr/lib/ruby/gems/1.8/gems/rack-1.3.0/lib/rack/commonlogger.rb:18:in `call'
      /usr/lib/ruby/gems/1.8/gems/rack-1.3.0/lib/rack/methodoverride.rb:24:in `call'
      /usr/lib/ruby/gems/1.8/gems/sinatra-1.2.6/lib/sinatra/base.rb:1272:in `call'
      /usr/lib/ruby/gems/1.8/gems/sinatra-1.2.6/lib/sinatra/base.rb:1303:in `synchronize'
      /usr/lib/ruby/gems/1.8/gems/sinatra-1.2.6/lib/sinatra/base.rb:1272:in `call'
      /usr/lib/ruby/gems/1.8/gems/thin-1.2.11/lib/thin/connection.rb:84:in `pre_process'
      /usr/lib/ruby/gems/1.8/gems/thin-1.2.11/lib/thin/connection.rb:82:in `catch'
      /usr/lib/ruby/gems/1.8/gems/thin-1.2.11/lib/thin/connection.rb:82:in `pre_process'
      /usr/lib/ruby/gems/1.8/gems/eventmachine-0.12.10/lib/eventmachine.rb:1060:in `call'
      /usr/lib/ruby/gems/1.8/gems/eventmachine-0.12.10/lib/eventmachine.rb:1060:in `spawn_threadpool'
      /usr/lib/ruby/gems/1.8/gems/eventmachine-0.12.10/lib/eventmachine.rb:1057:in `initialize'
      /usr/lib/ruby/gems/1.8/gems/eventmachine-0.12.10/lib/eventmachine.rb:1057:in `new'
      /usr/lib/ruby/gems/1.8/gems/eventmachine-0.12.10/lib/eventmachine.rb:1057:in `spawn_threadpool'
      /usr/lib/ruby/gems/1.8/gems/eventmachine-0.12.10/lib/eventmachine.rb:1049:in `defer'
      /usr/lib/ruby/gems/1.8/gems/thin-1.2.11/lib/thin/connection.rb:54:in `process'
      /usr/lib/ruby/gems/1.8/gems/thin-1.2.11/lib/thin/connection.rb:42:in `receive_data'
      /usr/lib/ruby/gems/1.8/gems/eventmachine-0.12.10/lib/eventmachine.rb:256:in `run_machine'
      /usr/lib/ruby/gems/1.8/gems/eventmachine-0.12.10/lib/eventmachine.rb:256:in `run'
      /usr/lib/ruby/gems/1.8/gems/thin-1.2.11/lib/thin/backends/base.rb:61:in `start'
      /usr/lib/ruby/gems/1.8/gems/thin-1.2.11/lib/thin/server.rb:159:in `start'
      /usr/lib/ruby/gems/1.8/gems/thin-1.2.11/lib/thin/controllers/controller.rb:86:in `start'
      /usr/lib/ruby/gems/1.8/gems/thin-1.2.11/lib/thin/runner.rb:185:in `send'
      /usr/lib/ruby/gems/1.8/gems/thin-1.2.11/lib/thin/runner.rb:185:in `run_command'
      /usr/lib/ruby/gems/1.8/gems/thin-1.2.11/lib/thin/runner.rb:151:in `run!'
      /usr/share/deltacloud-core/bin/deltacloudd:235
      /usr/bin/deltacloudd:5:in `load'
      /usr/bin/deltacloudd:5

        Issue Links

          Activity

          Ronelle Landy created issue -
          Hide
          Michal Fojtik added a comment -

          Hi,

          I just sent a patch to handle this issue:

          Signed-off-by: Michal fojtik <mfojtik@redhat.com>

          .../lib/deltacloud/drivers/rhevm/rhevm_driver.rb | 4 ++++
          .../lib/deltacloud/helpers/application_helper.rb | 1 +
          2 files changed, 5 insertions, 0 deletions

          diff --git a/server/lib/deltacloud/drivers/rhevm/rhevm_driver.rb b/server/lib/deltacloud/drivers/rhevm/rhevm_driver.rb
          index 10ffef3..8a0764c 100644
          — a/server/lib/deltacloud/drivers/rhevm/rhevm_driver.rb
          +++ b/server/lib/deltacloud/drivers/rhevm/rhevm_driver.rb
          @@ -335,6 +335,10 @@ class RHEVMDriver < Deltacloud::BaseDriver
          status 401
          end

          + on /(not supported|custom properties are not configured)/ do
          + status 501
          + end
          +
          on /(InternalServerError|nodename nor servname provided)/ do
          status 502
          end
          diff --git a/server/lib/deltacloud/helpers/application_helper.rb b/server/lib/deltacloud/helpers/application_helper.rb
          index 623fac8..e368103 100644
          — a/server/lib/deltacloud/helpers/application_helper.rb
          +++ b/server/lib/deltacloud/helpers/application_helper.rb
          @@ -266,6 +266,7 @@ module ApplicationHelper
          when 406; { :message => "Not Acceptable" }
          when 500; { :message => "Internal Server Error" }
          when 502; { :message => "Backend Server Error" }
          + when 501; { :message => "Not Supported" }
          end
          end


          1.7.9.1

          Show
          Michal Fojtik added a comment - Hi, I just sent a patch to handle this issue: Signed-off-by: Michal fojtik <mfojtik@redhat.com> — .../lib/deltacloud/drivers/rhevm/rhevm_driver.rb | 4 ++++ .../lib/deltacloud/helpers/application_helper.rb | 1 + 2 files changed, 5 insertions , 0 deletions diff --git a/server/lib/deltacloud/drivers/rhevm/rhevm_driver.rb b/server/lib/deltacloud/drivers/rhevm/rhevm_driver.rb index 10ffef3..8a0764c 100644 — a/server/lib/deltacloud/drivers/rhevm/rhevm_driver.rb +++ b/server/lib/deltacloud/drivers/rhevm/rhevm_driver.rb @@ -335,6 +335,10 @@ class RHEVMDriver < Deltacloud::BaseDriver status 401 end + on /(not supported|custom properties are not configured)/ do + status 501 + end + on /(InternalServerError|nodename nor servname provided)/ do status 502 end diff --git a/server/lib/deltacloud/helpers/application_helper.rb b/server/lib/deltacloud/helpers/application_helper.rb index 623fac8..e368103 100644 — a/server/lib/deltacloud/helpers/application_helper.rb +++ b/server/lib/deltacloud/helpers/application_helper.rb @@ -266,6 +266,7 @@ module ApplicationHelper when 406; { :message => "Not Acceptable" } when 500; { :message => "Internal Server Error" } when 502; { :message => "Backend Server Error" } + when 501; { :message => "Not Supported" } end end – 1.7.9.1
          Michal Fojtik made changes -
          Field Original Value New Value
          Assignee David Lutterkort [ lutter ] Michal Fojtik [ mfojtik ]
          Hide
          Michal Fojtik added a comment -

          Fixed in 3d8bada107a78c6755c142dad271f8c7a2b0bf2a

          Show
          Michal Fojtik added a comment - Fixed in 3d8bada107a78c6755c142dad271f8c7a2b0bf2a
          Michal Fojtik made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Hide
          Ronelle Landy added a comment -

          Deltacloud now throws:
          Deltacloud::ExceptionHandler::NotImplemented - Cannot add VM if some of the specified custom properties are not configured by the system. These keys are: $MissingKeys'.??

          Waiting on dev to see why the actual erroe message (not just the code) changed.

          Previously, Deltacloud threw the more specific error : Required VDSM hook 'floppyinject' not supported by RHEV-M.

          Show
          Ronelle Landy added a comment - Deltacloud now throws: Deltacloud::ExceptionHandler::NotImplemented - Cannot add VM if some of the specified custom properties are not configured by the system. These keys are: $MissingKeys'.?? Waiting on dev to see why the actual erroe message (not just the code) changed. Previously, Deltacloud threw the more specific error : Required VDSM hook 'floppyinject' not supported by RHEV-M.
          Hide
          Ronelle Landy added a comment -

          Reopening issue: The error handling is different due to the switch to the rbovirt gem:

          Copying comments from mfojtik:

          .... this gem is more 'general' in error handling
          ... but I'll push a fix to rbovirt that will list all available custom hooks
          .... and we will get that exception back into driver

          Show
          Ronelle Landy added a comment - Reopening issue: The error handling is different due to the switch to the rbovirt gem: Copying comments from mfojtik: .... this gem is more 'general' in error handling ... but I'll push a fix to rbovirt that will list all available custom hooks .... and we will get that exception back into driver
          Ronelle Landy made changes -
          Resolution Fixed [ 1 ]
          Status Resolved [ 5 ] Reopened [ 4 ]
          Ronelle Landy made changes -
          Priority Major [ 3 ] Blocker [ 1 ]
          Hide
          David Lutterkort added a comment -

          What is the status of this issue ?

          Show
          David Lutterkort added a comment - What is the status of this issue ?
          Hide
          Michal Fojtik added a comment -

          We depend on RHEV-M/oVirt API to report this problem correctly instead of throwing an exception. I'm going to fill a BZ ticket for that now.

          Show
          Michal Fojtik added a comment - We depend on RHEV-M/oVirt API to report this problem correctly instead of throwing an exception. I'm going to fill a BZ ticket for that now.
          Hide
          Michal Fojtik added a comment -

          I would prefer to close this issue and do not 'translate' the error message from oVirt/RHEV-M. Even the message isn't descriptive enough for now, this could change in near future. I think the 'NotImplemented' message + HTTP status code must be enough for Aeolus/Conductor guys that something is wrong with oVirt installation. What do you think?

          Show
          Michal Fojtik added a comment - I would prefer to close this issue and do not 'translate' the error message from oVirt/RHEV-M. Even the message isn't descriptive enough for now, this could change in near future. I think the 'NotImplemented' message + HTTP status code must be enough for Aeolus/Conductor guys that something is wrong with oVirt installation. What do you think?
          Hide
          David Lutterkort added a comment -

          Can we add some language to the error message to point users at floppyinject, something like 'If you are using the user_data parameter, this error may be caused by not having the floppyinject hook installed in your RHEV-M deployment' ? Basically, users should be told to check that before they try and get support somewhere else.

          Show
          David Lutterkort added a comment - Can we add some language to the error message to point users at floppyinject, something like 'If you are using the user_data parameter, this error may be caused by not having the floppyinject hook installed in your RHEV-M deployment' ? Basically, users should be told to check that before they try and get support somewhere else.
          Hide
          Michal Fojtik added a comment -

          commit c799a2458bcd0f4a258953a24af40330ff713672
          Author: Michal Fojtik <mfojtik@redhat.com>
          Date: Thu Jun 14 10:05:47 2012 +0200

          RHEV-M: Fixed the error message when using user_data without floppyinject hook installed

          Show
          Michal Fojtik added a comment - commit c799a2458bcd0f4a258953a24af40330ff713672 Author: Michal Fojtik <mfojtik@redhat.com> Date: Thu Jun 14 10:05:47 2012 +0200 RHEV-M: Fixed the error message when using user_data without floppyinject hook installed
          Michal Fojtik made changes -
          Status Reopened [ 4 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Hide
          David Lutterkort added a comment -

          For reference, this BZ tracks the work on the oVirt side: https://bugzilla.redhat.com/show_bug.cgi?id=769851

          Show
          David Lutterkort added a comment - For reference, this BZ tracks the work on the oVirt side: https://bugzilla.redhat.com/show_bug.cgi?id=769851
          Hide
          Ronelle Landy added a comment -

          Now, when creating an instance with user_data that is launched onto a host without the floppyinject hook, you get no error at instance creation time. Only when trying to mount the floppy drive:

          /sbin/modprobe floppy; lsmod | grep floppy
          floppy 61511 0
          [root@10-16-120-100 ~]# /bin/mount /dev/fd0 /media; cat /media/deltacloud-user-data.txt
          mount: you must specify the filesystem type

          Show
          Ronelle Landy added a comment - Now, when creating an instance with user_data that is launched onto a host without the floppyinject hook, you get no error at instance creation time. Only when trying to mount the floppy drive: /sbin/modprobe floppy; lsmod | grep floppy floppy 61511 0 [root@10-16-120-100 ~] # /bin/mount /dev/fd0 /media; cat /media/deltacloud-user-data.txt mount: you must specify the filesystem type
          Hide
          Ronelle Landy added a comment -

          As of yet, this is not resolved .... see test comments above

          Show
          Ronelle Landy added a comment - As of yet, this is not resolved .... see test comments above
          Ronelle Landy made changes -
          Resolution Fixed [ 1 ]
          Status Resolved [ 5 ] Reopened [ 4 ]
          Ronelle Landy made changes -
          Link This issue is duplicated by DTACLOUD-241 [ DTACLOUD-241 ]
          Hide
          Ronelle Landy added a comment -

          Closing this issue out due to work done on vmpayload to be used when floppyinject is not available. Will open a new JIRA for that functionality if there are still issues.

          Show
          Ronelle Landy added a comment - Closing this issue out due to work done on vmpayload to be used when floppyinject is not available. Will open a new JIRA for that functionality if there are still issues.
          Ronelle Landy made changes -
          Status Reopened [ 4 ] Closed [ 6 ]
          Resolution Cannot Reproduce [ 5 ]

            People

            • Assignee:
              Michal Fojtik
              Reporter:
              Ronelle Landy
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development