Azure / Azure/azure-linux-extensions

VMBackup Proxy support broken (el6)

Open
#365 0 comments 0 reactions 0 assignees View on GitHub
extensions/VMBackup
Dominant language
Python
Stars
333
Forks
278
Avg merge
2d 9h
Merged PRs (30d)
4

Description

I'm running a dozen rhel6.9 VMs. Those machines do not have direct internet connectivity, instead they have to go through a proxy. All backup operations are failing. Looking through logs and diving into code, I saw some big issues in the proxy support. I don't think proxy support ever worked. Here are a few of the broken issues I noticed
* Constructing curl command line is broken (--proxy needs a space before it!)
* HTTPSConnection.set_tunnel is not supported on python2.6 (which ships on RHEL6). It seems set_tunnel was added in 2.7 per https://docs.python.org/2/library/httplib.html

I tried to improve the code, the patch below "helps" improve things, but backup is still failing.
```
57c57
< + '--proxy ' + self.proxyHost + ':' + self.proxyPort + ' -v'
---
> + ' --proxy ' + self.proxyHost + ':' + self.proxyPort + ' -v'
110,111c110,115
< connection = httplib.HTTPSConnection(self.proxyHost, self.proxyPort, timeout = 10)
< connection.set_tunnel(sasuri_obj.hostname, 443)
---
> connection = httplib.HTTPConnection(self.proxyHost, self.proxyPort, timeout = 10)
> try:
> set_tunnel = connection.set_tunnel
> except AttributeError: # Platform-specific: Python 2.6
> set_tunnel = connection._set_tunnel
> set_tunnel(sasuri_obj.hostname, 443)
```

Contributor guide

No contributing guide indexed for this repository

Research direction

No source file or test is named; start by locating the VMBackup proxy handling and reproducing the failure on Python 2.6/RHEL6. Verify the curl invocation and proxy connection path, then confirm backup operations complete successfully through a proxy without relying on Python 2.7-only APIs.

Written by the indexing model from the issue text.

Assessment

Tech stack
linux, python
Domain
networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.