Skip to content

Commit

Permalink
Merge pull request #5859 from liang-cong-red-hat/guest_numa_node_chan…
Browse files Browse the repository at this point in the history
…ge_pattern

Change grep pattern to avoid occasional memory size and address conflict
  • Loading branch information
Yingshun authored Aug 27, 2024
2 parents c376953 + 0209dd7 commit 42fa415
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion provider/numa/numa_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ def get_host_numa_memory_alloc_info(mem_size):
:param mem_size: int, the vm memory size
:return: str, the matched output in numa_maps
"""
cmd = 'grep -B1 %s /proc/`pidof qemu-kvm`/smaps' % mem_size
cmd = 'grep -B1 "%s " /proc/`pidof qemu-kvm`/smaps' % mem_size
out = process.run(cmd, shell=True, verbose=True).stdout_text.strip()
matches = re.findall('(\w+)-', out)
if not matches:
Expand Down

0 comments on commit 42fa415

Please sign in to comment.