Error while upgrade procedure 6.1 -> 7.0 UnixSocketHTTP instance has no attribute 'getresponse'
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Fuel for OpenStack |
Invalid
|
Medium
|
Fuel Python (Deprecated) |
Bug Description
VERSION:
feature_groups:
- mirantis
production: "docker"
release: "6.1"
openstack_
api: "1.0"
build_number: "525"
build_id: "2015-06-
nailgun_sha: "dbd54158812033
python-
astute_sha: "1ea8017fe88894
fuel-library_sha: "2e7a08ad9792c7
fuel-ostf_sha: "8fefcf7c464937
fuelmain_sha: "a3998372183468
Reproduce:
MirantisOpenSta
Trace after running upgrade.sh
.....
015-12-03 12:47:49 ERROR 30022 (cli) UnixSocketHTTP instance has no attribute 'getresponse'
Traceback (most recent call last):
File "/var/upgrade/
run_
File "/var/upgrade/
upgrade_
File "/var/upgrade/
self.rollback()
File "/var/upgrade/
upgrader.
File "/var/upgrade/
self.
File "/var/upgrade/
self.
File "/usr/local/
return self.__
File "/usr/local/
verbose=
File "/usr/local/
return self.single_
File "/usr/local/
h = self.make_
AttributeError: UnixSocketHTTP instance has no attribute 'getresponse'
=======
Upgrade failed
Changed in fuel: | |
status: | New → Confirmed |
Changed in fuel: | |
status: | Confirmed → Triaged |
tags: | added: area-python |
Changed in fuel: | |
milestone: | none → 8.0 |
assignee: | nobody → Fuel Python Team (fuel-python) |
importance: | Undecided → Medium |
This problem occurs because fuel_upgrade. clients. supervicor_ client. SupervisorClien t does not work properly with python 2.7. It uses xmlrpclib.Server and passes an instance of the UnixSocketHTTP class as a connection for a transport. The xmlrpclib.Transport class handles connections in different ways in two versions of Python 2.6 and 2.7. It calls two different methods of a connection to get a response:
- httplib. HTTP.getreply in Python 2.6 [1] HTTPConnection. getresponse in Python 2.7 [2]
- httplib.
For Python 2.7 UnixSocketTrans port.make_ connection should return UnixSocketHTTPC onnection( self.socket_ path) instead of UnixSocketHTTP( self.socket_ path) to avoid this problem.
[1] https:/ /hg.python. org/cpython/ file/2. 6/Lib/xmlrpclib .py#l1237 /hg.python. org/cpython/ file/2. 7/Lib/xmlrpclib .py#l1310
[2] https:/