ManageIQ / manageiq-providers-openstack

ManageIQ plugin for the OpenStack provider.
https://www.openstack.org/
Apache License 2.0
12 stars 92 forks source link

MIQ -> Storage -> Volumes -> Add a new Cloud Volume -> MiqException::ServiceNotAvailable #824

Closed maly-glod closed 1 year ago

maly-glod commented 2 years ago

Hi, I ran into another problem with miq-openstack-provider. When trying to add a new Volume I get the error: MiqException::ServiceNotAvailable.

My environment is: OpenStack Xena:

+--------------+----------------+---------+-----------+--------------------------------------------+
| Service Name | Service Type   | Enabled | Interface | URL                                        |
+--------------+----------------+---------+-----------+--------------------------------------------+
| nova         | compute        | True    | public    | https://xxxxxxxx.xxx:8774/v2.1             |
| placement    | placement      | True    | public    | https://xxxxxxxx.xxx:8780/                 |
| barbican     | key-manager    | True    | public    | https://xxxxxxxx.xxx:9311/                 |
| heat         | orchestration  | True    | public    | https://xxxxxxxx.xxx:8004/v1/%(tenant_id)s |
| aodh         | alarming       | True    | public    | http://xxxxxxxx.xxx:8042/                  |
| octavia      | load-balancer  | True    | public    | https://xxxxxxxx.xxx:9876/                 |
| cinderv3     | volumev3       | True    | public    | https://xxxxxxxx.xxx:8776/v3/%(tenant_id)s |
| neutron      | network        | True    | public    | https://xxxxxxxx.xxx:9696/                 |
| keystone     | identity       | True    | public    | https://xxxxxxxx.xxx:5000/                 |
| gnocchi      | metric         | True    | public    | https://xxxxxxxx.xxx:8041/                 |
| designate    | dns            | True    | public    | https://xxxxxxxx.xxx:9001/                 |
| heat-cfn     | cloudformation | True    | public    | https://xxxxxxxx.xxx:8000/v1               |
| glance       | image          | True    | public    | https://xxxxxxxx.xxx:9292/                 |
+--------------+----------------+---------+-----------+--------------------------------------------+

