The random space in rand_name is too small

Bug #1088422 reported by Attila Fazekas
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
tempest
Fix Released
High
Unassigned

Bug Description

Looks like when you using hundreds of name just in 1000000 element space the name collusion can happen and generates false negative results.

It is also can be related with improper teardown.

Several solution is possible:
* Record all generated names, and run the function again if one reoccurs.
   - Drawback needs: more memory.
   - Can collide with names from improper teardown from previous tempest execution

* Increase the random space.
 - Does not grantee uniqueness, but mitigate the collision chance
 - UUID make the names much longer

* Incremental name:
 - Not really use random, just increment a global number in every request
 - Can collide with residues from previous execution

* Combination incremental and random solution together
 - the unique like part are constructed from a random number generated once in every execution + an incrementing global number

Additional improvement:
The rand_name should use dashes between the name and unique like part without an explicit request.

Changed in tempest:
assignee: nobody → Attila Fazekas (afazekas)
importance: Undecided → Medium
status: New → Triaged
Changed in tempest:
assignee: Attila Fazekas (afazekas) → nobody
Revision history for this message
Hans Lindgren (hanlind) wrote :
Revision history for this message
David Kranz (david-kranz) wrote :
Changed in tempest:
importance: Medium → High
Revision history for this message
David Kranz (david-kranz) wrote :

According to my calculations, this RolesTest should fail about 1 in 3333 runs.

Revision history for this message
David Kranz (david-kranz) wrote :

Attila, why do we care if the names are a little long? Using uuids seems like the most simple and robust solution.

Revision history for this message
David Kranz (david-kranz) wrote :

rand_int, which is only used in the create flavors test, has the same issue but requires an integer. So that should really increment rather than using random, and be moved into that test.

Revision history for this message
David Kranz (david-kranz) wrote :

I'm not sure of the right way to deal with this in general and with parallel execution. For now I submitted a patch to increase the random range to 7fffffff which is probably good enough.

Changed in tempest:
status: Triaged → Fix Released
Sean Dague (sdague)
Changed in tempest:
milestone: none → havana-3
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.