Closed Bug 1118060 Opened 9 years ago Closed 9 years ago

Use correct default number of available slots when creating a new node record

Categories

(Cloud Services Graveyard :: Server: Token, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: rfkelly, Assigned: rfkelly)

Details

Attachments

(1 file)

This fixes a bug in the implementation of Bug 8459539.  The add_node() method calculates a default value for the `available` column based on total capacity and the configured release rate.  But it incorrectly passes the full value of `capacity` through when inserting the node.

The patch simply fixes it to use the pre-calculated default value.

AFAICT this bug will not affect ops because they do not (yet) use this method when adding nodes, instead doing a direct row insert at the SQL level.
Attachment #8544285 - Flags: review?(telliott)
Attachment #8544285 - Flags: review?(telliott) → review+
https://github.com/mozilla-services/tokenserver/commit/225ad20140742fb8c1e748efc2301c6d59735596
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Product: Cloud Services → Cloud Services Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: