Quantcast
Channel: VMware Communities : Unanswered Discussions - VMTN
Viewing all articles
Browse latest Browse all 61567

Multithreading errors: Access denied to instantiateVappTemplate

$
0
0

I've run into an interesting problem.

 

If I spawn multiple threads (50) that individually authenticate into VCD and and attempt to instantiateVappTemplate() the same template, I get interesting errors. Usually an "Access Denied" on instantiateVappTemplate, or more rarely an IP collision.

 

If I chane the code so that the authentication and retrieveing of the reference to the template are done initially and handed to the threads, none of these errors occur. Additionally, it runs much faster. (Much faster than I would expect merely by eliminating an extra auth - we're talking 3 minutes versus 30)

 

The trouble is, business requirements have me working with a queueing system where auth may timeout between actions. So having the threads auth on each pass might be a better match.

 

- Is there any documentation on why VCD apparently has trouble handling multiple API logins by the same user?

- Is there a way to check status of the template to see if it is busy in another thread (IE: to wait() on any current actions another thread has initiated) to avoid the access denined? Or am I stuck polling the template for status?

- The IP collision really has me surprise. Is there a possible race condition between checking for an open IP in a static pool and marking it as being in use?


Viewing all articles
Browse latest Browse all 61567


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>