← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1940311] [NEW] Quota engine should not retry DB operation when releasing reservation

 

Public bug reported:

If Quota engine fails during the reservation release, that will
retrigger the whole API operation again. That means, for example, if a
new security group was requested, two of them will be created [1].

Any API operation that creates a new resource (or resources), will
create first a reservation. Then, when the resource (or resources) are
created, the reservation is deleted. At this point, when the reservation
is going to be deleted, the resource is consistently created in the DB.
If the reservation deletion fails, the Neutron API will retry the whole
operation, including the resource creation.

The quota API exposes a single method [2] used to release any
reservation made. This method is called from "DbQuotaDriver" and
"DbQuotaNoLockDriver" (the only quota drivers implemented, discarding
"NullQuotaDriver"). Both drivers implement methods to clean any expired
reservation; that means, any older reservation present in the system is
automatically removed.

Proposal:
- For "DbQuotaNoLockDriver", increase the expired reservation timeout (now is zero, that's an error).
- For [2], do not fail and retry if DB error. In case of DB error, we can just continue and leave the reservation deletion to the automatic deletion system.


[1]Related bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1993130
[2]https://github.com/openstack/neutron/blob/96f1ea140edb1386159ce8b103c48b4e6a816ca1/neutron/db/quota/api.py#L202

** Affects: neutron
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1940311

Title:
  Quota engine should not retry DB operation when releasing reservation

Status in neutron:
  New

Bug description:
  If Quota engine fails during the reservation release, that will
  retrigger the whole API operation again. That means, for example, if a
  new security group was requested, two of them will be created [1].

  Any API operation that creates a new resource (or resources), will
  create first a reservation. Then, when the resource (or resources) are
  created, the reservation is deleted. At this point, when the
  reservation is going to be deleted, the resource is consistently
  created in the DB. If the reservation deletion fails, the Neutron API
  will retry the whole operation, including the resource creation.

  The quota API exposes a single method [2] used to release any
  reservation made. This method is called from "DbQuotaDriver" and
  "DbQuotaNoLockDriver" (the only quota drivers implemented, discarding
  "NullQuotaDriver"). Both drivers implement methods to clean any
  expired reservation; that means, any older reservation present in the
  system is automatically removed.

  Proposal:
  - For "DbQuotaNoLockDriver", increase the expired reservation timeout (now is zero, that's an error).
  - For [2], do not fail and retry if DB error. In case of DB error, we can just continue and leave the reservation deletion to the automatic deletion system.

  
  [1]Related bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1993130
  [2]https://github.com/openstack/neutron/blob/96f1ea140edb1386159ce8b103c48b4e6a816ca1/neutron/db/quota/api.py#L202

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



Follow ups