-
Notifications
You must be signed in to change notification settings - Fork 243
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
libvirt_numa: Fix parsing of continuous numa nodes #3804
libvirt_numa: Fix parsing of continuous numa nodes #3804
Conversation
@dzhengfy Could you please take a look? |
If node list is [0, 2, 3, 5], return 1 | ||
If node list is [1, 4, 8], return -1 | ||
If node list is [0, 1, 2, 3], return "0-3" | ||
If node list is [0, 2, 3, 4], return "-1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel we should return "2-4" if node list is [0, 2, 3, 4]
fca8cb2
to
c0a225c
Compare
@dzhengfy I have written a new func to convert all online numa nodes to a string, PTAL. The CI failure should be anther issue. |
node_ranges.append(f"{start_node}-{end_node}") | ||
|
||
converted_numa_nodes = ",".join(node_ranges) | ||
LOG.debug("Convert output for all online numa nodes: '%s'" % converted_numa_nodes) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
% -> ','
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated.
Others LGTM |
c0a225c
to
ce4caa6
Compare
In some cases, we need a string representation of all online numa nodes. Signed-off-by: Hu Shuai <[email protected]>
Fix parsing of continuous numa nodes.
Parsing result without the patch:
Testing result without the patch:
Parsing result with the patch:
Testing result with the patch: