← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1367349] [NEW] ironic: Not listing all nodes registered in Ironic due pagination

 

Public bug reported:

Ironic API supports pagination and limit the number of items returned by
the API based on a config option called ''max_limit", by default a max
of 1000 items is returned per request [1].

The Ironic client library by default respect that limit, so when the
Nova Ironic driver list the nodes for reasons like verifying how many
resources  we have available etc... We can hit that limit and the wrong
information will be passed to nova.

Luckly, the ironic client supports passing a limit=0 flag when listing
resources as an indicator to the lib to continue pagination until
there're no more resources to be returned [2]. We need to update the
calls in the Nova Ironic driver to make sure we get all items from the
API when needed.

 [1] https://github.com/openstack/ironic/blob/master/ironic/api/__init__.py#L26-L29
 [2] https://github.com/openstack/python-ironicclient/blob/master/ironicclient/v1/node.py#L52

** Affects: nova
     Importance: Undecided
     Assignee: Lucas Alvares Gomes (lucasagomes)
         Status: New

** Changed in: nova
     Assignee: (unassigned) => Lucas Alvares Gomes (lucasagomes)

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1367349

Title:
  ironic: Not listing all nodes registered in Ironic due pagination

Status in OpenStack Compute (Nova):
  New

Bug description:
  Ironic API supports pagination and limit the number of items returned
  by the API based on a config option called ''max_limit", by default a
  max of 1000 items is returned per request [1].

  The Ironic client library by default respect that limit, so when the
  Nova Ironic driver list the nodes for reasons like verifying how many
  resources  we have available etc... We can hit that limit and the
  wrong information will be passed to nova.

  Luckly, the ironic client supports passing a limit=0 flag when listing
  resources as an indicator to the lib to continue pagination until
  there're no more resources to be returned [2]. We need to update the
  calls in the Nova Ironic driver to make sure we get all items from the
  API when needed.

   [1] https://github.com/openstack/ironic/blob/master/ironic/api/__init__.py#L26-L29
   [2] https://github.com/openstack/python-ironicclient/blob/master/ironicclient/v1/node.py#L52

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1367349/+subscriptions


Follow ups

References