← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1780238] [NEW] ensure-consumer gabbi test uses invalid consumer id

 

Public bug reported:

The consumer_id is stored in an UUIDField internally and as a String(36)
in the database. But in the ensure-consumer gabbi test '*consumer_id' is
used as a consumer_id[1]. It seems gabbi does not resolve the yaml ref
in the URL but resolves it in the payload part as [2] seems to work.

There are two problems:
1) the consumer_id field of PUT: /allocations/{consumer_id} is not validated so the API allows passing in '*consumer_id' as a string
2) the test passes in a non UUID value for the consumer_id 

[1]https://github.com/openstack/nova/blob/187f80a32c8b5cdfc115e9b90f4818f3d9d1f8fe/nova/tests/functional/api/openstack/placement/gabbits/ensure-consumer.yaml#L19
https://github.com/openstack/nova/blob/187f80a32c8b5cdfc115e9b90f4818f3d9d1f8fe/nova/tests/functional/api/openstack/placement/gabbits/ensure-consumer.yaml#L41[2]

** Affects: nova
     Importance: Undecided
     Assignee: Balazs Gibizer (balazs-gibizer)
         Status: New


** Tags: placement

** Changed in: nova
     Assignee: (unassigned) => Balazs Gibizer (balazs-gibizer)

** Tags added: placement

-- 
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/1780238

Title:
  ensure-consumer gabbi test uses invalid consumer id

Status in OpenStack Compute (nova):
  New

Bug description:
  The consumer_id is stored in an UUIDField internally and as a
  String(36) in the database. But in the ensure-consumer gabbi test
  '*consumer_id' is used as a consumer_id[1]. It seems gabbi does not
  resolve the yaml ref in the URL but resolves it in the payload part as
  [2] seems to work.

  There are two problems:
  1) the consumer_id field of PUT: /allocations/{consumer_id} is not validated so the API allows passing in '*consumer_id' as a string
  2) the test passes in a non UUID value for the consumer_id 

  [1]https://github.com/openstack/nova/blob/187f80a32c8b5cdfc115e9b90f4818f3d9d1f8fe/nova/tests/functional/api/openstack/placement/gabbits/ensure-consumer.yaml#L19
  https://github.com/openstack/nova/blob/187f80a32c8b5cdfc115e9b90f4818f3d9d1f8fe/nova/tests/functional/api/openstack/placement/gabbits/ensure-consumer.yaml#L41[2]

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


Follow ups