Bug 918221 - FEAT: fv_* should print guest console log if --debug set
Summary: FEAT: fv_* should print guest console log if --debug set
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Hardware Certification Program
Classification: Retired
Component: Test Suite (tests)
Version: 1.7
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: Greg Nichols
QA Contact: Qian Cai
URL:
Whiteboard:
Depends On: 815595
Blocks: 918220 975372
TreeView+ depends on / blocked
 
Reported: 2013-03-05 18:06 UTC by Rob Landry
Modified: 2016-06-03 13:56 UTC (History)
5 users (show)

Fixed In Version: hwcert-client-1.7.0-33
Doc Type: Bug Fix
Doc Text:
Clone Of: 815595
: 975372 (view as bug list)
Environment:
Last Closed: 2015-07-13 14:20:11 UTC
Embargoed:


Attachments (Terms of Use)
add logging of guest console if --debug is set (6.76 KB, patch)
2013-04-10 17:27 UTC, Greg Nichols
no flags Details | Diff

Description Rob Landry 2013-03-05 18:06:21 UTC
+++ This bug was initially created as a clone of Bug #815595 +++

Description of problem:

Current v7 prompts user to observe guest via 'virsh console <domain>'. This is expected to print automatically if --debug is set. 

e.g. # v7 run -t fv_storage --debug low
// guest console output

Version-Release number of selected component (if applicable):
v7-1.5

Additional info:
This feature may help debug guest failures such as kernel panic/hang or guest time-out problem because under that circumstance we cannot get v7 log in guest.

--- Additional comment from Guangze Bai on 2012-04-23 22:55:48 EDT ---

Created attachment 579735 [details]
patch for fvtest.py

This patch is draft and should be polished like idiomatic Python.

--- Additional comment from Greg Nichols on 2012-04-25 09:07:15 EDT ---


I'm not sure this is worth doing.   if the debugging session is being attended, then the user can put v7 in the background and run "virsh console v7<arch".

In any case, it's too large a change for 1.5.

--- Additional comment from Caspar Zhang on 2012-10-31 04:06:20 EDT ---

clearing dev flag per comment 2. I think it's a bit late for v7-1.6.4..

--- Additional comment from Rob Landry on 2012-12-13 17:11:55 EST ---

Clearing ack flags, as no release is currently proposed.

Comment 1 Brian Brock 2013-03-25 19:45:22 UTC
see bug 815595 comment 6 - more info useful, testable, not yet setting qa_ack.

Comment 2 Greg Nichols 2013-04-10 17:27:03 UTC
Created attachment 733811 [details]
add logging of guest console if --debug is set

Comment 4 Lingzhu Xiang 2013-06-05 06:47:27 UTC
When guest_console.log is not saved, the test dies in an exception. Log:



Submitted tests: hwcert-backend run   --mode auto --test core
Warning: "virsh start hwcert-x86_64" has output on stderr
error: Failed to start domain hwcert-x86_64
error: internal error process exited while connecting to monitor: char device redirected to /dev/pts/1 (l
abel charserial0)
Could not access KVM kernel module: Permission denied
failed to initialize KVM: Permission denied

fv_core test is running, it takes some time(less than 60 minutes), please be patient ...
You may use "virsh console hwcert-x86_64" to monitor the testing progress
Warning: debug could not display virsh console log.
"virsh ttyconsole hwcert-x86_64" no match for regular expression ^/dev.*$
Guest has shutdown
Traceback (most recent call last):
  File "/usr/bin/hwcert-backend", line 45, in <module>
    success = hwcertBackend.do(args)
  File "/usr/share/hwcert/lib/hwcert/backend.py", line 182, in do
    result = self.commands[self.command]()
  File "/usr/share/hwcert/lib/hwcert/harness.py", line 394, in doRun
    return self._doRun(tests)
  File "/usr/share/hwcert/lib/hwcert/harness.py", line 500, in _doRun
    returnValue = self.runTest(tmpDirectory, test, run, outputFilePath)
  File "/usr/share/hwcert/lib/hwcert/harness.py", line 924, in runTest
    rv = test.run()
  File "/usr/share/hwcert/lib/hwcert/fvtest.py", line 569, in run
    if not self.runGuest():
  File "/usr/share/hwcert/lib/hwcert/fvtest.py", line 503, in runGuest
    log = open("guest_console.log")
IOError: [Errno 2] No such file or directory: 'guest_console.log'

Comment 5 Lingzhu Xiang 2013-06-05 08:55:52 UTC
Besides the above problem needing more robust handling of opening the file, guest_console.log is saved fine. 

The log file is saved in /tmp/hwcert-$random_directory instead of getting printed on stdout/err of hwcert. This could be improved.

Comment 6 Lingzhu Xiang 2013-06-18 09:32:19 UTC
As we deal with the above traceback in bug 975372, set this bug to verified.

Comment 8 brose 2015-07-13 14:20:11 UTC
Closing as hwcert-client is obsolete.
Please use redhat-certification-hardware instead.


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