Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

virt-test: Distinguish debug output from src/dest qemus in debug.log #1340

Open
dagrh opened this issue Jan 10, 2014 · 2 comments
Open

virt-test: Distinguish debug output from src/dest qemus in debug.log #1340

dagrh opened this issue Jan 10, 2014 · 2 comments

Comments

@dagrh
Copy link
Contributor

dagrh commented Jan 10, 2014

I'm debugging migrations, and the deubg.log contains a mix of the debug output from the two qemus. It gets a bit messy to pick the debug from the two sides of the argument out.

The attached (very lightly tested) patch changes the prefix for the destination side; so it has

[qemu/dst output] instead of [qemu output]

Author: Dr. David Alan Gilbert [email protected]
Date: Fri Jan 10 11:34:51 2014 +0000

Prefix qemu output differently for destination
diff --git a/virttest/qemu_vm.py b/virttest/qemu_vm.py
index cd92589..035797c 100644
--- a/virttest/qemu_vm.py
+++ b/virttest/qemu_vm.py
@@ -1978,6 +1978,9 @@ class VM(virt_vm.BaseVM):
                                            'Check the log for traceback.')

             # Add migration parameters if required
+            qemu_op_prefix = "qemu"
+            if migration_mode != None:
+                qemu_op_prefix += "/dst"
             if migration_mode in ["tcp", "rdma", "x-rdma"]:
                 self.migration_port = utils_misc.find_free_port(5200, 6000)
                 qemu_command += (" -incoming " + migration_mode +
@@ -2030,7 +2033,7 @@ class VM(virt_vm.BaseVM):
                 self.process = aexpect.run_tail(qemu_command,
                                                 None,
                                                 logging.info,
-                                                "[qemu output] ",
+                                                "["+qemu_op_prefix+" output] ",
                                                 auto_close=False)

             logging.info("Created qemu process with parent PID %d",
@lmr
Copy link
Member

lmr commented Jan 13, 2014

Maybe the instance could be appended to [qemu output], rather than /dst. In case of multiple ping-pong migrations, there will be many /dst VMs, making the distinction not helpful.

@dagrh
Copy link
Contributor Author

dagrh commented Jan 13, 2014

I tried using the self.name in that same create method which I think should give the opportunity for things to provide a meaningful name; unfortunately at the moment for migration both halves get 'virt-tests-vm1' in the simple migration cases I'm working with, I don't know if ping-pong is more useful on that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants