Zun

Claim resources for container

Bug #1688175 reported by hongbin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Zun
Fix Committed
High
Shunli Zhou

Bug Description

Nova compute claims resource for instance:

  https://github.com/openstack/nova/blob/master/nova/compute/resource_tracker.py#L103

Zun needs to claim resources for containers as well, otherwise, filter scheduler (https://review.openstack.org/#/c/461688/) won't work properly.

hongbin (hongbin034)
Changed in zun:
importance: Undecided → High
status: New → Triaged
Revision history for this message
Shunli Zhou (shunliz) wrote :

@hongbin, I think the nova claim is try to consume from user quota and track quota usage. In zun, there is no quota control now. So the container consumed CPU will tracked by the dockerd, and zun compute node will get the real consumed CPU from dockerd periodically.

Seems so far so good to me, for claim from compute node, maybe we need to claim when quota control is add to zun.

What do you think?

Revision history for this message
Shunli Zhou (shunliz) wrote :

Sorry for not dig into the Nova claim before, I take back what i said, instance_claim do not have much relationship with the quota control.

After I dig into the nova instance_claim, i still not sure if we need the to claim in zun.

@hongbin, cloud you explain what will fail if we do not do claim in zun?
Does your concern is the zun compute has consumed resource from compute node and the zun api(scheduler) does not aware the consumption? and will make wrong schedule decision?

Shunli Zhou (shunliz)
Changed in zun:
assignee: nobody → Shunli Zhou (shunliz)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to zun (master)

Fix proposed to branch: master
Review: https://review.openstack.org/463638

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to zun (master)

Reviewed: https://review.openstack.org/463638
Committed: https://git.openstack.org/cgit/openstack/zun/commit/?id=67eedb807290b6d7a3c6c2bb6e9296b5c16d3959
Submitter: Jenkins
Branch: master

commit 67eedb807290b6d7a3c6c2bb6e9296b5c16d3959
Author: ShunliZhou <email address hidden>
Date: Wed May 10 09:49:07 2017 +0800

    Add resource claim for zun.

    Add resource claim when create container and resource tracker to
    update periodically. Now only track and claim memory and cpu
    resource.

    The following work need to do:
    1, Remove claim resource when delete container.
    2, Track the numa of compute node.
    3, Filter scheduler set the Claim limits.
    4, Handle the inventory and allocation.

    Change-Id: I54199742921ce71b58f23d968a966d4b269f51ef
    Close-Bug: #1688175
    Partially-Implements: blueprint resource-claim

Shunli Zhou (shunliz)
Changed in zun:
status: Triaged → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.