racker/virgo — pull request #489 by Kami (2014-01-04 01:49:23+00:00)
Title: Fix logging in the request class

I've noticed some errors in the agent log today. Those errors are related to failed crash dump upload. As you can see in the included log output, those log messages are broken.

```bash
Sat Jan 4 01:02:52 2014 WRN: POST to nil:nil failed for /var/lib/rackspace-monitoring-agent/rackspace-monitoring-agent-crash-report-ponies.dmp with status: ? and error: socket hang up.
Sat Jan 4 01:02:52 2014 DBG: retrying download 1 more times.
Sat Jan 4 01:02:52 2014 DBG: sending request to agent-endpoint-dfw.monitoring.api.rackspacecloud.com:443/agent-crash-report?binary_version=0.1.9&time=1374792673&platform=ubuntu-12.04-x86_64&bundle_version=0.1.9-61&
Sat Jan 4 01:02:52 2014 ERR: Error uploading crash report: /var/lib/rackspace-monitoring-agent/rackspace-monitoring-agent-crash-report-ponies.dmp because socket hang up
```

This pull request fixes that and makes `Request` class correctly log active options which are used inside the `_ensure_retries` method.

Previously, the log message inside `_ensure_retries` didn't correctly reflect the used hostname and port if either one of those conditions was true:

* `endpoints` option was used
* `srv_query` option was used and hostname and port were dynamically obtained from DNS before issuing the request