Feature #2297

Improve attach disk error messages

Added by Carlos Martín almost 8 years ago. Updated about 7 years ago.

Status:ClosedStart date:09/03/2013
Priority:NormalDue date:
Assignee:Javi Fontan% Done:

0%

Category:Drivers - VM
Target version:Release 4.8
Resolution:wontfix Pull request:

Description

A failed attach disk operation returns a generic error to the user, and puts the real reason in the log files:

In Sunstone:

Fri Aug 2 12:32:44 2013 : Error attaching new VM Disk: Could not attach /var/lib/one//datastores/0/0/disk.1 (hdb) to one-0

In oned.log

Fri Aug  2 12:32:44 2013 [VMM][D]: Message received: LOG I 0 error: unsupported configuration: disk bus 'ide' cannot be hotplugged.

Fri Aug  2 12:32:44 2013 [VMM][D]: Message received: LOG E 0 Could not attach /var/lib/one//datastores/0/0/disk.1 (hdb) to one-0

History

#1 Updated by Ruben S. Montero over 7 years ago

  • Assignee set to Carlos Martín

#2 Updated by Carlos Martín over 7 years ago

  • Assignee deleted (Carlos Martín)

#3 Updated by Carlos Martín over 7 years ago

  • Target version changed from Release 4.4 to Release 4.6

Some comments about why the error message is not reported to the user in the VM template:

  • In scripts_common_sh.sh, exec_and_log accepts an optional error message.
    In this case, "Could not attach $SOURCE ($TARGET) to $DOMAIN". We could think of appending the command stderr output to this nice error explanation.
  • When the error message of exec_and_log is not provided, the sdterr output is reported to the user. But, in this case, libvirt's output is multi-line:
    error: Failed to attach device from /var/lib/one//datastores/0/3/disk.1.attach
    error: unsupported configuration: disk bus 'ide' cannot be hotplugged.
    

    And only the first line ends in the VM template. In the individual VM log file, the first line has ERROR level, while the second one is INFO:
    Mon Nov 25 17:03:56 2013 [VMM][E]: attach_disk: Command "virsh --connect qemu:///system attach-device one-3 /var/lib/one//datastores/0/3/disk.1.attach" failed: error: Failed to attach device from /var/lib/one//datastores/0/3/disk.1.attach
    Mon Nov 25 17:03:56 2013 [VMM][I]: error: unsupported configuration: disk bus 'ide' cannot be hotplugged.
    

#4 Updated by Jaime Melis over 7 years ago

  • Assignee set to Jaime Melis

#5 Updated by Jaime Melis over 7 years ago

The ruby drivers returns the following:

CANCEL 8 ERROR first line
second line

There is no way to return a multine error message

#6 Updated by Jaime Melis over 7 years ago

  • Assignee changed from Jaime Melis to Carlos Martín

#7 Updated by Ruben S. Montero over 7 years ago

  • Category changed from Core & System to Drivers - VM
  • Assignee changed from Carlos Martín to Javi Fontan
  • Target version changed from Release 4.6 to Release 4.8

#8 Updated by Ruben S. Montero about 7 years ago

  • Status changed from New to Closed
  • Resolution set to wontfix

Work will be done to improve the attach process to make it less error prone. Admin will access detailed log information through the standard places.

Also available in: Atom PDF