Bug 1340729 - [Excon::Errors::Forbidden]: Expected([200, 202]) <=> Actual(403 Forbidden) displayed in Request detail page when provisioning openstack instance.
Summary: [Excon::Errors::Forbidden]: Expected([200, 202]) <=> Actual(403 Forbidden) di...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Provisioning
Version: 5.6.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: GA
: 5.7.0
Assignee: Greg McCullough
QA Contact: Ola Pavlenko
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-05-30 07:50 UTC by Aziza Karol
Modified: 2017-12-21 14:59 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-05-31 21:25:07 UTC
Category: Bug
Cloudforms Team: ---
Target Upstream Version:


Attachments (Terms of Use)
error (92.98 KB, image/png)
2016-05-30 07:50 UTC, Aziza Karol
no flags Details

Description Aziza Karol 2016-05-30 07:50:29 UTC
Created attachment 1162690 [details]
error

Description of problem:


Version-Release number of selected component (if applicable):
5.6.0.8-rc1

How reproducible:
100%

Steps to Reproduce:
1. Navigate to compute->clouds->instances
2. Provision and openstack instance by selecting cirros template having disk size  12.6 MB and flavor m1.xlarge
.

Actual results:
Last message displays "[Excon::Errors::Forbidden]: Expected([200, 202]) <=> Actual(403 Forbidden) excon.error.response :body => "{\"forbidden\": {\"message\": \"Quota exceeded for cores: Requested 8, but already used 15 of 20 cores\", \"code\": 403}}" :cookies"


Expected result:
Proper text message should be displayed.

Additional info:
automation.log

[----] I, [2016-05-30T00:40:44.849902 #32478:6d5998]  INFO -- : Q-task_id([miq_provision_8]) Updated namespace [Cloud/VM/Provisioning/StateMachines/Methods/check_provisioned  ManageIQ/Cloud/VM/Provisioning/StateMachines]
[----] I, [2016-05-30T00:40:44.866532 #32478:6d5998]  INFO -- : Q-task_id([miq_provision_8]) Invoking [inline] method [/ManageIQ/Cloud/VM/Provisioning/StateMachines/Methods/check_provisioned] with inputs [{}]
[----] I, [2016-05-30T00:40:44.867810 #32478:6d5998]  INFO -- : Q-task_id([miq_provision_8]) <AEMethod [/ManageIQ/Cloud/VM/Provisioning/StateMachines/Methods/check_provisioned]> Starting 
[----] I, [2016-05-30T00:40:45.571375 #32478:6c087c]  INFO -- : Q-task_id([miq_provision_8]) <AEMethod check_provisioned> ProvisionCheck returned <error> for state <finished> and status <Error>
[----] I, [2016-05-30T00:40:45.619240 #32478:6d5998]  INFO -- : Q-task_id([miq_provision_8]) <AEMethod [/ManageIQ/Cloud/VM/Provisioning/StateMachines/Methods/check_provisioned]> Ending
[----] I, [2016-05-30T00:40:45.619366 #32478:6d5998]  INFO -- : Q-task_id([miq_provision_8]) Method exited with rc=MIQ_OK
[----] I, [2016-05-30T00:40:45.619965 #32478:6d5998]  INFO -- : Q-task_id([miq_provision_8]) Followed  Relationship [miqaedb:/Cloud/VM/Provisioning/StateMachines/Methods/CheckProvisioned#create]
[----] I, [2016-05-30T00:40:45.620122 #32478:6d5998]  INFO -- : Q-task_id([miq_provision_8]) Processed  State=[CheckProvisioned] with Result=[error]
[----] W, [2016-05-30T00:40:45.620379 #32478:6d5998]  WARN -- : Q-task_id([miq_provision_8]) Error in State=[CheckProvisioned]
[----] I, [2016-05-30T00:40:45.620718 #32478:6d5998]  INFO -- : Q-task_id([miq_provision_8]) In State=[CheckProvisioned], invoking [on_error] method=[update_provision_status(status => '[Excon::Errors::Forbidden]: Expected([200, 202]) <=> Actual(403 Forbidden)
excon.error.response
  :body          => "{\"forbidden\": {\"message\": \"Quota exceeded for cores: Requested 8, but already used 15 of 20 cores\", \"code\": 403}}"
  :cookies     ')]
[----] I, [2016-05-30T00:40:45.625076 #32478:6d5998]  INFO -- : Q-task_id([miq_provision_8]) Updated namespace [Cloud/VM/Provisioning/StateMachines/VMProvision_vm/update_provision_status  ManageIQ/Cloud/VM/Provisioning/StateMachines]
[----] E, [2016-05-30T00:40:45.635824 #32478:6d5998] ERROR -- : Q-task_id([miq_provision_8]) State=<CheckProvisioned> running on_error raised exception: <Method [/ManageIQ/Cloud/VM/Provisioning/StateMachines/VMProvision_VM/update_provision_status] requires parameter [status]>
[----] I, [2016-05-30T00:40:45.636364 #32478:6d5998]  INFO -- : Q-task_id([miq_provision_8]) Followed  Relationship [miqaedb:/Cloud/VM/Provisioning/StateMachines/VMProvision_vm/template#create]
[----] I, [2016-05-30T00:40:45.636926 #32478:6d5998]  INFO -- : Q-task_id([miq_provision_8]) Followed  Relationship [miqaedb:/cloud/VM/Lifecycle/Provisioning#create]

Comment 2 Aziza Karol 2016-05-31 07:30:38 UTC
evm.log error:
[----] E, [2016-05-31T03:26:02.072559 #9702:6d5998] ERROR -- : Q-task_id([miq_provision_31]) MIQ(ManageIQ::Providers::Openstack::CloudManager::Provision#provision_error) [[Excon::Errors::Forbidden]: Expected([200, 202]) <=> Actual(403 Forbidden)
excon.error.response
  :body          => "{\"forbidden\": {\"message\": \"Quota exceeded for instances: Requested 1, but already used 10 of 10 instances\", \"code\": 403}}"
  :cookies       => [
  ]
  :headers       => {
    "Content-Length"       => "121"
    "Content-Type"         => "application/json; charset=UTF-8"
    "Date"                 => "Tue, 31 May 2016 07:25:51 GMT"
    "Retry-After"          => "0"
    "X-Compute-Request-Id" => "req-96ada69f-ce73-4714-9589-4bd5fd5852df"
  }
  :host          => "10.8.58.70"
  :local_address => "192.168.55.84"
  :local_port    => 52235
  :path          => "/v2/ff5ee96505a9421fa973482c3938e22e/servers.json"
  :port          => 8774
  :reason_phrase => "Forbidden"
  :remote_ip     => "10.8.58.70"
  :status        => 403
  :status_line   => "HTTP/1.1 403 Forbidden\r\n"
] encountered during phase [start_clone_task]
[----] E, [2016-05-31T03:26:02.072705 #9702:6d5998] ERROR -- : Q-task_id([miq_provision_31]) /opt/rh/cfme-gemset/gems/excon-0.49.0/lib/excon/middlewares/expects.rb:6:in `response_call'
/opt/rh/cfme-gemset/gems/excon-0.49.0/lib/excon/middlewares/response_parser.rb:8:in `response_call'
/opt/rh/cfme-gemset/gems/excon-0.49.0/lib/excon/connection.rb:389:in `response'
/opt/rh/cfme-gemset/gems/excon-0.49.0/lib/excon/connection.rb:253:in `request'
/opt/rh/cfme-gemset/gems/fog-core-1.40.0/lib/fog/core/connection.rb:81:in `request'
/opt/rh/cfme-gemset/gems/fog-openstack-0.1.6/lib/fog/openstack/compute.rb:367:in `request'
/opt/rh/cfme-gemset/gems/fog-openstack-0.1.6/lib/fog/openstack/requests/compute/create_server.rb:82:in `create_server'
/opt/rh/cfme-gemset/gems/fog-openstack-0.1.6/lib/fog/openstack/models/compute/server.rb:375:in `save'
/opt/rh/cfme-gemset/gems/fog-core-1.40.0/lib/fog/core/collection.rb:51:in `create'
/var/www/miq/vmdb/app/models/manageiq/providers/openstack/cloud_manager/provision/cloning.rb:43:in `block in start_clone'
/var/www/miq/vmdb/app/models/mixins/provider_object_mixin.rb:6:in `block in with_provider_connection'
/var/www/miq/vmdb/app/models/ext_management_system.rb:360:in `with_provider_connection'
/var/www/miq/vmdb/app/models/mixins/provider_object_mixin.rb:5:in `with_provider_connection'
/var/www/miq/vmdb/app/models/manageiq/providers/openstack/cloud_manager/provision/cloning.rb:42:in `start_clone'
/var/www/miq/vmdb/app/models/manageiq/providers/cloud_manager/provision/state_machine.rb:37:in `start_clone_task'
/var/www/miq/vmdb/app/models/miq_request_task/state_machine.rb:17:in `signal'
/var/www/miq/vmdb/app/models/miq_provision/state_machine.rb:18:in `prepare_provision'
/var/www/miq/vmdb/app/models/miq_request_task/state_machine.rb:17:in `signal'
/var/www/miq/vmdb/app/models/manageiq/providers/cloud_manager/provision/state_machine.rb:28:in `poll_volumes_complete'
/var/www/miq/vmdb/app/models/miq_request_task/state_machine.rb:17:in `signal'
/var/www/miq/vmdb/app/models/manageiq/providers/cloud_manager/provision/state_machine.rb:15:in `prepare_volumes'
/var/www/miq/vmdb/app/models/miq_request_task/state_machine.rb:17:in `signal'
/var/www/miq/vmdb/app/models/manageiq/providers/cloud_manager/provision/state_machine.rb:9:in `determine_placement'
/var/www/miq/vmdb/app/models/miq_request_task/state_machine.rb:17:in `signal'
/var/www/miq/vmdb/app/models/manageiq/providers/cloud_manager/provision/state_machine.rb:3:in `create_destination'
/var/www/miq/vmdb/app/models/miq_request_task/state_machine.rb:17:in `signal'
/var/www/miq/vmdb/app/models/miq_provision/state_machine.rb:4:in `run_provision'
/var/www/miq/vmdb/app/models/miq_request_task/state_machine.rb:17:in `signal'
/var/www/miq/vmdb/app/models/miq_provision_task.rb:15:in `do_request'
/var/www/miq/vmdb/app/models/miq_request_task.rb:192:in `execute'
/var/www/miq/vmdb/app/models/miq_queue.rb:345:in `block in deliver'
/opt/rh/rh-ruby22/root/usr/share/ruby/timeout.rb:89:in `block in timeout'
/opt/rh/rh-ruby22/root/usr/share/ruby/timeout.rb:34:in `block in catch'
/opt/rh/rh-ruby22/root/usr/share/ruby/timeout.rb:34:in `catch'
/opt/rh/rh-ruby22/root/usr/share/ruby/timeout.rb:34:in `catch'
/opt/rh/rh-ruby22/root/usr/share/ruby/timeout.rb:104:in `timeout'
/var/www/miq/vmdb/app/models/miq_queue.rb:341:in `deliver'
/var/www/miq/vmdb/app/models/miq_queue_worker_base/runner.rb:106:in `deliver_queue_message'
/var/www/miq/vmdb/app/models/miq_queue_worker_base/runner.rb:134:in `deliver_message'
/var/www/miq/vmdb/app/models/miq_queue_worker_base/runner.rb:152:in `block in do_work'
/var/www/miq/vmdb/app/models/miq_queue_worker_base/runner.rb:146:in `loop'
/var/www/miq/vmdb/app/models/miq_queue_worker_base/runner.rb:146:in `do_work'
/var/www/miq/vmdb/app/models/miq_worker/runner.rb:334:in `block in do_work_loop'
/var/www/miq/vmdb/app/models/miq_worker/runner.rb:331:in `loop'
/var/www/miq/vmdb/app/models/miq_worker/runner.rb:331:in `do_work_loop'
/var/www/miq/vmdb/app/models/miq_worker/runner.rb:153:in `run'
/var/www/miq/vmdb/app/models/miq_worker/runner.rb:128:in `start'
/var/www/miq/vmdb/app/models/miq_worker/runner.rb:21:in `start_worker'
/var/www/miq/vmdb/app/models/miq_worker.rb:346:in `block in start'
/opt/rh/cfme-gemset/gems/nakayoshi_fork-0.0.3/lib/nakayoshi_fork.rb:24:in `fork'
/opt/rh/cfme-gemset/gems/nakayoshi_fork-0.0.3/lib/nakayoshi_fork.rb:24:in `fork'
/var/www/miq/vmdb/app/models/miq_worker.rb:344:in `start'
/var/www/miq/vmdb/app/models/miq_worker.rb:274:in `start_worker'
/var/www/miq/vmdb/app/models/miq_worker.rb:154:in `block in sync_workers'
/var/www/miq/vmdb/app/models/miq_worker.rb:154:in `times'
/var/www/miq/vmdb/app/models/miq_worker.rb:154:in `sync_workers'
/var/www/miq/vmdb/app/models/miq_server/worker_management/monitor.rb:52:in `block in sync_workers'
/var/www/miq/vmdb/app/models/miq_server/worker_management/monitor.rb:50:in `each'
/var/www/miq/vmdb/app/models/miq_server/worker_management/monitor.rb:50:in `sync_workers'
/var/www/miq/vmdb/app/models/miq_server/worker_management/monitor.rb:22:in `monitor_workers'
/var/www/miq/vmdb/app/models/miq_server.rb:361:in `block in monitor'
/var/www/miq/vmdb/gems/pending/util/extensions/miq-benchmark.rb:11:in `realtime_store'
/var/www/miq/vmdb/gems/pending/util/extensions/miq-benchmark.rb:30:in `realtime_block'
/var/www/miq/vmdb/app/models/miq_server.rb:361:in `monitor'
/var/www/miq/vmdb/app/models/miq_server.rb:381:in `block (2 levels) in monitor_loop'
/var/www/miq/vmdb/gems/pending/util/extensions/miq-benchmark.rb:11:in `realtime_store'
/var/www/miq/vmdb/gems/pending/util/extensions/miq-benchmark.rb:30:in `realtime_block'
/var/www/miq/vmdb/app/models/miq_server.rb:381:in `block in monitor_loop'
/var/www/miq/vmdb/app/models/miq_server.rb:380:in `loop'
/var/www/miq/vmdb/app/models/miq_server.rb:380:in `monitor_loop'
/var/www/miq/vmdb/app/models/miq_server.rb:265:in `start'
/var/www/miq/vmdb/lib/workers/evm_server.rb:65:in `start'
/var/www/miq/vmdb/lib/workers/evm_server.rb:92:in `start'
/var/www/miq/vmdb/lib/workers/bin/evm_server.rb:4:in `<main>'


Note You need to log in before you can comment on or make changes to this bug.