virsh power controller pexpect code does not write login errors to a log for diagnostics

Bug #1381191 reported by Mike McCracken
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
MAAS
Invalid
Medium
Unassigned

Bug Description

I am debugging an issue where maas complains that 'virsh failed with return code 1: failed to login to virsh console'.
looking at virsh.py, this happens when VirshSSH.login() returns False, which happens if it gets something other than the 'virsh #' prompt.
However, nothing is logged and I have to guess what the actual message was.

Ideally, this code would log its error message somewhere, and the error message that maas shows could point me there.

Tags: log power ui
Changed in maas:
status: New → Triaged
importance: Undecided → Medium
Revision history for this message
Julian Edwards (julian-edwards) wrote :

This should be logged in the node's event log from the 1.7 release onwards, can you check please?

Changed in maas:
status: Triaged → Incomplete
Revision history for this message
Mike McCracken (mikemc) wrote :

Julian, the node's event log is what's shown on the node page in the web UI in 1.7, right?

I apologize that I wasn't clearer in the description - when I said 'maas complains that ' "virsh failed with return code 1: failed to login to virsh console", that's the exact string that I see in the event log on that page. If there is a more detailed log somewhere, I'd be interested to know -- however, I've also looked at virsh.py in maas, and it is pretty clear that no further detail is written:

"failed to login..." is the VirshError raised by a few functions in there if the conn.login() call returns False.
looking at VirshSSH.login(), I see that if it doesn't get a cert prompt, a password prompt, or a regular 'virsh #' prompt, it will simply close the connection and return False - but doesn't write anything.

Specifically, I looked at the comment on line 91-92 that says 'Something bad happened, either disconnect, timeout, wrong password', and wished that the something had been written to a log somewhere.

Revision history for this message
Julian Edwards (julian-edwards) wrote :

Ok thanks for the clarification Mike. Have a look in /var/log/maas/maas.log as well, you might see more info.

Changed in maas:
status: Incomplete → Triaged
tags: added: log power ui
Christian Reis (kiko)
Changed in maas:
milestone: none → next
Christian Reis (kiko)
Changed in maas:
milestone: next → 1.7.1
Changed in maas:
milestone: 1.7.1 → 1.7.2
Changed in maas:
milestone: 1.7.2 → 1.7.3
Changed in maas:
milestone: 1.7.3 → next
Changed in maas:
status: Triaged → Invalid
Changed in maas:
milestone: next → none
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.