Bug 1690851 - [RFE] Add CPU throttling in model
Summary: [RFE] Add CPU throttling in model
Keywords:
Status: CLOSED EOL
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: V2V
Version: 5.10.2
Hardware: All
OS: All
medium
medium
Target Milestone: GA
: 5.12.0
Assignee: Fabien Dupont
QA Contact: Md Nadeem
Red Hat CloudForms Documentation
URL:
Whiteboard: v2v
Depends On:
Blocks: 1683443 1702085 1768518
TreeView+ depends on / blocked
 
Reported: 2019-03-20 10:55 UTC by Fabien Dupont
Modified: 2020-03-25 18:03 UTC (History)
8 users (show)

Fixed In Version: 5.11.0.1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1702085 1768518 (view as bug list)
Environment:
Last Closed: 2020-03-25 18:03:45 UTC
Category: ---
Cloudforms Team: V2V
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Fabien Dupont 2019-03-20 10:55:30 UTC
Description of problem:
In a previous BZ, we introduced default values for CPU and network limits in the settings. It is now time to add the model code to leverage the CPU and network limits and the conversion host level.

Comment 2 Fabien Dupont 2019-03-20 10:57:42 UTC
Add put_file method - https://github.com/ManageIQ/manageiq-gems-pending/pull/426

Comment 3 Fabien Dupont 2019-03-20 11:33:44 UTC
Add CPU and network throttling in model - https://github.com/ManageIQ/manageiq/pull/18576

Comment 4 Mike Turley 2019-04-10 17:41:44 UTC
This is the associated UI PR for this BZ: https://github.com/ManageIQ/manageiq-v2v/pull/915

Comment 7 Mike Turley 2019-06-10 17:36:41 UTC
Fabien, I noticed that the UI change to add the CPU throttling field was not backported to hammer yet, because this BZ was moved to target 5.11. We also never merged a change to add the network throttling field because the last I heard, it was still not working in the backend.

1) Should the CPU throttling be backported now and only the network throttling be released in 5.11? or is it okay to wait and release both in 5.11? we may need to break this into two BZs with different target releases.
2) What is the status of the network throttling changes on the backend? Should we make the UI change to enable that in master? I ask because I notice this BZ is marked "Fixed in 5.11.0.1".

Comment 9 Mike Turley 2019-06-10 18:02:23 UTC
Oops, I retract my assumption that it wasn't backported because this is targeting 5.11, since I didn't notice the 5.10.7 BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1702085
The duplicate BZs for backporting still confuse me :)

Comment 10 Yadnyawalk Tale 2019-08-08 15:53:01 UTC
I can see only 'Max CPU utilization per conversion host' in UI which is expected as per Comment #7 and validation is also working.

But I am not able to understand what to test here. I followed similar steps like https://bugzilla.redhat.com/show_bug.cgi?id=1702085#c6. I have set CPU to 10% and ran migration with 3 vms and 2 conversion host added but I did not saw any restriction/throttling working. What is the expected behavior here?

Comment 11 Fabien Dupont 2019-09-07 06:25:35 UTC
Moving back to ON_DEV until test scenario has been provided.

Comment 12 Fabien Dupont 2019-09-09 20:39:10 UTC
https://github.com/ManageIQ/manageiq/pull/19277

Comment 13 Fabien Dupont 2019-09-09 20:42:02 UTC
To test this feature:

1. Start a migration plan with only one VM
2. Check on the conversion host that the "qemu-img convert" process does consume more than 1% of CPU (top).
3. In Migration Settings, set the CPU limit value to 1.
2. Check on the conversion host that the "qemu-img convert" process does consume less than 1% of CPU (top).

Comment 14 Fabien Dupont 2019-09-10 10:15:54 UTC
Another test is that the migration task stores the limits.
For a migration task for a VM named 'test-vm', this could be tested like this:

irb> ServiceTemplateTransformationPlanTask.all.select { |t| t.source.name == 'test-vm' }.last.options[:virtv2v_limits]
=> {:cpu=>"1", :network=>"unlimited"}

Then, on the conversion host, the virt-v2v-wrapper state file would reflect that:

# cat /tmp/v2v-import-20190909T161150-5397.state | python -m json.tool
{
    "disk_count": 1,
    "disks": [
        {
            "path": "[NFS_Datastore] test-vm/test-vmvmdk",
            "progress": 49.2
        }
    ],
    "failed": false,
    "finished": false,
    "last_message": {
        "message": "Failed to set network limit",
        "type": "error"
    },
    "pid": 5507,
    "started": true,
    "throttling": {
        "cpu": "1%",
        "network": "unlimited"
    }
}

Comment 15 Mike Turley 2019-09-12 14:15:03 UTC
Fabien, is this BZ still only including CPU throttling, or is network throttling making a return? I was just confused by the title of the BZ. If we are reintroducing network throttling, we'll need to make a UI change.

Comment 16 Fabien Dupont 2019-09-12 14:20:44 UTC
It's only about CPU so far, as virt-v2v-wrapper doesn't handle network correctly yet. I updated the BZ title.

Comment 17 Ilanit Stein 2019-09-15 09:18:24 UTC
Fabien/Satoe,

Can this bug move to ON_QA please?

Comment 18 Fabien Dupont 2019-09-16 08:51:16 UTC
@Ilanit, this BZ is targeted for CFME 5.11.1 and there's no build so far. It will move to ON_QA once the build is available.


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