Bug 1148706 - [PPC] VMPool size update not working via REST
Summary: [PPC] VMPool size update not working via REST
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine-restapi
Version: 3.4.0
Hardware: ppc64
OS: Linux
unspecified
high
Target Milestone: ---
: 3.5.0
Assignee: Vitor de Lima
QA Contact: Artyom
URL:
Whiteboard: virt
Depends On:
Blocks: 1122979 1151410 rhev3.5beta3
TreeView+ depends on / blocked
 
Reported: 2014-10-02 07:41 UTC by Artyom
Modified: 2015-11-19 02:05 UTC (History)
15 users (show)

Fixed In Version: org.ovirt.engine-root-3.5.0-15
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1151410 (view as bug list)
Environment:
Last Closed: 2015-02-17 08:27:35 UTC
oVirt Team: ---
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Proposed patch to fix the issue (2.75 KB, patch)
2014-10-02 11:18 UTC, Juan Hernández
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 33908 0 master MERGED restapi: Fix size update in pools of ppc64 VMs Never
oVirt gerrit 34012 0 ovirt-engine-3.5 MERGED restapi: Fix size update in pools of ppc64 VMs Never

Description Artyom 2014-10-02 07:41:26 UTC
Description of problem:
VMPool size update not working via REST

Version-Release number of selected component (if applicable):
rhevm-3.4.2-0.0.2.20140825gita78caee.root.el6ev.noarch

How reproducible:
Always

Steps to Reproduce:
1. Create vm pool with two vms
2. Update vm pool size via REST:
on link ovirt-engine/api/vmpools/vm_pool_id run
<vmpool>
<size>3</size>
</vmpool>
3.

Actual results:
<fault>
<reason>Operation Failed</reason>
<detail>
[Cannot edit VM-Pool. Selected operating system is not supported by the architecture.]
</detail>
</fault>

Expected results:
Update success

Additional info:
if I run with description
<vmpool>
<description>Some new description</description>
<size>3</size>
</vmpool>
Rest also show error, but description updated

Comment 1 Juan Hernández 2014-10-02 11:17:55 UTC
We already had this problem when creating VMs directly, and it was fixed by the following patch:

  core, webadmin, restapi: Fix VM creation with blank template
  http://gerrit.ovirt.org/20667

But this didn't covered the flows where VM creation is triggered internally. This means that when VMs are created for a pool the OS isn't selected correctly.

I think that the right way to solve this issue is to change the backend so that it will always automatically select the OS according to the architecture, changing the default value of VmStatic.osId to OsRepository.AUTO_SELECT_OS. We should also remove the special treatment from the REST API.

I'm attaching a patch, but I can't verify it as I don't have a PPC system to test.

Comment 2 Juan Hernández 2014-10-02 11:18:37 UTC
Created attachment 943345 [details]
Proposed patch to fix the issue

Comment 4 Michal Skrivanek 2014-10-10 10:34:44 UTC
pending 3.5 backport

Comment 5 Artyom 2014-10-15 12:13:11 UTC
We have ppc build for 3.5?

Comment 6 Vitor de Lima 2014-10-15 18:07:35 UTC
I think it would be better to use the fake ppc64 mode in the x86 builds. Install the faqemu hook add the following attributes to the vdsm.conf:

fake_kvm_support = true
fake_kvm_architecture = ppc64

Restart VDSM and the host will behave like a ppc64 host (remember to not do it if the host is inside a x86 cluster already).

Comment 7 Artyom 2014-10-20 09:45:26 UTC
Hi I did all steps that you described above, but I have error:
2014-10-20 12:34:00,730 ERROR [org.ovirt.engine.core.bll.HandleVdsCpuFlagsOrClusterChangedCommand] (DefaultQuartzScheduler_Worker-82) [6edeb7d0] Could not find server cpu for server 4ae674db-1cd0-4750-8934-40e94b0eea86:alma07.qa.lab.tlv.redhat.com, flags: powernv,model_POWER7_v2.3
2014-10-20 12:34:00,744 INFO  [org.ovirt.engine.core.bll.SetNonOperationalVdsCommand] (DefaultQuartzScheduler_Worker-82) [1227b88b] Running command: SetNonOperationalVdsCommand internal: true. Entities affected :  ID: 4ae674db-1cd0-4750-8934-40e94b0eea86 Type: VDS
2014-10-20 12:34:00,746 INFO  [org.ovirt.engine.core.vdsbroker.SetVdsStatusVDSCommand] (DefaultQuartzScheduler_Worker-82) [1227b88b] START, SetVdsStatusVDSCommand(HostName = alma07.qa.lab.tlv.redhat.com, HostId = 4ae674db-1cd0-4750-8934-40e94b0eea86, status=NonOperational, nonOperationalReason=CPU_TYPE_INCOMPATIBLE_WITH_CLUSTER, stopSpmFailureLogged=false), log id: 2f71becb
2014-10-20 12:34:00,750 INFO  [org.ovirt.engine.core.vdsbroker.SetVdsStatusVDSCommand] (DefaultQuartzScheduler_Worker-82) [1227b88b] FINISH, SetVdsStatusVDSCommand, log id: 2f71becb
2014-10-20 12:34:00,763 ERROR [org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector] (DefaultQuartzScheduler_Worker-82) [1227b88b] Correlation ID: 6edeb7d0, Call Stack: null, Custom Event ID: -1, Message: Host alma07.qa.lab.tlv.redhat.com moved to Non-Operational state as host CPU type is not supported in this cluster compatibility version or is not supported at all
2014-10-20 12:34:00,767 INFO  [org.ovirt.engine.core.bll.HandleVdsVersionCommand] (DefaultQuartzScheduler_Worker-82) [682273c3] Running command: HandleVdsVersionCommand internal: true. Entities affected :  ID: 4ae674db-1cd0-4750-8934-40e94b0eea86 Type: VDS
2014-10-20 12:34:00,768 INFO  [org.ovirt.engine.core.vdsbroker.VdsUpdateRunTimeInfo] (DefaultQuartzScheduler_Worker-82) [682273c3] Host 4ae674db-1cd0-4750-8934-40e94b0eea86 : alma07.qa.lab.tlv.redhat.com is already in NonOperational status for reason CPU_TYPE_INCOMPATIBLE_WITH_CLUSTER. SetNonOperationalVds command is skipped.

I see that my host have flags: powernv,model_POWER7_v2.3, but minimum cluster cpu is POWER8, so if I have any possibility to change fake emulation cpu from POWER7_v2.3 to POWER8?

Comment 8 Vitor de Lima 2014-10-20 11:22:07 UTC
Sure, there is a way (sorry, I thought that this patch was already applied in the VDSM version you are using).

Find the caps.py in /usr/share/vdsm and change the following lines from:

        elif targetArch == Architecture.PPC64:
            caps['cpuModel'] = 'POWER 7 (fake)'
            caps['cpuFlags'] = 'powernv,model_POWER7_v2.3'
        else:
            raise RuntimeError('Unsupported architecture: %s' % targetArch)

into this:

        elif targetArch == Architecture.PPC64:
            caps['cpuModel'] = 'POWER 8 (fake)'
            caps['cpuFlags'] = 'powernv,model_power8'
        else:
            raise RuntimeError('Unsupported architecture: %s' % targetArch)

Comment 9 Artyom 2014-10-22 13:03:51 UTC
Verified on rhevm-3.5.0-0.15.beta.el6ev.noarch

Comment 10 Omer Frenkel 2015-02-17 08:27:35 UTC
RHEV-M 3.5.0 has been released


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