Need to propagate cinder errors to UI

Bug #1352516 reported by Cindy Lu
20
This bug affects 3 people
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
Wishlist
Radomir Dopieralski

Bug Description

Project > Volume > Create Volume fails and only shows a generic 'Error' in the table. User has to go to /var/log/cinder/volume.log to see why it failed. It would be nice to propagate the error message (or something) like the one in the volume.log: "Volume group "cinder-volumes" has insufficient free space (1279 extents): 1280 required.\n'"

Related:
I believe Instances has a nice way of letting user know the failure... it will show a new section in the Instances table:

Fault

Message
No valid host was found.
Code
500
Details
File "/opt/stack/nova/nova/scheduler/filter_scheduler.py", line 107, in schedule_run_instance raise exception.NoValidHost(reason="")
Created
Aug. 4, 2014, 6:50 p.m.

---

volume.log trace:

2014-05-09 05:15:24.365 32325 TRACE oslo.messaging.rpc.dispatcher Command: sudo cinder-rootwrap /etc/cinder/rootwrap.conf lvcreate -n volume-e78a37c4-69b5-4b02-91ea-8f8131da5062 cinder-volumes -L 5g
2014-05-09 05:15:24.365 32325 TRACE oslo.messaging.rpc.dispatcher Exit code: 5
2014-05-09 05:15:24.365 32325 TRACE oslo.messaging.rpc.dispatcher Stdout: ''
2014-05-09 05:15:24.365 32325 TRACE oslo.messaging.rpc.dispatcher Stderr: ' Volume group "cinder-volumes" has insufficient free space (1279 extents): 1280 required.\n'
2014-05-09 05:15:24.365 32325 TRACE oslo.messaging.rpc.dispatcher
2014-05-09 05:15:24.367 32325 ERROR oslo.messaging._drivers.common [req-fb3ce0ad-17a5-4e8d-bf54-f7ef58f3721c 12854cf133d442a3808b2c5f45d95cd2 31e76abd2fe64fd1af8f94e0bb06487c - - -] Returning exception Unexpected error while running command.
Command: sudo cinder-rootwrap /etc/cinder/rootwrap.conf lvcreate -n volume-e78a37c4-69b5-4b02-91ea-8f8131da5062 cinder-volumes -L 5g
Exit code: 5
Stdout: ''
Stderr: ' Volume group "cinder-volumes" has insufficient free space (1279 extents): 1280 required.\n' to caller
2014-05-09 05:15:24.368 32325 ERROR oslo.messaging._drivers.common [req-fb3ce0ad-17a5-4e8d-bf54-f7ef58f3721c 12854cf133d442a3808b2c5f45d95cd2 31e76abd2fe64fd1af8f94e0bb06487c - - -] ['Traceback (most recent call last):\n', ' File "/usr/lib/python2.6/site-packages/oslo/messaging/rpc/dispatcher.py", line 134, in _dispatch_and_reply\n incoming.message))\n', ' File "/usr/lib/python2.6/site-packages/oslo/messaging/rpc/dispatcher.py", line 177, in _dispatch\n return self._do_dispatch(endpoint, method, ctxt, args)\n', ' File "/usr/lib/python2.6/site-packages/oslo/messaging/rpc/dispatcher.py", line 123, in _do_dispatch\n result = getattr(endpoint, method)(ctxt, **new_args)\n', ' File "/usr/lib/python2.6/site-packages/cinder/volume/manager.py", line 363, in create_volume\n _run_flow()\n', ' File "/usr/lib/python2.6/site-packages/cinder/volume/manager.py", line 356, in _run_flow\n flow_engine.run()\n', ' File "/usr/lib/python2.6/site-packages/taskflow/utils/lock_utils.py", line 53, in wrapper\n return f(*args, **kwargs)\n', ' File "/usr/lib/python2.6/site-packages/taskflow/engines/action_engine/engine.py", line 111, in run\n self._run()\n', ' File "/usr/lib/python2.6/site-packages/taskflow/engines/action_engine/engine.py", line 121, in _run\n self._revert(misc.Failure())\n', ' File "/usr/lib/python2.6/site-packages/taskflow/engines/action_engine/engine.py", line 78, in _revert\n misc.Failure.reraise_if_any(failures.values())\n', ' File "/usr/lib/python2.6/site-packages/taskflow/utils/misc.py", line 558, in reraise_if_any\n failures[0].reraise()\n', ' File "/usr/lib/python2.6/site-packages/taskflow/utils/misc.py", line 565, in reraise\n six.reraise(*self._exc_info)\n', ' File "/usr/lib/python2.6/site-packages/taskflow/engines/action_engine/executor.py", line 36, in _execute_task\n result = task.execute(**arguments)\n', ' File "/usr/lib/python2.6/site-packages/cinder/volume/flows/manager/create_volume.py", line 594, in execute\n **volume_spec)\n', ' File "/usr/lib/python2.6/site-packages/cinder/volume/flows/manager/create_volume.py", line 564, in _create_raw_volume\n return self.driver.create_volume(volume_ref)\n', ' File "/usr/lib/python2.6/site-packages/cinder/volume/drivers/lvm.py", line 196, in create_volume\n mirror_count)\n', ' File "/usr/lib/python2.6/site-packages/cinder/volume/drivers/lvm.py", line 185, in _create_volume\n vg_ref.create_volume(name, size, lvm_type, mirror_count)\n', ' File "/usr/lib/python2.6/site-packages/cinder/brick/local_dev/lvm.py", line 474, in create_volume\n run_as_root=True)\n', ' File "/usr/lib/python2.6/site-packages/cinder/utils.py", line 136, in execute\n return processutils.execute(*cmd, **kwargs)\n', ' File "/usr/lib/python2.6/site-packages/cinder/openstack/common/processutils.py", line 173, in execute\n cmd=\' \'.join(cmd))\n', 'ProcessExecutionError: Unexpected error while running command.\nCommand: sudo cinder-rootwrap /etc/cinder/rootwrap.conf lvcreate -n volume-e78a37c4-69b5-4b02-91ea-8f8131da5062 cinder-volumes -L 5g\nExit code: 5\nStdout: \'\'\nStderr: \' Volume group "cinder-volumes" has insufficient free space (1279 extents): 1280 required.\\n\'\n']

