Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1088914

Summary: Not possible change vm cpu pinning via cli
Product: Red Hat Enterprise Virtualization Manager Reporter: Artyom <alukiano>
Component: ovirt-engine-cliAssignee: Juan Hernández <juan.hernandez>
Status: CLOSED ERRATA QA Contact: Artyom <alukiano>
Severity: high Docs Contact:
Priority: unspecified    
Version: 3.4.0CC: alukiano, gchaplik, gklein, iheim, juan.hernandez, mavital, oramraz, rbalakri, Rhev-m-bugs, sherold, yeylon
Target Milestone: ---   
Target Release: 3.5.0   
Hardware: x86_64   
OS: Linux   
Whiteboard: infra
Fixed In Version: rhevm-cli-3.5.0.0-1.el6_5 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-02-11 18:10:11 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Infra RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1122546    
Bug Blocks: 1142923, 1156165    

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:
ERROR
" vcpu_pin.cpu_set=0" is invalid segment at option "--cpu-cpu_tune-vcpu_pin".
================================================================================

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

How reproducible:
Always

Steps to Reproduce:
1. See above
2.
3.

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:
0#1,2,3

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 3.5.0.0 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-3.5.0.0-1.el6_5, 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-3.5.0.2-1.el6.noarch?
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-3.5.0.2-1.el6.noarch?
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-3.5.0.4-1.20140820.git374a657.el6.noarch

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.

https://rhn.redhat.com/errata/RHBA-2015-0185.html