+++ This bug was initially created as a clone of Bug #1146457 +++ Description of problem: Version-Release number of selected component (if applicable): rhevm-cli-3.5.0.4-1.el6ev.noarch.rpm How reproducible: always Steps to Reproduce: 1. run command: update host 'hostX' --storage_manager-priority 5 Actual results: send: 'PUT /api/hosts/a5898cff-8836-4d60-ba85-c3219937beae HTTP/1.1\r\nHost: jenkins-vm-10.scl.lab.tlv.redhat.com\r\nAccept-Encoding: identity\r\nContent-Length: 93\r\nSession-TTL: 3600\r\nPrefer: persistent-auth\r\nCorrelation-Id: hosts_update_508dc25b-9098-4eee\r\nAccept: application/xml\r\nFilter: False\r\ncookie: JSESSIONID=EfGmN01Nlx3gddnOyjeyLCeC\r\nContent-type: application/xml\r\nAuthorization: Basic dXNlcnBvcnRhbDFAcWEubGFiLnRsdi5yZWRoYXQuY29tOjEyMzQ1Ng==\r\n\r\n' send: '<host id="a5898cff-8836-4d60-ba85-c3219937beae">\n <storage_manager priority="5"/>\n</host>\n' reply: 'HTTP/1.1 400 Bad Request\r\n' header: Date: Wed, 17 Sep 2014 20:18:34 GMT^M header: JSESSIONID: EfGmN01Nlx3gddnOyjeyLCeC^M header: Content-Type: application/xml^M header: Content-Length: 179^M header: Vary: Accept-Encoding^M header: Connection: close^M ^MESC[KESC[?1lESC>ESC[1;31m ERROR status: 400^M reason: Bad Request^M detail: Value "" isn't a valid boolean, it should be "true" or "false" ESC[1;m Expected results: Update successfully. Additional info: Works fine in javasdk. Worked fine in 3.4 rhevm-cli. --- Additional comment from Juan Hernández on 2014-09-25 07:05:28 EDT --- It isn't possible to restore the previous behavior, but we will introduce a new --spm-priority option that will work correctly and with the same meaning. --- Additional comment from Juan Hernández on 2014-09-25 07:08:35 EDT --- Note that this needs to be fixed in the engine, then the Python SDK needs to be regenerated. --- Additional comment from RHEL Product and Program Management on 2014-09-25 07:11:39 EDT --- This bug report has Keywords: Regression or TestBlocker. Since no regressions or test blockers are allowed between releases, it is also being identified as a blocker for this release. Please resolve ASAP.
Created attachment 944191 [details] Proposed patch to fix the issue
public static void main(String[] args) throws Exception{ Api api = new Api(URL, user, password, true, false); org.ovirt.engine.sdk.decorators.Host host = api.getHosts().get(host_name); System.out.println("Old SPM priority value is: "+ host.getSpm().getPriority()); SPM spm = new SPM(); spm.setPriority(5); host.setSpm(spm); Host h = host.update(); System.out.println("New SPM priority value is: "+ h.getSpm().getPriority()); api.shutdown(); } # ./run.sh Old SPM priority value is: 10 New SPM priority value is: 5
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-0184.html