Error while upgrade procedure 6.1 -> 7.0 UnixSocketHTTP instance has no attribute 'getresponse'

Bug #1522392 reported by sryabin
6
This bug affects 1 person
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_version: "2014.2.2-6.1"
  api: "1.0"
  build_number: "525"
  build_id: "2015-06-19_13-02-31"
  nailgun_sha: "dbd54158812033dd8cfd7e60c3f6650f18013a37"
  python-fuelclient_sha: "4fc55db0265bbf39c369df398b9dc7d6469ba13b"
  astute_sha: "1ea8017fe8889413706d543a5b9f557f5414beae"
  fuel-library_sha: "2e7a08ad9792c700ebf08ce87f4867df36aa9fab"
  fuel-ostf_sha: "8fefcf7c4649370f00847cc309c24f0b62de718d"
  fuelmain_sha: "a3998372183468f56019c8ce21aa8bb81fee0c2f"

Reproduce:

MirantisOpenStack-7.0-upgrade.tar.lrz (816d7d555540bf92d35330869127829f)
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/upgrade/.fuel-upgrade-venv/lib/python2.7/site-packages/fuel_upgrade/cli.py", line 176, in main
    run_upgrade(parse_args(sys.argv[1:]))
  File "/var/upgrade/upgrade/.fuel-upgrade-venv/lib/python2.7/site-packages/fuel_upgrade/cli.py", line 168, in run_upgrade
    upgrade_manager.run()
  File "/var/upgrade/upgrade/.fuel-upgrade-venv/lib/python2.7/site-packages/fuel_upgrade/upgrade.py", line 89, in run
    self.rollback()
  File "/var/upgrade/upgrade/.fuel-upgrade-venv/lib/python2.7/site-packages/fuel_upgrade/upgrade.py", line 168, in rollback
    upgrader.rollback()
  File "/var/upgrade/upgrade/.fuel-upgrade-venv/lib/python2.7/site-packages/fuel_upgrade/engines/host_system.py", line 107, in rollback
    self.supervisor.start_all_services()
  File "/var/upgrade/upgrade/.fuel-upgrade-venv/lib/python2.7/site-packages/fuel_upgrade/clients/supervisor_client.py", line 126, in start_all_services
    self.supervisor.startAllProcesses()
  File "/usr/local/lib/python2.7/xmlrpclib.py", line 1224, in __call__
    return self.__send(self.__name, args)
  File "/usr/local/lib/python2.7/xmlrpclib.py", line 1581, in __request
    verbose=self.__verbose
  File "/usr/local/lib/python2.7/xmlrpclib.py", line 1264, in request
    return self.single_request(host, handler, request_body, verbose)
  File "/usr/local/lib/python2.7/xmlrpclib.py", line 1287, in single_request
    h = self.make_connection(host)
AttributeError: UnixSocketHTTP instance has no attribute 'getresponse'
==================================================
Upgrade failed

Tags: area-python
Revision history for this message
Ilya Kharin (akscram) wrote :

This problem occurs because fuel_upgrade.clients.supervicor_client.SupervisorClient 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]
- httplib.HTTPConnection.getresponse in Python 2.7 [2]

For Python 2.7 UnixSocketTransport.make_connection should return UnixSocketHTTPConnection(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
[2] https://hg.python.org/cpython/file/2.7/Lib/xmlrpclib.py#l1310

Ilya Kharin (akscram)
Changed in fuel:
status: New → Confirmed
Changed in fuel:
status: Confirmed → Triaged
Dmitry Klenov (dklenov)
tags: added: area-python
Changed in fuel:
milestone: none → 8.0
assignee: nobody → Fuel Python Team (fuel-python)
importance: Undecided → Medium
Revision history for this message
Dmitry Pyzhov (dpyzhov) wrote :

How does it affect Fuel? We don't have python 2.7 on master node neither in 6.1 nor in 7.0.

Changed in fuel:
status: Triaged → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.