Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1088914 - Not possible change vm cpu pinning via cli
Summary: Not possible change vm cpu pinning via cli
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine-cli
Version: 3.4.0
Hardware: x86_64
OS: Linux
Target Milestone: ---
: 3.5.0
Assignee: Juan Hernández
QA Contact: Artyom
Whiteboard: infra
Depends On: 1122546
Blocks: rhev3.5beta 1156165
TreeView+ depends on / blocked
Reported: 2014-04-17 12:32 UTC by Artyom
Modified: 2016-02-10 19:12 UTC (History)
11 users (show)

Fixed In Version: rhevm-cli-
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2015-02-11 18:10:11 UTC
oVirt Team: Infra
Target Upstream Version:

Attachments (Terms of Use)

System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:0185 normal SHIPPED_LIVE rhevm-cli bug fix and enhancement update 2015-02-11 22:39:13 UTC
oVirt gerrit 27078 master MERGED cli: Escape comma in values Never

Description Artyom 2014-04-17 12:32:12 UTC
Description of problem:
Not possible change vm cpu pinning via cli, so if you run this command:
update vm test_vm --cpu-cpu_tune-vcpu_pin "vcpu_pin.vcpu=0, vcpu_pin.cpu_set=0"
you will receive error:
" vcpu_pin.cpu_set=0" is invalid segment at option "--cpu-cpu_tune-vcpu_pin".

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

How reproducible:

Steps to Reproduce:
1. See above

Actual results:
When trying to change cpu pinning under vm, appear error

Expected results:
vm updated success with new cpu pinning

Additional info:

Comment 1 Juan Hernández 2014-04-21 10:15:48 UTC
Note that spaces aren't allowed the value of the "--cpu-cpu_tune-vcpu_pin" option.

Comment 2 Scott Herold 2014-04-23 12:48:43 UTC
Artyom,  Can you re-test the cli command without the space between parameters and determine if that resolves the issue?

Comment 3 Artyom 2014-04-24 14:10:25 UTC
My mistake, it update fine without space, but is still have problem when I try to run something like this:
via UI 0#0-3,^1 works fine
via CLI:
update vm cpupin_vm1  --cpu-cpu_tune-vcpu_pin "vcpu_pin.vcpu=0,vcpu_pin.cpu_set=0-3,^1"
 "^1" is invalid segment at option "--cpu-cpu_tune-vcpu_pin".
and also this one failed:
update vm test_vm  --cpu-cpu_tune-vcpu_pin "vcpu_pin.vcpu=0,vcpu_pin.cpu_set=1,2,3"
UI parameters:

Comment 4 Juan Hernández 2014-04-25 18:51:57 UTC
The problem is that the commas inside the value of the option confuse the parser. The solution in the proposed patch is to use the backslash character to escape the comma as separator, so if the value of the "cpu_set" item includes commas it can be written as follows:

  # update vm test_vm --cpu-cpu_tune-vcpu_pin "vcpu_pin.vcpu=0,vcpu_pin.cpu_set=1\,2\,3"

Comment 5 Juan Hernández 2014-05-23 13:21:58 UTC
This issue has been fixed in version of the upstream CLI. It will be fixed downstream with the next rebase.

Comment 6 Juan Hernández 2014-07-03 15:03:39 UTC
This fix is contained in rhevm-cli-, already available in brew.

Comment 9 Artyom 2014-07-25 09:10:05 UTC
Can you please say me if patch already included to ovirt-engine-cli-
Because I see that command of format:
update vm cpupin_vm1  --cpu-cpu_tune-vcpu_pin "vcpu_pin.vcpu=0,vcpu_pin.cpu_set=0\,1"

Not really do any change on vm.

Comment 10 Artyom 2014-07-25 09:10:18 UTC
Can you please say me if patch already included to ovirt-engine-cli-
Because I see that command of format:
update vm cpupin_vm1  --cpu-cpu_tune-vcpu_pin "vcpu_pin.vcpu=0,vcpu_pin.cpu_set=0\,1"

Not really do any change on vm.

Comment 11 Juan Hernández 2014-07-25 09:34:12 UTC
Yes, the change is included in that version of the package. However there is a different issue with the latest version of the Python SDK (bug 1122546) that basically means that all updates fail. If you want to test this bug you will need to downgrade the Python SDK to the previous version.

Comment 12 Artyom 2014-09-01 09:14:13 UTC
Verified on ovirt-engine-cli-

Comment 14 errata-xmlrpc 2015-02-11 18:10:11 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

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