Python stack trace whilst deploying to HP cloud

Bug #1364946 reported by Martin Hilton
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
juju-quickstart
Fix Released
High
Francesco Banconi

Bug Description

Attempting to use juju-quickstart to bootstrap an environment and deploy a bundle in one go I got this.

$ juju-quickstart -i Downloads/bundles.yaml
changes to the environments file have been saved
juju quickstart v1.4.2
contents loaded for bundle envExport (services: 2)
bootstrapping the hpcloud environment (type: openstack)
retrieving the environment status
retrieving the Juju API address
connecting to wss://15.126.225.8:17070
bootstrap node series: trusty
charm URL: cs:trusty/juju-gui-6
requesting juju-gui deployment
juju-gui deployment request accepted
exposing service juju-gui
Traceback (most recent call last):
  File "/usr/bin/juju-quickstart", line 34, in <module>
    manage.run(options)
  File "/usr/lib/python2.7/dist-packages/quickstart/manage.py", line 549, in run
    service_data, unit_data)
  File "/usr/lib/python2.7/dist-packages/quickstart/app.py", line 450, in deploy_gui
    env.expose(service_name)
  File "/usr/lib/python2.7/dist-packages/jujuclient.py", line 696, in expose
    "ServiceName": service_name}})
  File "/usr/lib/python2.7/dist-packages/jujuclient.py", line 144, in _rpc
    raw = self.conn.recv()
  File "/usr/lib/python2.7/dist-packages/quickstart/juju.py", line 140, in recv
    message = super(WebSocketConnection, self).recv()
  File "/usr/lib/python2.7/dist-packages/websocket.py", line 596, in recv
    opcode, data = self.recv_data()
  File "/usr/lib/python2.7/dist-packages/websocket.py", line 624, in recv_data
    self.send_close()
  File "/usr/lib/python2.7/dist-packages/websocket.py", line 681, in send_close
    self.send(struct.pack('!H', status) + reason, ABNF.OPCODE_CLOSE)
TypeError: send() takes exactly 2 arguments (3 given)

The system was being deployed to HP's public cloud offering

Machine details:

$ uname -a
Linux goldfish 3.16.0-12-generic #18-Ubuntu SMP Mon Sep 1 13:06:35 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

$ cat /etc/os-release
NAME="Ubuntu"
VERSION="14.10 (Utopic Unicorn)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu Utopic Unicorn (development branch)"
VERSION_ID="14.10"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"

$ dpkg --list "juju*"
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-========================================-=========================-=========================-=====================================================================================
un juju <none> <none> (no description available)
ii juju-core 1.20.5-0ubuntu1 amd64 Juju is devops distilled - client
ii juju-local 1.20.5-0ubuntu1 all dependency package for the Juju local provider
ii juju-mongodb 2.4.10-0ubuntu1 amd64 MongoDB object/document-oriented database for Juju
ii juju-quickstart 1.4.2-0ubuntu1 all Easy configuration of Juju environments

Related branches

Revision history for this message
Richard Harding (rharding) wrote :

This is looking like python changes in utopic. We need to get this tested and fixed to make sure we've got a solid quickstart in utopic.

Changed in juju-quickstart:
importance: Undecided → High
status: New → Triaged
Revision history for this message
Martin Hilton (martin-hilton) wrote :

It should be noted that this was running on python 2.7.8

$ which python
/usr/bin/python
$ python --version
Python 2.7.8

https://wiki.ubuntu.com/Python/3

seems to indicate that /usr/bin/python will always be a python2 (if it's there at all) so to test on python 3 you'll have to change the juju-quickstart script.

Revision history for this message
Martin Hilton (martin-hilton) wrote :

Incidently if you then continue with the already set up, and bootstrapped environement then it completes

$ juju-quickstart -e hpcloud Downloads/bundles.yaml
juju quickstart v1.4.2
contents loaded for bundle envExport (services: 2)
bootstrapping the hpcloud environment (type: openstack)
reusing the already bootstrapped hpcloud environment
retrieving the environment status
retrieving the Juju API address
connecting to wss://15.126.225.8:17070
bootstrap node series: trusty
charm URL: cs:trusty/juju-gui-6
service juju-gui already deployed
exposing service juju-gui
requesting new unit deployment
juju-gui/0 deployment request accepted
juju-gui/0 placed on 15.126.225.8
juju-gui/0 deployment is pending
machine 0 is started
juju-gui/0 is installed
juju-gui/0 is ready on machine 0

Juju GUI URL:
password:

connecting to the Juju GUI server
requesting a deployment of the envExport bundle with the following services:
  mariadb, wordpress
bundle deployment request accepted
use the GUI to check the bundle deployment progress
done!

Run "juju quickstart -e hpcloud" again if you want
to reopen and log in to the GUI browser later.
Run "juju quickstart -i" if you want to manage
or bootstrap your Juju environments using the
interactive session.
Run "juju destroy-environment hpcloud [-y]"
to destroy the environment you just bootstrapped.

Revision history for this message
Martin Hilton (martin-hilton) wrote :

The installed dependencies are:

ii python-jujuclient 0.17.5-0ubuntu2 all Python API client for juju
ii python-websocket 0.12.0-1ubuntu2 all WebSocket client library for python

Revision history for this message
Francesco Banconi (frankban) wrote :

This kind of random disconnection seems to be solved in a recent version of juju-core.
The traceback shows a side-effect of the proble, where send is called with more than one argument by send_close in latest python-websocket versions.
My current branch should fix the side-effect problem.

Changed in juju-quickstart:
status: Triaged → In Progress
assignee: nobody → Francesco Banconi (frankban)
Changed in juju-quickstart:
status: In Progress → Fix Committed
Changed in juju-quickstart:
status: Fix Committed → Fix Released
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.