Merge lp:~vila/uci-engine/nova-failure-as-testbed-exception into lp:uci-engine

Proposed by Vincent Ladeuil
Status: Merged
Approved by: Ursula Junque
Approved revision: 916
Merged at revision: 916
Proposed branch: lp:~vila/uci-engine/nova-failure-as-testbed-exception
Merge into: lp:uci-engine
Diff against target: 56 lines (+17/-6)
2 files modified
test_runner/tstrun/testbed.py (+14/-3)
test_runner/tstrun/tests/test_testbed.py (+3/-3)
To merge this branch: bzr merge lp:~vila/uci-engine/nova-failure-as-testbed-exception
Reviewer Review Type Date Requested Status
Para Siva (community) Approve
Review via email: mp+245831@code.launchpad.net

Commit message

Turn nova exceptions into TestBedException to identify infra failures

Description of the change

Re-focusing from the nova-failure branch, this MP doesn't try to re-enable the Nova and Swift features.

To post a comment you must log in.
Revision history for this message
Para Siva (psivaa) wrote :

Do you not have to remove the decorators for the TestNovaClient in order to enable the modified tests to run without Nova and Swift features?

Revision history for this message
Vincent Ladeuil (vila) wrote :

> Do you not have to remove the decorators for the TestNovaClient in order to
> enable the modified tests to run without Nova and Swift features?

That would going in the wrong direction: we want to keep the decorators as they define the context of the test.

It's unfortunate that we can't run those tests on tarmac but that's unrelated to this MP and the reason why I split it ;)

Revision history for this message
Para Siva (psivaa) wrote :

Ack, understood. Approving this MP and will take a look at the other too. Thanks for clarifying

review: Approve
Revision history for this message
Ubuntu CI Bot (uci-bot) wrote :
Download full text (59.9 KiB)

The attempt to merge lp:~vila/uci-engine/nova-failure-as-testbed-exception into lp:uci-engine failed. Below is the output from the failed tests.

2015-01-08 11:42:25 INFO juju.cmd supercommand.go:37 running jujud [1.20.14.1-precise-amd64 gc]
2015-01-08 11:42:25 DEBUG juju.agent agent.go:377 read agent config, format "1.18"
2015-01-08 11:42:25 INFO juju.jujud unit.go:78 unit agent unit-ci-airline-ts-django-0 start (1.20.14.1-precise-amd64 [gc])
2015-01-08 11:42:25 INFO juju.worker runner.go:260 start "api"
2015-01-08 11:42:25 INFO juju.state.api apiclient.go:242 dialing "wss://10.0.3.1:17070/"
2015-01-08 11:42:25 INFO juju.state.api apiclient.go:176 connection established to "wss://10.0.3.1:17070/"
2015-01-08 11:42:25 INFO juju.state.api apiclient.go:242 dialing "wss://10.0.3.1:17070/"
2015-01-08 11:42:25 INFO juju.state.api apiclient.go:176 connection established to "wss://10.0.3.1:17070/"
2015-01-08 11:42:26 INFO juju.state.api apiclient.go:242 dialing "wss://10.0.3.1:17070/"
2015-01-08 11:42:26 INFO juju.state.api apiclient.go:176 connection established to "wss://10.0.3.1:17070/"
2015-01-08 11:42:26 INFO juju.worker runner.go:260 start "upgrader"
2015-01-08 11:42:26 INFO juju.worker runner.go:260 start "logger"
2015-01-08 11:42:26 DEBUG juju.worker.logger logger.go:35 initial log config: "<root>=DEBUG"
2015-01-08 11:42:26 INFO juju.worker runner.go:260 start "uniter"
2015-01-08 11:42:26 DEBUG juju.worker.logger logger.go:60 logger setup
2015-01-08 11:42:26 INFO juju.worker runner.go:260 start "apiaddressupdater"
2015-01-08 11:42:26 INFO juju.worker runner.go:260 start "rsyslog"
2015-01-08 11:42:26 DEBUG juju.worker.rsyslog worker.go:75 starting rsyslog worker mode 1 for "unit-ci-airline-ts-django-0" "tarmac-local"
2015-01-08 11:42:26 DEBUG juju.worker.logger logger.go:45 reconfiguring logging from "<root>=DEBUG" to "<root>=WARNING;unit=DEBUG"
2015-01-08 11:42:33 INFO juju-log Making dir /srv/ci-airline-ts-django/code/ root:root 555
2015-01-08 11:42:33 INFO juju-log Adding dependencies.
2015-01-08 11:42:33 INFO juju-log installing apt packages...
2015-01-08 11:42:44 INFO config-changed gpg: keyring `/tmp/tmpydV9YC/secring.gpg' created
2015-01-08 11:42:44 INFO config-changed gpg: keyring `/tmp/tmpydV9YC/pubring.gpg' created
2015-01-08 11:42:44 INFO config-changed gpg: requesting key 6A8DFC40 from hkp server keyserver.ubuntu.com
2015-01-08 11:42:44 INFO config-changed gpg: /tmp/tmpydV9YC/trustdb.gpg: trustdb created
2015-01-08 11:42:44 INFO config-changed gpg: key 6A8DFC40: public key "Launchpad PPA for Canonical CI Engineering" imported
2015-01-08 11:42:44 INFO config-changed gpg: Total number processed: 1
2015-01-08 11:42:44 INFO config-changed gpg: imported: 1 (RSA: 1)
2015-01-08 11:42:50 INFO config-changed OK
2015-01-08 11:42:53 INFO config-changed Hit http://archive.ubuntu.com precise Release.gpg
2015-01-08 11:42:53 INFO config-changed Get:1 http://security.ubuntu.com precise-security Release.gpg [198 B]
2015-01-08 11:42:53 INFO config-changed Get:2 http://ppa.launchpad.net precise Release.gpg [316 B]
2015-01-08 11:42:53 INFO config-changed Get:3 http://ubuntu-cloud.archive.canonical.com pr...

