uncaught CalledProcessError in Deployment.setup on Amazon Cloud

Bug #1528582 reported by Bruno Ranieri
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Amulet
New
Undecided
Unassigned

Bug Description

A test written using Amulet fail with an uncaught CalledProcessError in Deployment.setup when executed on Juju Amazon Cloud Provider. Executing the test using the local provider yields a successful deployment.

Relevant snippet from output:
------------------------------------------
Traceback (most recent call last):
  File "tests/20-replica-set_deploy", line 39, in setUpClass
    cls.deployment.setup(timeout=timeout)
  File "/usr/lib/python3/dist-packages/amulet/deployer.py", line 430, in setup
    subprocess.check_call(shlex.split(cmd))
  File "/usr/lib/python3.4/subprocess.py", line 561, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['juju-deployer', '-W', '-c', '/tmp/amulet-juju-deployer-67py1gr8/deployer-schema.json', '-e', 'amazon', '-t', '1900', 'amazon']' returned non-zero exit status 1

Output using Amazon Provider:
-------------------------------------------
vagrant@vagrant-ubuntu-vivid-64:~/juju-workbench/charms/trusty/quobyte-registry$ juju test 20-replica-set_deploy
juju-test INFO : Starting test run on amazon using Juju 1.25.0
Bootstrapping environment "amazon"
Starting new instance for initial state server
Launching instance
 - i-7a2caacb
Installing Juju agent on bootstrap instance
Waiting for address
Attempting to connect to 172.31.43.89:22
Attempting to connect to 52.90.77.38:22
Logging to /var/log/cloud-init-output.log on remote host
Running apt-get update
Running apt-get upgrade
Installing package: curl
Installing package: cpu-checker
Installing package: bridge-utils
Installing package: rsyslog-gnutls
Installing package: cloud-utils
Installing package: cloud-image-utils
Installing package: tmux
Fetching tools: curl -sSfw 'tools from %{url_effective} downloaded: HTTP %{http_code}; time %{time_total}s; size %{size_download} bytes; speed %{speed_download} bytes/s ' --retry 10 -o $bin/tools.tar.gz <[https://juju-dist.s3.amazonaws.com/tools/releases/juju-1.25.0-trusty-amd64.tgz]>
Bootstrapping Juju machine agent
Starting Juju machine agent (jujud-machine-0)
Bootstrap agent installed
Waiting for API to become available
Bootstrap complete
2015-12-22 14:14:55 Starting deployment of amazon
2015-12-22 14:14:56 Deploying services...
2015-12-22 14:14:57 Deploying service quobyte-registry using /home/vagrant/juju-workbench/charms/trusty/quobyte-registry
juju-test.conductor.20-replica-set_deploy RESULT : ↷ (⌛)
Traceback (most recent call last):
  File "/usr/bin/juju-deployer", line 9, in <module>
    load_entry_point('juju-deployer==0.6.1', 'console_scripts', 'juju-deployer')()
  File "/usr/lib/python2.7/dist-packages/deployer/cli.py", line 135, in main
    run()
  File "/usr/lib/python2.7/dist-packages/deployer/cli.py", line 234, in run
    importer.Importer(env, deployment, options).run()
  File "/usr/lib/python2.7/dist-packages/deployer/action/importer.py", line 314, in run
    self.wait_for_units(ignore_errors=ignore_errors)
  File "/usr/lib/python2.7/dist-packages/deployer/action/importer.py", line 285, in wait_for_units
    services=self.deployment.get_service_names(), on_errors=on_errors)
  File "/usr/lib/python2.7/dist-packages/deployer/env/go.py", line 257, in wait_for_units
    services=services, on_errors=on_errors).run(callback)
  File "/usr/lib/python2.7/dist-packages/jujuclient.py", line 2030, in run
    seen_initial = True
  File "/usr/lib/python2.7/dist-packages/jujuclient.py", line 452, in __exit__
    self.stop()
  File "/usr/lib/python2.7/dist-packages/jujuclient.py", line 432, in stop
    'Id': self.watcher_id})
  File "/usr/lib/python2.7/dist-packages/jujuclient.py", line 313, in _rpc
    result = self._rpc_retry_if_upgrading(op)
  File "/usr/lib/python2.7/dist-packages/jujuclient.py", line 326, in _rpc_retry_if_upgrading
    result = self._send_request(op)
  File "/usr/lib/python2.7/dist-packages/jujuclient.py", line 339, in _send_request
    raw = self.conn.recv()
  File "/usr/lib/python2.7/dist-packages/websocket/_core.py", line 663, in recv
    opcode, data = self.recv_data()
  File "/usr/lib/python2.7/dist-packages/websocket/_core.py", line 678, in recv_data
    frame = self.recv_frame()
  File "/usr/lib/python2.7/dist-packages/websocket/_core.py", line 753, in recv_frame
    frame_buffer.recv_header(self._recv_strict)
  File "/usr/lib/python2.7/dist-packages/websocket/_core.py", line 257, in recv_header
    header = recv_fn(2)
  File "/usr/lib/python2.7/dist-packages/websocket/_core.py", line 860, in _recv_strict
    bytes = self._recv(shortage)
  File "/usr/lib/python2.7/dist-packages/websocket/_core.py", line 854, in _recv
    raise WebSocketConnectionClosedException()
websocket._exceptions.WebSocketConnectionClosedException
E
======================================================================
ERROR: setUpClass (__main__.TestDeployment)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "tests/20-replica-set_deploy", line 39, in setUpClass
    cls.deployment.setup(timeout=timeout)
  File "/usr/lib/python3/dist-packages/amulet/deployer.py", line 430, in setup
    subprocess.check_call(shlex.split(cmd))
  File "/usr/lib/python3.4/subprocess.py", line 561, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['juju-deployer', '-W', '-c', '/tmp/amulet-juju-deployer-67py1gr8/deployer-schema.json', '-e', 'amazon', '-t', '1900', 'amazon']' returned non-zero exit status 1

----------------------------------------------------------------------
Ran 0 tests in 605.046s

FAILED (errors=1)
juju-test INFO : Results: 0 passed, 1 failed, 0 errored
vagrant@vagrant-ubuntu-vivid-64:~/juju-workbench/charms/trusty/quobyte-registry$

Output using local provider:
--------------------------------------
vagrant@vagrant-ubuntu-vivid-64:~/juju-workbench/charms/trusty/quobyte-registry$ juju test 20-replica-set_deploy
juju-test INFO : Starting test run on local using Juju 1.25.0
Bootstrapping environment "local"
Starting new instance for initial state server
Building tools to upload (1.25.0.1-vivid-amd64)
Installing Juju agent on bootstrap instance
Logging to /home/vagrant/.juju/local/cloud-init-output.log on remote host
Running apt-get update
Installing package: curl
Installing package: cpu-checker
Installing package: bridge-utils
Installing package: rsyslog-gnutls
Installing package: cloud-utils
Installing package: cloud-image-utils
Installing package: tmux
Bootstrapping Juju machine agent
Starting Juju machine agent (juju-agent-vagrant-local)
Bootstrap agent installed
Waiting for API to become available
Waiting for API to become available
Waiting for API to become available
Bootstrap complete
2015-12-22 14:39:35 Starting deployment of local
2015-12-22 14:39:35 Deploying services...
2015-12-22 14:39:35 Deploying service quobyte-registry using /home/vagrant/juju-workbench/charms/trusty/quobyte-registry
2015-12-22 14:41:02 Adding relations...
2015-12-22 14:41:02 Deployment complete in 86.62 seconds
[... test fails later, due to missing resources in my local environment ...]

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.