Walrus image re-cache after flush fails
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Eucalyptus |
Confirmed
|
Undecided
|
Neil Soman |
Bug Description
I had been experiencing two issues with Walrus, triggered by the maximum image cache size limit being exceeded
Problem 1: Images that were flushed from the cache could not be downloaded from then on, unless they were deregistered then registered with a new ID. When the failure occurred, this exception showed:
<code>
15:49:11 ERROR [WalrusImageMan
edu.ucsb.
at edu.ucsb.
at edu.ucsb.
at edu.ucsb.
</code>
Problem 2: Sometimes I'd get in a state where trying to download a particular image would always result a long wait, followed by the "Tired of waiting to cache image" condition to occur
The bug that causes problem 1 is silly .. in WalrusImageMana
<code>
verified = canVerifySignat
break;
...etc...
</code>
It's great that we break out of the "cert" loop when verification fails, but unfortunately we forget to break out of the "user" loop! So we move on to the next user, who either doesn't have a cert, or his cert can't decrypt the image.
A quick fix is to add a second "if (verified) break;" at the bottom of the outer loop. If I was writing the code, I might have built a list with a single item for the non-administrator case, and then used one block of code to handle both cases.
This leads to problem 2 - when signature verification fails, it throws a NotAuthorizedEx
I supposed fixing problem 1 could prevent problem 2 from recurring, but really the semaphore-protected code should catch exceptions and release the semaphore when they occur. I wrapped the whole section in...
<code>
try {
...
} catch (Exception ex) {
semaphore
throw new EucalyptusCloud
}
</code>
which seems to do the trick.
Changed in eucalyptus: | |
status: | New → Confirmed |
Changed in eucalyptus: | |
assignee: | nobody → Neil Soman (neilsoman) |
This issue is now being tracked upstream at http:// eucalyptus. atlassian. net/browse/ EUCA-2749
Please watch that issue for further updates.