qemu_regex_fix: Regex change for future qemu versions info cpu 77/63377/1
authorChristian Trautman <ctrautma@redhat.com>
Tue, 9 Oct 2018 17:29:11 +0000 (13:29 -0400)
committerChristian Trautman <ctrautma@redhat.com>
Tue, 9 Oct 2018 17:29:11 +0000 (13:29 -0400)
When running info cpus command on qemu newer versions of 2.12
the output has changed. This is causing the regex lookup for
the thread match to affinitize the PID to the correct CPU.

JIRA: VSPERF-592

Change-Id: Ie3a4490f3f8da1e4df00c7095cf1f05fdd939e07
Signed-off-by: Christian Trautman <ctrautma@redhat.com>
vnfs/qemu/qemu.py

index 7ba58c0..d3e1b34 100644 (file)
@@ -210,7 +210,7 @@ class IVnfQemu(IVnf):
 
         :returns: None
         """
-        thread_id = (r'.* CPU #%d: .* thread_id=(\d+)')
+        thread_id = (r'.* CPU #%d:.*? thread_id=(\d+)')
 
         self._logger.info('Affinitizing guest...')