Cindy Lu (clu-m)
description: updated
tags: added: error-reporting
summary: - "cinder-volumes" has insufficient free space
+ Need to propagate cinder errors to UI
Changed in horizon:
status: New → Confirmed
Doug Fish (drfish)
Changed in horizon:
importance: Undecided → Low
Revision history for this message
Erlon R. Cruz (sombrafam) wrote :

Guys where can I find directions to address this? Is there a standard way to propagate error messages between openstack services to horizon that can carry more information the HTTP error code?

Revision history for this message
Julie Pichon (jpichon) wrote :

I don't think there's a clear path at this point, because create is an asynchronous operation in Cinder and so we don't know the result when sending the API call, only that Cinder has received correctly. I wonder if there's an error field in the volume details, like there is for Nova in the instance details? (A quick look at "cinder show" seems to suggest not...)

The following cinder blueprint may be of interest but hasn't seen an ounce of interest since its creation: https://blueprints.launchpad.net/cinder/+spec/return-error-messages-to-horizon

Overall though, I'm not sure I agree with surfacing errors like details like "Volume group "cinder-volumes" has insufficient free space (1279 extents): 1280 required." to end-users. It's not something they can act upon.

anusha (anusha)
Changed in horizon:
assignee: nobody → anusha (anusha)
anusha (anusha)
Changed in horizon:
assignee: anusha (anusha) → nobody
Changed in horizon:
assignee: nobody → Radomir Dopieralski (deshipu)
Changed in horizon:
status: Confirmed → In Progress
Akihiro Motoki (amotoki)
Changed in horizon:
importance: Low → Wishlist
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (master)

Reviewed: https://review.openstack.org/446644
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=938ee35d94676b43f59eef91494ec3f75ead669f
Submitter: Jenkins
Branch: master

commit 938ee35d94676b43f59eef91494ec3f75ead669f
Author: Radomir Dopieralski <email address hidden>
Date: Thu Mar 16 18:27:03 2017 +0100

    Show volume's messages in details view

    Cinder can now show asynchronous error messages that are related to a
    volume. However, this requires microversions support.

    This patch cleans up the version and endpoint selection logic too. For
    compatibility with setups that don't follow good practices, it also
    checks for a "volume" endpoint.

    Change-Id: Ifdb7537b5208683bb0a81da9ac504d58beaedc89
    Closes-Bug: 1352516

Changed in horizon:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/horizon 12.0.0.0b3

This issue was fixed in the openstack/horizon 12.0.0.0b3 development milestone.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.