ManageIQ Version: manageiq-openstack-najdorf-20220826.qc2 (testing this (newest?) version, becasue of problem with flavors in Najdorf-1.3 #820)

Here is a log from this call:

Sep 07 06:31:04 min-20220826 production[7027]:  INFO -- production: Processing by Api::CloudVolumesController#create as JSON
Sep 07 06:31:04 min-20220826 api[7027]:  INFO -- api: MIQ(Api::CloudVolumesController.log_request_initiated)
Sep 07 06:31:04 min-20220826 api[7027]:  INFO -- api: MIQ(Api::CloudVolumesController.log_request) API Request:    {:requested_at=>"2022-09-07 10:31:04 UTC", :method=>"POST", :url=>"https://10.14.7.212/api/cloud_volumes"}
Sep 07 06:31:04 min-20220826 api[7027]:  INFO -- api: MIQ(Api::CloudVolumesController.log_request) Authentication: {:type=>"ui_session", :token=>nil, :x_miq_group=>nil, :user=>"admin"}
Sep 07 06:31:04 min-20220826 api[7027]:  INFO -- api: MIQ(Api::CloudVolumesController.log_request) Authorization:  {:user=>"admin", :group=>"EvmGroup-super_administrator", :role=>"EvmRole-super_administrator", :tenant=>"My Company"}
Sep 07 06:31:04 min-20220826 api[7027]:  INFO -- api: MIQ(Api::CloudVolumesController.log_request) Request:        {:method=>:post, :action=>"create", :fullpath=>"/api/cloud_volumes", :url=>"https://10.14.7.212/api/cloud_volumes", :base=>"https://10.14.7.212", :path=>"/api/cloud_volumes", :prefix=>"/api", :version=>"4.4.0-pre", :api_prefix=>"https://10.14.7.212/api", :collection=>"cloud_volumes", :c_suffix=>nil, :collection_id=>nil, :subcollection=>nil, :subcollection_id=>nil}
Sep 07 06:31:04 min-20220826 api[7027]:  INFO -- api: MIQ(Api::CloudVolumesController.log_request) Parameters:     {"action"=>"create", "controller"=>"api/cloud_volumes", "format"=>"json", "body"=>{"ems_id"=>"10", "name"=>"miq-test1", "size"=>"10737418240", "cloud_tenant_id"=>"6"}}
Sep 07 06:31:04 min-20220826 evm[7027]:  INFO -- evm: MIQ(MiqQueue.put) Message id: [411], Zone: [default], Role: [ems_operations], Server: [], MiqTask id: [19], Handler id: [], Ident: [generic], Target id: [], Instance id: [], Task id: [], Command: [CloudVolume.create_volume], Timeout: [600], Priority: [100], State: [ready], Deliver On: [], Data: [], Args: [10, {"ems_id"=>"10", "name"=>"miq-test1", "size"=>"10737418240", "cloud_tenant_id"=>"6"}]
Sep 07 06:31:04 min-20220826 evm[7027]:  INFO -- evm: MIQ(MiqTask.generic_action_with_callback) Task: [19] Queued the action: [creating Cloud Volume for user admin] being run for user: [admin]
Sep 07 06:31:04 min-20220826 api[7027]:  INFO -- api: MIQ(Api::CloudVolumesController.log_result) Result: success=true
Sep 07 06:31:04 min-20220826 api[7027]:  INFO -- api: MIQ(Api::CloudVolumesController.log_result) Result: message=Creating Cloud Volume miq-test1 for Provider os-cloud-provider Cinder Manager
Sep 07 06:31:04 min-20220826 api[7027]:  INFO -- api: MIQ(Api::CloudVolumesController.log_result) Result: task_id=19
Sep 07 06:31:04 min-20220826 api[7027]:  INFO -- api: MIQ(Api::CloudVolumesController.log_result) Result: task_href=https://10.14.7.212/api/tasks/19
Sep 07 06:31:04 min-20220826 api[7027]:  INFO -- api: MIQ(Api::CloudVolumesController.log_result) Result: href=https://10.14.7.212/api/cloud_volumes/
Sep 07 06:31:04 min-20220826 api[7027]:  INFO -- api: MIQ(Api::CloudVolumesController.log_request) Response:       {:completed_at=>"2022-09-07 10:31:04 UTC", :size=>"0.230 KBytes", :time_taken=>"0.058 Seconds", :status=>200}
Sep 07 06:31:04 min-20220826 production[7027]:  INFO -- production: Completed 200 OK in 59ms (Views: 0.2ms | ActiveRecord: 20.6ms | Allocations: 10732)
Sep 07 06:31:05 min-20220826 evm[6963]:  INFO -- evm: MIQ(ManageIQ::Providers::Openstack::CloudManager#with_provider_connection) Connecting through ManageIQ::Providers::Openstack::CloudManager: [os-cloud-provider]
Sep 07 06:31:05 min-20220826 fog[6963]:  WARN -- fog: MIQ(Class#raw_connect) Service Volume not available for openstack provider https://10.14.15.1:5000
Sep 07 06:31:06 min-20220826 evm[6963]: ERROR -- evm: MIQ(ManageIQ::Providers::Openstack::StorageManager::CinderManager::CloudVolume.raw_create_volume) volume=[miq-test1], error: MiqException::ServiceNotAvailable
Sep 07 06:31:06 min-20220826 evm[6963]: ERROR -- evm: MIQ(MiqQueue#deliver) Message id: [411], Error: [MiqException::ServiceNotAvailable]
Sep 07 06:31:06 min-20220826 evm[6963]:  INFO -- evm: MIQ(MiqQueue#delivered) Message id: [411], State: [error], Delivered in [0.313856661] seconds
Sep 07 06:31:06 min-20220826 evm[6963]:  INFO -- evm: MIQ(MiqQueue#m_callback) Message id: [411], Invoking Callback with args: ["Finished", "error", "MiqException::ServiceNotAvailable", "nil"]
Sep 07 06:31:06 min-20220826 evm[6963]:  INFO -- evm: MIQ(MiqTask#update_status) Task: [19] [Finished] [Error] [MiqException::ServiceNotAvailable]

Below same pics: Screenshot 2022-09-07 at 12 30 48 Screenshot 2022-09-07 at 12 31 11

We are using Ceph as storage backend, but MIQ doesn't show allready present volumes. OpenStack: Screenshot 2022-09-07 at 13 20 29 MIQ: Screenshot 2022-09-07 at 13 13 01

Does manageiq-openstack-provider supports Ceph based backend?

Fryguy commented 2 years ago

@agrare Can you take a look at this one?

maly-glod commented 2 years ago

Hi @agrare,

did you manage to look at this issue?

maly-glod commented 1 year ago

Hi this problem still exist in official Oparin OpenStack image.

miq-bot commented 1 year ago

This issue has been automatically marked as stale because it has not been updated for at least 3 months.

If you can still reproduce this issue on the current release or on master, please reply with all of the information you have about it in order to keep the issue open.

Thank you for all your contributions! More information about the ManageIQ triage process can be found in the triage process documentation.

aplcom commented 1 year ago

is this problem resolved? I am getting a similar error on Lasker version.

maly-glod commented 1 year ago

is this problem resolved?

I don't think so.

miq-bot commented 1 year ago

This issue has been automatically closed because it has not been updated for at least 3 months.

Feel free to reopen this issue if this issue is still valid.

Thank you for all your contributions! More information about the ManageIQ triage process can be found in the triage process documentation.

maly-glod commented 1 year ago

I can confirm, that problem is solved in Petrosian-1. There is one small bug in the UI itself, but it does not interfere with use. According to UI, the size of the new created Volume is to be given in bytes, but in fact they are Gigabytes.

agrare commented 1 year ago

Okay thanks @maly-glod

cc @jeffibm can you investigate the volume size display issue?

jeffibm commented 1 year ago

An API is requested - http://localhost:3000/api/cloud_volumes?ems_id=${id} when we change the Storage Manager field.

Please see the response of data.form_schema.fields[0] which contains the Size (in bytes), which is a number field and has steps: 1073741824.

We can type in a number say 1, but when we hit the +, it says 1073741825

image

When we hit the form submit, the data is taken to an API - /api/cloud_volumes/${recordId} image

The Size in the list and summary pages are displayed in GB. It's only being used as Bytes on the form page.