On 08/11/11 06:07, William Schumann wrote:
https://cr.opensolaris.org/action/browse/caiman/wmsch/7073935/webrev/

The stress errors are due to database lookups on manifests and profiles that 
have been deleted
during 'installadm list -p/-m'. For example, in AI_database.py:getNames(), the 
number of names
(manifest or profile entries) is counted, then database queries are launched 
one at a time (a memory
usage limitation feature for very large queries), which introduces a window 
during which the entry
can be deleted, and the corresponding query fails.

The solution is to add checks that the rows exist in the query output before 
referencing them.

Stress-tested with this script and variations, using 5 different profiles at a 
time, then launching
the same script multiple times to generate even more contention:

import sys
import subprocess
mysys = sys.argv[1] # profile
mysvc = '167nightly'
mycp = ['installadm', 'create-profile', '-p', mysys, '-n', mysvc, '-f', mysys]
myls = ['installadm', 'list', '-p', '-n', mysvc]
mydp = ['installadm', 'delete-profile', '-p', mysys, '-n', mysvc]
subprocess.call(mycp)
subprocess.call(myls)
subprocess.call(mydp)

Calling code was checked for compatibility.

Related pyunit tests pass.
_______________________________________________
caiman-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/caiman-discuss

Hi William,

Just one comment, otherwise looks good:

567 I think the code would be more explicit and thus clearer if you still had the "return None" here, even though not technically required.

Sue
_______________________________________________
caiman-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/caiman-discuss

Reply via email to