Bug 1088914 - Not possible change vm cpu pinning via cli
Summary: Not possible change vm cpu pinning via cli
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine-cli
Version: 3.4.0
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
: 3.5.0
Assignee: Juan Hernández
QA Contact: Artyom
URL:
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-3.5.0.0-1.el6_5
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-02-11 18:10:11 UTC
oVirt Team: Infra
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:0185 0 normal SHIPPED_LIVE rhevm-cli bug fix and enhancement update 2015-02-11 22:39:13 UTC
oVirt gerrit 27078 0 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:
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


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