Revision history for this message
Vincent Ladeuil (vila) wrote :

2015-01-08 12:01:06 Waiting for relation convergence 60s
2015-01-08 12:02:38 The following units had errors:
   unit: ci-airline-ts-django/0: machine: 12 agent-state: error details: hook failed: "pgsql-relation-joined"
2015-01-08 12:02:38 Deployment stopped. run time: 1568.55

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'test_runner/tstrun/testbed.py'
--- test_runner/tstrun/testbed.py 2014-10-17 12:28:22 +0000
+++ test_runner/tstrun/testbed.py 2015-01-08 10:31:48 +0000
@@ -1,6 +1,6 @@
1#!/usr/bin/env python1#!/usr/bin/env python
2# Ubuntu CI Engine2# Ubuntu CI Engine
3# Copyright 2014 Canonical Ltd.3# Copyright 2014, 2015 Canonical Ltd.
44
5# This program is free software: you can redistribute it and/or modify it5# This program is free software: you can redistribute it and/or modify it
6# under the terms of the GNU Affero General Public License version 3, as6# under the terms of the GNU Affero General Public License version 3, as
@@ -178,8 +178,19 @@
178 msg = ('Rate limit reached for {},'178 msg = ('Rate limit reached for {},'
179 ' will sleep for {} seconds')179 ' will sleep for {} seconds')
180 self.logger.exception(msg.format(func.__name__, nap_time))180 self.logger.exception(msg.format(func.__name__, nap_time))
181 time.sleep(nap_time)181 except:
182 return func(*args, **kwargs) # Retry once182 # All other exceptions are raised
183 self.logger.exception('{} failed'.format(func.__name__))
184 raise TestBedException('{} failed'.format(func.__name__))
185 try:
186 time.sleep(nap_time)
187 return func(*args, **kwargs) # Retry once
188 except:
189 # FIXME: This duplicates the two lines above but this method will
190 # be refactored to retry more than once in the future. The
191 # duplication can be fixed then -- vila 2015-01-07
192 self.logger.exception('{} failed'.format(func.__name__))
193 raise TestBedException('{} failed'.format(func.__name__))
183194
184 def flavors_list(self):195 def flavors_list(self):
185 return self.retry(self.nova.flavors.list)196 return self.retry(self.nova.flavors.list)
186197
=== modified file 'test_runner/tstrun/tests/test_testbed.py'
--- test_runner/tstrun/tests/test_testbed.py 2014-11-04 12:07:12 +0000
+++ test_runner/tstrun/tests/test_testbed.py 2015-01-08 10:31:48 +0000
@@ -1,5 +1,5 @@
1# Ubuntu CI Engine1# Ubuntu CI Engine
2# Copyright 2014 Canonical Ltd.2# Copyright 2014, 2015 Canonical Ltd.
33
4# This program is free software: you can redistribute it and/or modify it4# This program is free software: you can redistribute it and/or modify it
5# under the terms of the GNU Affero General Public License version 3, as5# under the terms of the GNU Affero General Public License version 3, as
@@ -128,9 +128,9 @@
128 # This mimics what will happen when we encounter unknown transient128 # This mimics what will happen when we encounter unknown transient
129 # failures we want to catch: an exception will bubble up and we'll have129 # failures we want to catch: an exception will bubble up and we'll have
130 # to add it to NovaClient.retry().130 # to add it to NovaClient.retry().
131 with self.assertRaises(AssertionError) as cm:131 with self.assertRaises(testbed.TestBedException) as cm:
132 tb.find_flavor()132 tb.find_flavor()
133 self.assertEqual('Boom!', unicode(cm.exception))133 self.assertEqual('fail failed', '{}'.format(cm.exception))
134134
135135
136@features.requires(features.nova_creds)136@features.requires(features.nova_creds)

Subscribers

People subscribed via source and target branches