juju-solutions / charmguardian

Testing tool for Juju charm, bundles, and charm/bundle merge proposals.
3 stars 3 forks source link

Gets stuck if manage.jujucharms.com doesn't respond #12

Open abentley opened 10 years ago

abentley commented 10 years ago

It looks like charmguardian can get stuck for hours waiting for a response from manage.jujucharms.com. It should probably set a default socket timeout. Example: http://juju-ci.vapour.ws:8080/job/charm-bundle-test/560/console

tvansteenburgh commented 10 years ago

Partially fixed by f61bf8a, which adds a default timeout for all http requests made directly by charmguardian.

For requests coming from charmworldlib (used for Bundle lookups), I submitted a patch (https://bugs.launchpad.net/charmworldlib/+bug/1363136) to add a default timeout to charmworldlib. Will update dependencies once this is released.

Unfortunately using socket.setdefaulttimeout() doesn't work with requests, as it will explicitly set the socket timeout to None if a value isn't passed in, instead of falling back to the default.