juju-solutions / bundletester Goto Github PK
View Code? Open in Web Editor NEWA juju charm and bundle test runner
Home Page: http://juju-solutions.github.io/bundletester
A juju charm and bundle test runner
Home Page: http://juju-solutions.github.io/bundletester
Debugging the bundletester failures on the Kubernetes bundle yielded some interesting behavior.
I added a debug print statement to charm proof so I knew the CWD of what bundletester was actively proofing during the run.
DEBUG:runner:call ['/usr/bin/charm-proof']
DEBUG:runner:/tmp/bundletester-cWu5tn/kubernetes-cluster
DEBUG:runner:W: kubernetes-master: charm URL should include a revision
DEBUG:runner:E: local charms not allowed for service kubernetes-master: local:trusty/kubernetes-master
DEBUG:runner:Exit Code: 200
cs:trusty/etcd-0
charm-proof FAIL
The output is targeted at the etcd charm, with a failure to proof cs:trusty/etcd-0.
However, the debug line just 3 lines above it, states CWD was the kubernetes-cluster directory, therefore the failure and associated messages, are failing during proof of the bundle.
I am trying to test a bundle with charmbox:devel (2.0-beta15-xenial-amd64) which has the latest version of bundletester installed from tvansteenburgh's ppa.
It looks like something broke in beta-15 because this same charmbox was working on beta-14.
ubuntu@devbox:~/bundles/bundle-observable-kubernetes$ vi bundle.yaml
ubuntu@devbox:~/bundles/bundle-observable-kubernetes$ bundletester -F -l DEBUG -v 2>&1 | tee ../../obs_kubes_results.txt
DEBUG:deployer.charm:Cache dir /home/ubuntu/.local/share/juju/.deployer-store-cache/cs_filebeat-4
DEBUG:deployer.charm:Cache dir /home/ubuntu/.local/share/juju/.deployer-store-cache/cs_trusty_elasticsearch-16
DEBUG:deployer.charm:Cache dir /home/ubuntu/.local/share/juju/.deployer-store-cache/cs_etcd-0
DEBUG:deployer.charm:Cache dir /home/ubuntu/.local/share/juju/.deployer-store-cache/cs_~containers_kubernetes-8
DEBUG:deployer.charm:Retrieving store charm cs:~containers/kubernetes-8
DEBUG:deployer.charm:Cache dir /home/ubuntu/.local/share/juju/.deployer-store-cache/cs_topbeat-4
DEBUG:deployer.charm:Cache dir /home/ubuntu/.local/share/juju/.deployer-store-cache/cs_trusty_kibana-14
DEBUG:bundletester.utils:Updating JUJU_ENV: "" -> "gce:admin@local/test1"
/usr/local/bin/pip
The directory '/home/ubuntu/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Plea
se check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/ubuntu/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. chec
k the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Requirement already up-to-date: amulet in /usr/local/lib/python2.7/dist-packages
Requirement already up-to-date: requests in /usr/local/lib/python2.7/dist-packages (from amulet)
Requirement already up-to-date: libcharmstore in /usr/lib/python2.7/dist-packages (from amulet)
Requirement already up-to-date: PyYAML in /usr/lib/python2.7/dist-packages (from amulet)
Requirement already up-to-date: path.py in /usr/local/lib/python2.7/dist-packages (from amulet)
Requirement already up-to-date: theblues<1.0,>=0.1.1 in /usr/local/lib/python2.7/dist-packages (from libcharmstore->amulet)
Requirement already up-to-date: jujubundlelib>=0.4.1 in /usr/lib/python2.7/dist-packages (from theblues<1.0,>=0.1.1->libcharmstore->amulet)
DEBUG:root:Bootstrap environment: gce:admin@local/test1
DEBUG:deployer.env:Connecting to environment...
error: unrecognized args: ["gce:admin@local/test1"]
DEBUG:bundletester.utils:Updating JUJU_ENV: "gce:admin@local/test1" -> ""
Traceback (most recent call last):
File "/usr/local/bin/bundletester", line 9, in <module>
load_entry_point('bundletester==0.8.0', 'console_scripts', 'bundletester')()
File "/usr/local/lib/python2.7/dist-packages/bundletester/tester.py", line 149, in entrypoint
status = main()
File "/usr/local/lib/python2.7/dist-packages/bundletester/tester.py", line 141, in main
[report.emit(result) for result in run()]
File "/usr/local/lib/python2.7/dist-packages/bundletester/runner.py", line 134, in __call__
bootstrapped = self.builder.bootstrap()
File "/usr/local/lib/python2.7/dist-packages/bundletester/builder.py", line 53, in bootstrap
self.environment.connect()
File "/usr/lib/python2.7/dist-packages/deployer/env/go.py", line 88, in connect
self.client = self.client_class.connect(self.name)
File "/usr/lib/python2.7/dist-packages/jujuclient/environment.py", line 87, in connect
return connector().run(cls, env_name)
File "/usr/lib/python2.7/dist-packages/jujuclient/connector.py", line 41, in run
jhome, data = self.parse_env(env_name)
File "/usr/lib/python2.7/dist-packages/jujuclient/juju2/connector.py", line 47, in parse_env
model = self.get_model(env_name, controller_name, model_name)
File "/usr/lib/python2.7/dist-packages/jujuclient/juju2/connector.py", line 103, in get_model
raise EnvironmentNotBootstrapped(env_name)
jujuclient.exc.EnvironmentNotBootstrapped: Environment gce:admin@local/test1 is not bootstrapped
ubuntu@devbox:~/bundles/bundle-observable-kubernetes$ juju status
MODEL CONTROLLER CLOUD/REGION VERSION
test1 gce google/us-central1 2.0-beta15
APP VERSION STATUS EXPOSED ORIGIN CHARM REV OS
UNIT WORKLOAD AGENT MACHINE PUBLIC-ADDRESS PORTS MESSAGE
MACHINE STATE DNS INS-ID SERIES AZ
ubuntu@devbox:~/bundles/bundle-observable-kubernetes$ juju switch gce
gce:admin@local/test1 (no change)
ubuntu@devbox:~/bundles/bundle-observable-kubernetes$
ubuntu@devbox:~/bundles/bundle-observable-kubernetes$ juju version
2.0-beta15-xenial-amd64
Please let me know if you need any more information.
Depending on the underlying provider's load and latency, 60 seconds may not always be enough time to wait for model reset.
During times of high load, we are seeing:
12:32:32 ERROR:runner:Timeout exceeded. Failed to reset environment in 60 seconds.
After erroring, but by the time our job cleanup runs a minute or two later, the model has reset successfully:
[Services]
NAME STATUS EXPOSED CHARM
[Units]
ID STATE VERSION MACHINE PORTS PUBLIC-ADDRESS
[Machines]
ID STATE VERSION DNS INS-ID SERIES HARDWARE
0 started 1.25.6 172.17.106.170 085df998-1a14-4a85-9290-804089bea54f xenial arch=amd64 cpu-cores=1 mem=1536M root-disk=10240M availability-zone=nova
Running bt in parallel can cause it, or tests, to conflict on dpkg lock when trying to install packages, causing or more tests to fail.
When running as a user that does not have passwordless sudo, the password prompt does not bubble up and the command silently fails, but execution continues.
Evidence can be found by running bundletester that sudo apt-get install's a dependency on a user account that doesn't have a passwordless sudo elevation pri vilege.
Prior to migrating to bundletester from juju test
, OpenStack CI destroyed and re-bootstrapped between each test in the tests dir as the default behavior of juju test
.
While the model reset feature is nice, there are known and blocking issues with Juju 1.25.x where the controller randomly throws sha256 hashsum mismatches with a lot of iterations.
We need the capability to destroy and re-bootstrap between tests, giving feature parity with juju test.
Some larger bundles (big data, openstack) take longer than the default 45 minutes to deploy and reach a stable state. There should be a tests.yaml
option to increase that.
Please add special case for charms/bundles that have the default tests glob pattern (*) but don't have any tests.
$ /home/ubuntu/.local/bin/bundletester -l DEBUG -F -v
Traceback (most recent call last):
File "/home/ubuntu/.local/bin/bundletester", line 11, in <module>
sys.exit(entrypoint())
File "/home/ubuntu/.local/lib/python2.7/site-packages/bundletester/tester.py", line 149, in entrypoint
status = main()
File "/home/ubuntu/.local/lib/python2.7/site-packages/bundletester/tester.py", line 129, in main
suite = spec.SuiteFactory(options, options.testdir)
File "/home/ubuntu/.local/lib/python2.7/site-packages/bundletester/spec.py", line 258, in SuiteFactory
suite.find_suite()
File "/home/ubuntu/.local/lib/python2.7/site-packages/bundletester/spec.py", line 127, in find_suite
self.find_implicit_tests()
File "/home/ubuntu/.local/lib/python2.7/site-packages/bundletester/spec.py", line 164, in find_implicit_tests
dirname=self.model['directory'], suite=self)
File "/home/ubuntu/.local/lib/python2.7/site-packages/bundletester/spec.py", line 88, in spec
self.append(Spec(testfile, self.config, **kwargs))
File "/home/ubuntu/.local/lib/python2.7/site-packages/bundletester/spec.py", line 27, in Spec
if not os.path.exists(testfile) or \
File "/usr/lib/python2.7/genericpath.py", line 26, in exists
os.stat(path)
TypeError: coercing to Unicode: need string or buffer, NoneType found
I was running bundletester on AWS and at the end of tests bundletester threw a python Traceback:
DEBUG:root:Waiting for applications to be removed...
DEBUG:root: Remaining applications: [u'filebeat', u'elasticsearch', u'topbeat', u'kibana']
DEBUG:root: Remaining applications: [u'filebeat', u'elasticsearch', u'topbeat', u'kibana']
DEBUG:root: Remaining applications: [u'filebeat', u'elasticsearch', u'topbeat', u'kibana']
DEBUG:root: Remaining applications: [u'filebeat', u'elasticsearch', u'topbeat', u'kibana']
DEBUG:root: Remaining applications: [u'filebeat', u'elasticsearch', u'topbeat', u'kibana']
DEBUG:root: Remaining applications: [u'filebeat', u'elasticsearch', u'topbeat', u'kibana']
DEBUG:root: Remaining applications: [u'filebeat', u'elasticsearch', u'topbeat', u'kibana']
DEBUG:root: Remaining applications: [u'filebeat', u'elasticsearch', u'topbeat', u'kibana']
DEBUG:root: Remaining applications: [u'filebeat', u'elasticsearch', u'topbeat', u'kibana']
DEBUG:root: Remaining applications: [u'filebeat', u'elasticsearch', u'topbeat', u'kibana']
DEBUG:root: Remaining applications: [u'filebeat', u'elasticsearch', u'topbeat', u'kibana']
DEBUG:root: Remaining applications: [u'filebeat', u'elasticsearch', u'topbeat', u'kibana']
DEBUG:root: Remaining applications: [u'filebeat', u'elasticsearch', u'topbeat', u'kibana']
DEBUG:root: Remaining applications: [u'filebeat', u'elasticsearch', u'topbeat', u'kibana']
DEBUG:root: Remaining applications: [u'filebeat', u'elasticsearch', u'topbeat', u'kibana']
ERROR:runner:Timeout exceeded. Failed to destroy all applications in 60 seconds.
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/bundletester/runner.py", line 179, in _run_test
self.builder.reset()
File "/usr/local/lib/python2.7/dist-packages/bundletester/builder.py", line 137, in reset
' in %s seconds.' % timeout)
RuntimeError: Timeout exceeded. Failed to destroy all applications in 60 seconds.
DEBUG:bundletester.utils:Updating JUJU_ENV: "amazon:kube2" -> ""
Traceback (most recent call last):
File "/usr/local/bin/bundletester", line 9, in <module>
cs:trusty/kibana-14
load_entry_point('bundletester==0.8.0', 'console_scripts', 'bundletester')()
File "/usr/local/lib/python2.7/dist-packages/bundletester/tester.py", line 149, in entrypoint
status = main()
File "/usr/local/lib/python2.7/dist-packages/bundletester/tester.py", line 141, in main
[report.emit(result) for result in run()]
File "/usr/local/lib/python2.7/dist-packages/bundletester/reporter.py", line 145, in emit
cmd = message.test
File "/usr/local/lib/python2.7/dist-packages/bundletester/reporter.py", line 14, in __getattr__
return self[k]
KeyError: 'test'
It looks like it is trying to get message.test
and that fails because there is no key test
.
I've run into cases where tests are known to fail in certain circumstances but shouldn't be counted against the test run on the whole. For example:
So, in addition to PASS and FAIL I propose we also enable a test to emit SKIP in events where a test cannot or should not run in order for automated tests to accurately reflect the tested state of the charm (like cloud-weather-report).
(venv)mbruzek@warhorse:~/workspace/bundles/kubernetes-cluster$ bundletester -F -l DEBUG -e amazon -v -b bundle.yaml
DEBUG:deployer.charm:Cache dir /home/mbruzek/.juju/.deployer-store-cache/cs_~kubernetes_trusty_kubernetes-6
DEBUG:deployer.charm:Cache dir /home/mbruzek/.juju/.deployer-store-cache/cs_~kubernetes_trusty_kubernetes-master-8
DEBUG:deployer.charm:Cache dir /home/mbruzek/.juju/.deployer-store-cache/cs_~kubernetes_trusty_flannel-docker-4
DEBUG:deployer.charm:Retrieving store charm cs:~kubernetes/trusty/flannel-docker-4
Traceback (most recent call last):
File "/tmp/venv/bin/bundletester", line 9, in <module>
load_entry_point('bundletester==0.5.4', 'console_scripts', 'bundletester')()
File "/tmp/venv/local/lib/python2.7/site-packages/bundletester/tester.py", line 89, in main
suite = spec.SuiteFactory(options, options.testdir)
File "/tmp/venv/local/lib/python2.7/site-packages/bundletester/spec.py", line 252, in SuiteFactory
suite.find_suite()
File "/tmp/venv/local/lib/python2.7/site-packages/bundletester/spec.py", line 123, in find_suite
self.options.deployment)
File "/tmp/venv/local/lib/python2.7/site-packages/bundletester/utils.py", line 21, in fetch_deployment
deployment.fetch_charms() # update=True)
File "/tmp/venv/local/lib/python2.7/site-packages/deployer/deployment.py", line 188, in fetch_charms
charm.fetch()
File "/tmp/venv/local/lib/python2.7/site-packages/deployer/charm.py", line 154, in fetch
self._fetch_store_charm()
File "/tmp/venv/local/lib/python2.7/site-packages/deployer/charm.py", line 195, in _fetch_store_charm
ufh = urllib2.urlopen(store_url)
File "/usr/lib/python2.7/urllib2.py", line 154, in urlopen
return opener.open(url, data, timeout)
File "/usr/lib/python2.7/urllib2.py", line 437, in open
response = meth(req, response)
File "/usr/lib/python2.7/urllib2.py", line 550, in http_response
'http', request, response, code, msg, hdrs)
File "/usr/lib/python2.7/urllib2.py", line 475, in error
return self._call_chain(*args)
File "/usr/lib/python2.7/urllib2.py", line 409, in _call_chain
result = func(*args)
File "/usr/lib/python2.7/urllib2.py", line 558, in http_error_default
raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
urllib2.HTTPError: HTTP Error 404: Not Found
For some reason, bundletester seems to care what revision control system I'm using and is unable to run tests on my branch. Possibly this is to do with bzrlib versions, as bundletester needs to be installed in a virtualenv to avoid conflicts between its required version of bzrlib and the system bzrlib. In any case, attempting to sniff and access the VCS seems a waste of time and fraught with danger.
stub@belch:~/charms/postgresql/enable-integration-tests$ ~/lib/bundletester/bin/bundletester -t ~/charms/postgresql/enable-integration-tests
Traceback (most recent call last):
File "/home/stub/lib/bundletester/bin/bundletester", line 9, in <module>
load_entry_point('bundletester==0.5.0', 'console_scripts', 'bundletester')()
File "/home/stub/lib/bundletester/local/lib/python2.7/site-packages/bundletester/tester.py", line 77, in main
suite = spec.SuiteFactory(options, options.testdir)
File "/home/stub/lib/bundletester/local/lib/python2.7/site-packages/bundletester/spec.py", line 242, in SuiteFactory
model = classifier(directory)
File "/home/stub/lib/bundletester/local/lib/python2.7/site-packages/bundletester/spec.py", line 217, in CharmClassifier
data = lp.infer_charm(directory) or {}
File "/home/stub/lib/bundletester/local/lib/python2.7/site-packages/bundletester/vcs.py", line 28, in infer_charm
origin = self.get_origin(directory)
File "/home/stub/lib/bundletester/local/lib/python2.7/site-packages/bundletester/vcs.py", line 12, in get_origin
b = branch.Branch.open(directory)
File "/home/stub/lib/bundletester/local/lib/python2.7/site-packages/bzrlib/branch.py", line 188, in open
possible_transports=possible_transports)
File "/home/stub/lib/bundletester/local/lib/python2.7/site-packages/bzrlib/bzrdir.py", line 1079, in open_branch
possible_transports=possible_transports)
File "/home/stub/lib/bundletester/local/lib/python2.7/site-packages/bzrlib/branch.py", line 2028, in open
found_repository = a_bzrdir.find_repository()
File "/home/stub/lib/bundletester/local/lib/python2.7/site-packages/bzrlib/bzrdir.py", line 571, in find_repository
raise errors.NoRepositoryPresent(self)
bzrlib.errors.NoRepositoryPresent: No repository present: "file:///tmp/bundletester-8tXQhZ/enable-integration-tests/"
ubuntu@manjoubuntu:~$ bundletester --help
Traceback (most recent call last):
File "/usr/local/bin/bundletester", line 5, in
from pkg_resources import load_entry_point
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2749, in
working_set = WorkingSet._build_master()
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 444, in _build_master
ws.require(requires)
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 725, in require
needed = self.resolve(parse_requirements(requirements))
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 628, in resolve
raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: stuf>=0.9.16
Please make bundletester depend on stuf.
I am trying to use juju 2.0 and I am unable to run bundletester because it tries passing a "-e" to juju, and that option has changed to "-m" for model.
We should update this to work with Juju 2.x and later.
Bundletester "passes" and exits cleanly when passed a test filename that does not exist. It essentially bootstrapped then destroyed and exited 0.
I would expect it to fail early in this case.
func27-smoke runtests: commands[0] | bundletester -vl DEBUG -r json -o func-results.json gate-basic-xenial-mitaka --no-destroy
DEBUG:bundletester.utils:Updating JUJU_ENV: "" -> "osci-sv14"
DEBUG:root:Bootstrap environment: osci-sv14
INFO:root:Bootstrapping Juju Environment...
INFO:deployer.env:bootstrapping, this might take a while...
INFO:deployer.env: Bootstrap complete
DEBUG:deployer.env:Connecting to environment...
/var/lib/jenkins/workspace/test_charm_amulet_smoke/asset/barbican/.tox/py27/local/lib/python2.7/site-packages/jujuclient/connector.py:18: RuntimeWarning: This version of Python does not support TLSv1.2. Please use Python 2.7.9+ or 3.4+ instead. Attempting to use TLSv1 - may not work with all versions of Juju.
'all versions of Juju.', RuntimeWarning)
DEBUG:deployer.env:Connected to environment
DEBUG:deployer.env: Terminating machines forcefully
DEBUG:root:Waiting for applications to be removed...
DEBUG:runner:call ['/var/lib/jenkins/workspace/test_charm_amulet_smoke/asset/barbican/.tox/py27/bin/charm-proof'] (cwd: /tmp/bundletester-DM9iEv/barbican)
DEBUG:runner:I: No icon.svg file.
DEBUG:runner:I: all charms should provide at least one thing
DEBUG:runner:I: config.yaml: option ssl_key has no default value
DEBUG:runner:I: config.yaml: option os-public-hostname has no default value
DEBUG:runner:I: config.yaml: option vip has no default value
DEBUG:runner:I: config.yaml: option ssl_cert has no default value
DEBUG:runner:I: config.yaml: option os-internal-network has no default value
DEBUG:runner:I: config.yaml: option os-admin-network has no default value
DEBUG:runner:I: config.yaml: option ssl_ca has no default value
DEBUG:runner:I: config.yaml: option os-public-network has no default value
DEBUG:runner:Exit Code: 0
DEBUG:bundletester.utils:Updating JUJU_ENV: "osci-sv14" -> ""
With the current juju test tools, the -p option can be used to specify environment variables to be preserved and passed into each test. CI automation environments sometimes rely on that functionality. Please consider adding a comparable feature to bundletester.
See filter_yamls() function.
When fetching repos, clone shallow instead of full.
When installing bundletester system wide via pip:
charles@xps13:~/charms/trusty/hdp-hadoop$ bundletester -e amazon -n
Traceback (most recent call last):
File "/usr/local/bin/bundletester", line 9, in <module>
load_entry_point('bundletester==0.3.6', 'console_scripts', 'bundletester')()
File "/usr/local/lib/python2.7/dist-packages/bundletester/tester.py", line 72, in main
[report.emit(result) for result in run()]
File "/usr/local/lib/python2.7/dist-packages/bundletester/runner.py", line 124, in __call__
self.build()
File "/usr/local/lib/python2.7/dist-packages/bundletester/runner.py", line 108, in build
vpath = os.path.join(self.directory, '.venv')
AttributeError: 'Runner' object has no attribute 'directory'
In declaring tests in the tests.yaml, the readme clearly states:
tests: "[0-9]-*"
However due to having a bad memory, I formatted it as a list:
tests: ["10-*"]
this gave me a pretty strange stack trace that wasn't obvious what I had done.
(.venv) charles@lxd:/media/psf/Home/projects/work/builds/etcd$ bundletester
Traceback (most recent call last):
File "/home/charles/.venv/bin/bundletester", line 11, in <module>
sys.exit(entrypoint())
File "/home/charles/.venv/local/lib/python2.7/site-packages/bundletester/tester.py", line 149, in entrypoint
status = main()
File "/home/charles/.venv/local/lib/python2.7/site-packages/bundletester/tester.py", line 129, in main
suite = spec.SuiteFactory(options, options.testdir)
File "/home/charles/.venv/local/lib/python2.7/site-packages/bundletester/spec.py", line 310, in SuiteFactory
suite.find_suite()
File "/home/charles/.venv/local/lib/python2.7/site-packages/bundletester/spec.py", line 191, in find_suite
self.find_tests()
File "/home/charles/.venv/local/lib/python2.7/site-packages/bundletester/spec.py", line 158, in find_tests
tests = set(glob.glob(os.path.join(self.testdir, testpat)))
File "/home/charles/.venv/lib/python2.7/posixpath.py", line 68, in join
if b.startswith('/'):
AttributeError: 'list' object has no attribute 'startswith'
Could we trap this for better error messaging? I can see users inputting invalid entries in tests.yaml
as I did above.
When I test a branch from a shared repository, I get the following. If I bzr export before testing, it works. I'm not sure what value is being added that I'm missing, but it doesn't appear to take into account the shared repo when it copies the tree.
Perhaps the vcs operations should be done before the copy, or on the orig directory, and then use a bzr export
to do the copy?
not sure.
Traceback (most recent call last):
File "/home/dpb/src/canonical/bundletester/dpb1/.venv/bin/bundletester", line 9, in <module>
load_entry_point('bundletester==0.5.0', 'console_scripts', 'bundletester')()
File "/home/dpb/src/canonical/bundletester/dpb1/.venv/local/lib/python2.7/site-packages/bundletester/tester.py", line 89, in main
suite = spec.SuiteFactory(options, options.testdir)
File "/home/dpb/src/canonical/bundletester/dpb1/.venv/local/lib/python2.7/site-packages/bundletester/spec.py", line 248, in SuiteFactory
model = classifier(directory, options)
File "/home/dpb/src/canonical/bundletester/dpb1/.venv/local/lib/python2.7/site-packages/bundletester/spec.py", line 223, in CharmClassifier
data = lp.infer_charm(directory) or {}
File "/home/dpb/src/canonical/bundletester/dpb1/.venv/local/lib/python2.7/site-packages/bundletester/vcs.py", line 28, in infer_charm
origin = self.get_origin(directory)
File "/home/dpb/src/canonical/bundletester/dpb1/.venv/local/lib/python2.7/site-packages/bundletester/vcs.py", line 12, in get_origin
b = branch.Branch.open(directory)
File "/home/dpb/src/canonical/bundletester/dpb1/.venv/local/lib/python2.7/site-packages/bzrlib/branch.py", line 188, in open
possible_transports=possible_transports)
File "/home/dpb/src/canonical/bundletester/dpb1/.venv/local/lib/python2.7/site-packages/bzrlib/bzrdir.py", line 1079, in open_branch
possible_transports=possible_transports)
File "/home/dpb/src/canonical/bundletester/dpb1/.venv/local/lib/python2.7/site-packages/bzrlib/branch.py", line 2028, in open
found_repository = a_bzrdir.find_repository()
File "/home/dpb/src/canonical/bundletester/dpb1/.venv/local/lib/python2.7/site-packages/bzrlib/bzrdir.py", line 571, in find_repository
raise errors.NoRepositoryPresent(self)
bzrlib.errors.NoRepositoryPresent: No repository present: "file:///tmp/bundletester-QmSb_p/backends-support/"
Passing in tests.yaml is preferable I think, since that'd make it easy to specify different timeouts per test. Perhaps also include global timeouts to use for all tests instead. We'll want two separate values - one for the call to Deployment.setup(), and one for the call to sentry.wait().
In the flannel docker charm - there is a dependent make target which installs the VENV and sets up ansible playbook linting.
The format of the Makefile is as follows:
virtualenv: .venv/bin/python
.venv/bin/python:
virtualenv .venv
.venv/bin/pip install nose flake8 mock pyyaml charmhelpers ansible-lint ansible
lint:.venv/bin/python
@echo Linting Charm
@charm proof
@echo Linting Ansible Routines
@.venv/bin/ansible-lint playbooks/*
When executing via bundletester, it does not actually fire off the dependent job of :.venv/bin/python with the output:
FAIL: flannel-docker::make lint
[/usr/bin/make -s lint exit 2]
Linting Charm
I: missing recommended hook start
I: File config.yaml not found.
Linting Ansible Routines
/bin/sh: 1: .venv/bin/ansible-lint: not found
make: *** [lint] Error 127
When executing /usr/bin/make -s lint - it does call the dependent job, and can be verified with no .venv directory present in the charm.
In case you want to use a tests.yaml with a non-local charm
To emulate how users deploy charms and bundles remove deployer from bundletester for juju2.0 as juju2.0 has deploy native.
I recently ran into a case where a charm had existing tests written, called via make test. The tests were missing some dependencies, which I was ultimately able to satisfy by adding the necessary apt-get and pip install lines to the makefile's test stanza, but I had to use tests/tests.yaml to disable bundletester's use of virtualenv, so it would use the system python that now had the modules installed.
I think it'd be more useful to add the ability to define a list of pip modules via tests.yaml (similar to how it now takes a list of packages to be installed via apt-get) that will be installed inside bundletester's .venv.
Update spec.filter_yamls() to recognize the v4 format.
I bootstrapped a juju environment (tried an Openstack and a MAAS environment) and used the bootstrap node for my bundletester host. After deploying, I installed python-pip and python-dev via apt and then used pip to install bundletester. The stack trace I get when I just run bundletester in this environment is this:
bundletester
Traceback (most recent call last):
File "/usr/local/bin/bundletester", line 5, in
from pkg_resources import load_entry_point
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2749, in
working_set = WorkingSet._build_master()
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 446, in _build_master
return cls._build_from_requirements(requires)
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 459, in _build_from_requirements
dists = ws.resolve(reqs, Environment())
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 632, in resolve
raise VersionConflict(dist,req) # XXX put more info here
pkg_resources.VersionConflict: (PyYAML 3.10 (/usr/lib/python2.7/dist-packages), Requirement.parse('PyYAML==3.11'))
I hit the same issue when doing this in a virtualenv setup as well.
Product version: bundetester 0.5.7
I've started to use bundletester last week, great product thus far!
Last week I installed bundletester in a controlled networking environment. All of the lab systems are behind a firewall and usually all of my tools require me to sett proxy flags.
$export http_proxy=http://my.proxy.server:3128
$export https_proxy=http://my.proxy.server:3128
From here i'm able to usually talk with most of the :80/:443 web servers out there and pull urls.
I found that when I set this using bundletester I see a traceback. See my output below, I have pasted both results without and with a proxy set in the env.
Without http_proxy && https_proxy
DEBUG:bundletester.utils:Updating JUJU_ENV: "" -> "maas"
DEBUG:root:Bootstrap environment: maas
DEBUG:deployer.env:Connecting to environment...
DEBUG:deployer.env:Connected to environment
DEBUG:deployer.env: Terminating machines forcefully
DEBUG:root:Waiting for services to be removed...
DEBUG:runner:call ['/usr/local/bin/charm-proof'] (cwd: /tmp/bundletester-epkY2z/mysql)
DEBUG:runner:I: config.yaml: option key has no default value
DEBUG:runner:I: config.yaml: option source has no default value
DEBUG:runner:Exit Code: 0
mysql
charm-proof PASS
DEBUG:deployer.env: Terminating machines forcefully
DEBUG:root:Waiting for services to be removed...
DEBUG:runner:call ['/usr/bin/make', '-s', 'lint'] (cwd: /tmp/bundletester-epkY2z/mysql)
DEBUG:runner:New python executable in .venv/bin/python
DEBUG:runner:Installing setuptools, pip, wheel...done.
DEBUG:runner:Collecting flake8
DEBUG:runner: Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x2b356ebaa2d0>, 'Connection to pypi.python.org timed out. (connect timeout=15)')': /simple/flake8/
DEBUG:runner: Retrying (Retry(total=3, connect=None, read=None, redirect=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x2b356ebc8510>, 'Connection to pypi.python.org timed out. (connect timeout=15)')': /simple/flake8/
DEBUG:runner: Retrying (Retry(total=2, connect=None, read=None, redirect=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x2b356ebc8650>, 'Connection to pypi.python.org timed out. (connect timeout=15)')': /simple/flake8/
DEBUG:runner: Retrying (Retry(total=1, connect=None, read=None, redirect=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x2b356ebc8790>, 'Connection to pypi.python.org timed out. (connect timeout=15)')': /simple/flake8/
DEBUG:runner: Retrying (Retry(total=0, connect=None, read=None, redirect=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x2b356ebc88d0>, 'Connection to pypi.python.org timed out. (connect timeout=15)')': /simple/flake8/
with http_proxy && https_proxy set:
DEBUG:bundletester.utils:Updating JUJU_ENV: "" -> "maas"
DEBUG:root:Bootstrap environment: maas
DEBUG:deployer.env:Connecting to environment...
DEBUG:root:Connecting proxy...
DEBUG:bundletester.utils:Updating JUJU_ENV: "maas" -> ""
Traceback (most recent call last):
File "/usr/local/bin/bundletester", line 9, in <module>
load_entry_point('bundletester==0.5.7', 'console_scripts', 'bundletester')()
File "/usr/local/lib/python2.7/dist-packages/bundletester/tester.py", line 105, in main
[report.emit(result) for result in run()]
File "/usr/local/lib/python2.7/dist-packages/bundletester/runner.py", line 133, in __call__
bootstrapped = self.builder.bootstrap()
File "/usr/local/lib/python2.7/dist-packages/bundletester/builder.py", line 40, in bootstrap
self.environment.connect()
File "/usr/local/lib/python2.7/dist-packages/deployer/env/go.py", line 65, in connect
self.client = EnvironmentClient.connect(self.name)
File "/usr/local/lib/python2.7/dist-packages/jujuclient.py", line 460, in connect
return Connector().run(cls, env_name)
File "/usr/local/lib/python2.7/dist-packages/jujuclient.py", line 142, in run
cert_path, data.get('environ-uuid'))
File "/usr/local/lib/python2.7/dist-packages/jujuclient.py", line 150, in connect_env
env = cls(endpoint, name=name, ca_cert=cert_path, env_uuid=env_uuid)
File "/usr/local/lib/python2.7/dist-packages/jujuclient.py", line 448, in __init__
self.conn = Connector.connect_socket(endpoint, self._ca_cert)
File "/usr/local/lib/python2.7/dist-packages/jujuclient.py", line 162, in connect_socket
endpoint, origin=endpoint, sslopt=sslopt)
File "/usr/local/lib/python2.7/dist-packages/websocket/_core.py", line 104, in create_connection
websock.connect(url, **options)
File "/usr/local/lib/python2.7/dist-packages/websocket/_core.py", line 266, in connect
self.sock, addrs = connect(url, self.sock_opt, proxy_info(**options))
File "/usr/local/lib/python2.7/dist-packages/websocket/_http.py", line 65, in connect
sock = _tunnel(sock, hostname, port, auth)
File "/usr/local/lib/python2.7/dist-packages/websocket/_http.py", line 186, in _tunnel
"failed CONNECT via proxy status: %r" + status)
TypeError: cannot concatenate 'str' and 'int' objects
$ pip list
amulet (1.12.0)
argparse (1.2.1)
Babel (1.3)
backports.ssl-match-hostname (3.4.0.2)
blessings (1.6)
boto (2.20.1)
bundletester (0.5.7)
We're seeing tests run for days on juju-ci; something obviously fails but the build doesn't fail. Here's some examples:
http://juju-ci.vapour.ws/job/charm-bundle-test-aws/4851/
http://juju-ci.vapour.ws/job/charm-bundle-test-lxc/4697/
http://juju-ci.vapour.ws/job/charm-bundle-test-aws/4869/
Using bundletester in a manual environment. I thought no-destroy
would stop the manually provisioned machines from being destroyed. However, the machines are still destroyed even with that flag.
no-destroy
do exactly?I'd like to use bundletester to test compatibility with our manually provisioned environment, so switching to another provider is not really an option for me.
ubuntu@manjoubuntu:~$ sudo bundletester -e maas -t cs:trusty/mysql -o result.json
Traceback (most recent call last):
File "/usr/local/bin/bundletester", line 9, in
load_entry_point('bundletester==0.5.4', 'console_scripts', 'bundletester')()
File "/usr/local/lib/python2.7/dist-packages/bundletester/tester.py", line 74, in main
options = configure()
File "/usr/local/lib/python2.7/dist-packages/bundletester/tester.py", line 69, in configure
logging.basicConfig(level=options.log_level.upper())
AttributeError: 'int' object has no attribute 'upper'
Bundletester currently runs as a non-root user, which can cause some tests to fail (such as while calling apt-get to install a test dependency).
The workaround is to modify test scripts to use sudo, which will work passwordless in the automated test environment, until containerization is done and bundletester can run as root.
On a fresh installation of juju + bundletester on xenial you reach this exception when calling bundletester:
ubuntu@launchjujulocal2:~$ bundletester -vFt cs:haproxy-38 -l DEBUG -e aws-us-east-1:haproxy -e localhost-localhost:default
Traceback (most recent call last):
File "/usr/local/bin/bundletester", line 5, in <module>
from pkg_resources import load_entry_point
File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2927, in <module>
@_call_aside
File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2913, in _call_aside
f(*args, **kwargs)
File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2940, in _initialize_master_working_set
working_set = WorkingSet._build_master()
File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 637, in _build_master
return cls._build_from_requirements(__requires__)
File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 650, in _build_from_requirements
dists = ws.resolve(reqs, Environment())
File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 834, in resolve
raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.ContextualVersionConflict: (PyYAML 3.12 (/usr/local/lib/python2.7/dist-packages), Requirement.parse('PyYAML==3.11'), set(['jujubundlelib']))
A workaround is to force the installation of 3.11 PyYaml:
pip install PyYAML==3.11
Bundletester should provide a mechanism to consume the standard test-requirements.txt type of python dependency declaration, such as is commonly used with tox.
There's lots of info in the repo README that's not in --help. At least some of that info should be included in --help.
When deploying this bundle https://api.jujucharms.com/charmstore/v5/~juju-qa/ceph-with-dash-3/archive/ceph-with-dash-lxd.yaml, the deployer generates invalid juju command. Since the bundle can be deployed using the Deployer (https://bugs.launchpad.net/juju-deployer/+bug/1638685), the issue might be with the Bundletester
2016-11-01 11:27:05 [DEBUG] deployer.env: Connecting to cwr-maas-power8:cwr-maas-power8...
2016-11-01 11:27:06 [DEBUG] deployer.env: Connected.
2016-11-01 11:27:06 [INFO] deployer.import: Creating machines...
2016-11-01 11:27:06 [INFO] deployer.import: Machine 0 will be created
2016-11-01 11:27:06 [INFO] deployer.import: Deploying applications...
2016-11-01 11:27:06 [INFO] deployer.import: Deploying application ceph-collector using cs:~canonical-storage/xenial/ceph-collector-4
2016-11-01 11:27:06 [DEBUG] deployer.import: Refetching status for placement deploys
2016-11-01 11:27:15 [DEBUG] deployer.import: Setting annotations
2016-11-01 11:27:15 [INFO] deployer.import: Deploying application ceph-dash using cs:~canonical-storage/xenial/ceph-dash-11
2016-11-01 11:27:15 [DEBUG] deployer.import: Refetching status for placement deploys
2016-11-01 11:27:20 [ERROR] deployer.env: Error deploying application 'ceph-dash'
2016-11-01 11:27:20 [ERROR] deployer.env: Command (juju deploy -m cwr-maas-power8:cwr-maas-power8 --to=lxd: --series xenial cs:~canonical-storage/xenial/ceph-dash-11 ceph-dash) Output:
error: invalid --to parameter "lxd:"
2016-11-01 11:27:20 [INFO] deployer.cli: Deployment stopped. run time: 14.98
console log: https://pastebin.canonical.com/170792/
cwr test: http://cwr.vapour.ws/bundle__juju_qa_ceph_with_dash/0c1f6671f3424e288345ac043a6a4209/report.html
If the initial bundle deployment fails, handle it gracefully enough that a test result is still produced. Not sure if we should even try to run any further tests in this case, or abort here?
If resetting, it would be reasonable to check for error status on units and force-resolve them.
I recently ran into a timeout while testing Pig. I looked in the help but I couldn't find an option to increase the timeout value. Thus, this bug is to check out to set a timeout value, and to add that to the help menu.
$ bundletester
hdp-pig
charm-proof PASS
[sudo] password for arosales:
00-setup PASS
10-deploy-hadoop-pig ERROR
ERROR: hdp-pig::10-deploy-hadoop-pig
[/home/arosales/devel/bzr/review-queue/amir-pig-2/hdp-pig/tests/10-deploy-hadoop-pig exit 1]
2014-09-17 17:23:38 Starting deployment of local
2014-09-17 17:23:45 Deploying services...
2014-09-17 17:23:45 Deploying service compute-node using cs:~asanjar/trusty/hdp-hadoop-15
2014-09-17 17:23:50 Deploying service compute-node-sentry using local:trusty/compute-node-sentry
2014-09-17 17:23:52 Deploying service hdp-pig using cs:~asanjar/trusty/hdp-pig-12
2014-09-17 17:23:57 Deploying service hdp-pig-sentry using local:trusty/hdp-pig-sentry
2014-09-17 17:24:00 Deploying service relation-sentry using local:trusty/relation-sentry
2014-09-17 17:24:05 Deploying service yarn-hdfs-master using cs:~asanjar/trusty/hdp-hadoop-15
2014-09-17 17:24:08 Deploying service yarn-hdfs-master-sentry using local:trusty/yarn-hdfs-master-sentry
2014-09-17 17:24:17 Config specifies num units for subordinate: compute-node-sentry
2014-09-17 17:24:17 Config specifies num units for subordinate: hdp-pig-sentry
2014-09-17 17:24:17 Config specifies num units for subordinate: yarn-hdfs-master-sentry
2014-09-17 18:08:59 Reached deployment timeout.. exiting
2014-09-17 18:08:59 Deployment stopped. run time: 2721.10
Traceback (most recent call last):
File "/home/arosales/devel/bzr/review-queue/amir-pig-2/hdp-pig/tests/10-deploy-hadoop-pig", line 63, in
runner = TestDeployment()
File "/home/arosales/devel/bzr/review-queue/amir-pig-2/hdp-pig/tests/10-deploy-hadoop-pig", line 15, in init
self.d.setup(timeout=9000000)
File "/usr/lib/python3/dist-packages/amulet/deployer.py", line 266, in setup
self.juju_env], cwd=self.deployer_dir)
File "/usr/lib/python3.4/subprocess.py", line 557, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['juju-deployer', '-W', '-L', '-c', '/tmp/amulet-juju-deployer-f_7ax7zt.json', '-e', 'local', 'local']' returned non-zero exit status 1
PASS: 2 ERROR: 1 Total: 3 (2762.728466 sec)
(bundletester)arosales@x230:~/devel/bzr/review-queue/amir-pig-2/hdp-pig$ bundletester --help
usage: bundletester [-h] [-e ENVIRONMENT] [-t TESTDIR] [-b BUNDLE]
[-d DEPLOYMENT] [--no-destroy] [-l LOG_LEVEL] [-o OUTPUT]
[-n] [-r {json,spec,dot}] [-v] [-F] [-s] [-x EXCLUDE]
[--test-pattern TEST_PATTERN]
[tests [tests ...]]
positional arguments:
tests
optional arguments:
-h, --help show this help message and exit
-e ENVIRONMENT, --environment ENVIRONMENT
-t TESTDIR, --testdir TESTDIR
-b BUNDLE, -c BUNDLE, --bundle BUNDLE
-d DEPLOYMENT, --deployment DEPLOYMENT
--no-destroy
-l LOG_LEVEL, --log-level LOG_LEVEL
-o OUTPUT, --output OUTPUT
-n, --dry-run
-r {json,spec,dot}, --reporter {json,spec,dot}
-v, --verbose
-F, --allow-failure
-s, --skip-implicit Don't include automatically generated tests
-x EXCLUDE, --exclude EXCLUDE
--test-pattern TEST_PATTERN
We should print a helpful error message instead.
$ bundletester -t cs:trusty/wordpress -l DEBUG
INFO:requests.packages.urllib3.connectionpool:Starting new HTTPS connection (1): store.juju.ubuntu.com
/usr/local/lib/python2.7/dist-packages/requests/packages/urllib3/util/ssl_.py:90: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
InsecurePlatformWarning
DEBUG:requests.packages.urllib3.connectionpool:"GET /charm-info?stats=0&charms=trusty%2Fwordpress HTTP/1.1" 200 208
DEBUG:bundletester.fetchers:Downloading https://store.juju.ubuntu.com/charm/trusty/wordpress
INFO:requests.packages.urllib3.connectionpool:Starting new HTTPS connection (1): store.juju.ubuntu.com
/usr/local/lib/python2.7/dist-packages/requests/packages/urllib3/util/ssl_.py:90: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
InsecurePlatformWarning
DEBUG:requests.packages.urllib3.connectionpool:"GET /charm/trusty/wordpress HTTP/1.1" 200 47012
DEBUG:bundletester.fetchers:Extracting /tmp/bundletester-JQSz3S/tmpFszFvb to /tmp/bundletester-JQSz3S/tmpKcdoKe
Traceback (most recent call last):
File "/usr/local/bin/bundletester", line 9, in <module>
load_entry_point('bundletester==0.5.4', 'console_scripts', 'bundletester')()
File "/usr/local/lib/python2.7/dist-packages/bundletester/tester.py", line 84, in main
tempfile.mkdtemp(prefix='bundletester-'))
File "/usr/local/lib/python2.7/dist-packages/bundletester/fetchers.py", line 210, in fetch
charm_dir = self.extract_archive(archive, dir_)
File "/usr/local/lib/python2.7/dist-packages/bundletester/fetchers.py", line 223, in extract_archive
check_call('unzip {} -d {}'.format(archive, tempdir))
File "/usr/local/lib/python2.7/dist-packages/bundletester/fetchers.py", line 280, in check_call
return check_output(cmd, **kw)
File "/usr/local/lib/python2.7/dist-packages/bundletester/fetchers.py", line 293, in check_output
**kw
File "/usr/lib/python2.7/subprocess.py", line 710, in __init__
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1327, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
ubuntu@ubuntu:~$
ubuntu@xenial:/charms/trusty/quobyte-client$ /home/ubuntu/.local/bin/bundletester -l DEBUG -F -v
DEBUG:bundletester.utils:Updating JUJU_ENV: "" -> "amazon"
DEBUG:root:Bootstrap environment: amazon
DEBUG:deployer.env:Connecting to environment...
DEBUG:deployer.env:Connected to environment
DEBUG:deployer.env: Terminating machines forcefully
DEBUG:root:Waiting for services to be removed...
DEBUG:runner:call ['/usr/bin/charm-proof'] (cwd: /tmp/bundletester-9fmFGc/quobyte-client)
DEBUG:runner:W: Includes template README.ex file
DEBUG:runner:W: README.ex includes boilerplate: Describe the intended usage of this charm and anything unique about how this charm relates to others here.
DEBUG:runner:W: README.ex includes boilerplate: This README will be displayed in the Charm Store, it should be either Markdown or RST. Ideal READMEs include instructions on how to use the charm, expected usage, and charm features that your audience might be interested in. For an example of a well written README check out Hadoop: http://jujucharms.com/charms/precise/hadoop
DEBUG:runner:W: README.ex includes boilerplate: Use this as a Markdown reference if you need help with the formatting of this README: http://askubuntu.com/editing-help
DEBUG:runner:W: README.ex includes boilerplate: This charm provides [service](http://example.com). Add a description here of what the service itself actually does.
DEBUG:runner:W: README.ex includes boilerplate: Also remember to check the [icon guidelines](https://jujucharms.com/docs/stable/authors-charm-icon) so that your charm looks good in the Juju GUI.
DEBUG:runner:W: README.ex includes boilerplate: Step by step instructions on using the charm:
DEBUG:runner:W: README.ex includes boilerplate: and so on. If you're providing a web service or something that the end user needs to go to, tell them here, especially if you're deploying a service that might listen to a non-default port.
DEBUG:runner:W: README.ex includes boilerplate: You can then browse to http://ip-address to configure the service.
DEBUG:runner:W: README.ex includes boilerplate: If the charm has any recommendations for running at scale, outline them in examples here. For example if you have a memcached relation that improves performance, mention it here.
DEBUG:runner:W: README.ex includes boilerplate: This not only helps users but gives people a place to start if they want to help you add features to your charm.
DEBUG:runner:W: README.ex includes boilerplate: The configuration options will be listed on the charm store, however If you're making assumptions or opinionated decisions in the charm (like setting a default administrator password), you should detail that here so the user knows how to change it immediately, etc.
DEBUG:runner:W: README.ex includes boilerplate: Though this will be listed in the charm store itself don't assume a user will know that, so include that information here:
DEBUG:runner:W: README.ex includes boilerplate: - Upstream mailing list or contact information
DEBUG:runner:W: README.ex includes boilerplate: - Feel free to add things if it's useful for users
DEBUG:runner:I: all charms should provide at least one thing
DEBUG:runner:Exit Code: 100
quobyte-client
charm-proof FAIL
DEBUG:deployer.env: Terminating machines forcefully
DEBUG:root:Waiting for services to be removed...
DEBUG:runner:call ['/usr/bin/make', '-s', 'lint'] (cwd: /tmp/bundletester-9fmFGc/quobyte-client)
DEBUG:runner:/bin/sh: 1: flake8: not found
DEBUG:runner:Makefile:7: recipe for target 'lint' failed
DEBUG:runner:make: *** [lint] Error 127
DEBUG:runner:Exit Code: 2
make lint FAIL
DEBUG:deployer.env: Terminating machines forcefully
DEBUG:root:Waiting for services to be removed...
DEBUG:runner:call ['/tmp/bundletester-9fmFGc/quobyte-client/tests/00-setup'] (cwd: /tmp/bundletester-9fmFGc/quobyte-client)
DEBUG:runner:gpg: keyring `/tmp/tmpze38tcsw/secring.gpg' created
DEBUG:runner:gpg: keyring `/tmp/tmpze38tcsw/pubring.gpg' created
DEBUG:runner:gpg: requesting key C8068B11 from hkp server keyserver.ubuntu.com
DEBUG:runner:gpg: /tmp/tmpze38tcsw/trustdb.gpg: trustdb created
DEBUG:runner:gpg: key C8068B11: public key "Launchpad Ensemble PPA" imported
DEBUG:runner:gpg: Total number processed: 1
DEBUG:runner:gpg: imported: 1 (RSA: 1)
DEBUG:runner:OK
DEBUG:runner:Hit:1 http://archive.ubuntu.com/ubuntu xenial InRelease
DEBUG:runner:Get:2 http://archive.ubuntu.com/ubuntu xenial-updates InRelease [94.5 kB]
DEBUG:runner:Hit:3 http://security.ubuntu.com/ubuntu xenial-security InRelease
DEBUG:runner:Hit:4 http://ppa.launchpad.net/juju/devel/ubuntu xenial InRelease
DEBUG:runner:Hit:5 http://archive.ubuntu.com/ubuntu xenial-backports InRelease
DEBUG:runner:Get:6 http://ppa.launchpad.net/juju/stable/ubuntu xenial InRelease [17.5 kB]
DEBUG:runner:Get:7 http://ppa.launchpad.net/juju/stable/ubuntu xenial/main amd64 Packages [6,240 B]
DEBUG:runner:Get:8 http://ppa.launchpad.net/juju/stable/ubuntu xenial/main Translation-en [2,728 B]
DEBUG:runner:Fetched 121 kB in 1s (116 kB/s)
DEBUG:runner:Reading package lists...
DEBUG:runner:Reading package lists...
DEBUG:runner:Building dependency tree...
DEBUG:runner:Reading state information...
DEBUG:runner:python-requests is already the newest version (2.9.1-3).
DEBUG:runner:python-requests set to manually installed.
DEBUG:runner:The following additional packages will be installed:
DEBUG:runner: libpython3-all-dev python-amulet python3-all python3-all-dev python3-amulet
DEBUG:runner: python3-libcharmstore python3-path python3-theblues
DEBUG:runner:The following NEW packages will be installed:
DEBUG:runner: amulet libpython3-all-dev python-amulet python3-all python3-all-dev
DEBUG:runner: python3-amulet python3-libcharmstore python3-path python3-theblues
DEBUG:runner:0 upgraded, 9 newly installed, 0 to remove and 7 not upgraded.
DEBUG:runner:Need to get 76.2 kB of archives.
DEBUG:runner:After this operation, 410 kB of additional disk space will be used.
DEBUG:runner:Get:1 http://archive.ubuntu.com/ubuntu xenial/main amd64 libpython3-all-dev amd64 3.5.1-3 [996 B]
DEBUG:runner:Get:2 http://archive.ubuntu.com/ubuntu xenial/main amd64 python3-all amd64 3.5.1-3 [970 B]
DEBUG:runner:Get:3 http://archive.ubuntu.com/ubuntu xenial/main amd64 python3-all-dev amd64 3.5.1-3 [990 B]
DEBUG:runner:Get:4 http://archive.ubuntu.com/ubuntu xenial/universe amd64 python3-theblues all 0.2.0-0ubuntu1 [7,398 B]
DEBUG:runner:Get:5 http://ppa.launchpad.net/juju/stable/ubuntu xenial/main amd64 python3-libcharmstore all 0.0.3-1ubuntu4~ubuntu16.04.1~ppa1 [4,276 B]
DEBUG:runner:Get:6 http://ppa.launchpad.net/juju/stable/ubuntu xenial/main amd64 python3-path all 8.1.2+dfsg-1ubuntu1~ubuntu16.04.1~ppa1 [24.8 kB]
DEBUG:runner:Get:7 http://ppa.launchpad.net/juju/stable/ubuntu xenial/main amd64 python3-amulet all 1.14.4-0ubuntu4~ubuntu16.04.1~ppa2 [17.9 kB]
DEBUG:runner:Get:8 http://ppa.launchpad.net/juju/stable/ubuntu xenial/main amd64 python-amulet all 1.14.4-0ubuntu4~ubuntu16.04.1~ppa2 [17.8 kB]
DEBUG:runner:Get:9 http://ppa.launchpad.net/juju/stable/ubuntu xenial/main amd64 amulet all 1.14.4-0ubuntu4~ubuntu16.04.1~ppa2 [1,010 B]
DEBUG:runner:Fetched 76.2 kB in 1s (68.0 kB/s)
DEBUG:runner:Selecting previously unselected package libpython3-all-dev:amd64.
DEBUG:runner:(Reading (Reading database ... 92296 files and directories currently installed.)
DEBUG:runner:Preparing to unpack .../libpython3-all-dev_3.5.1-3_amd64.deb ...
DEBUG:runner:Unpacking libpython3-all-dev:amd64 (3.5.1-3) ...
DEBUG:runner:Selecting previously unselected package python3-all.
DEBUG:runner:Preparing to unpack .../python3-all_3.5.1-3_amd64.deb ...
DEBUG:runner:Unpacking python3-all (3.5.1-3) ...
DEBUG:runner:Selecting previously unselected package python3-all-dev.
DEBUG:runner:Preparing to unpack .../python3-all-dev_3.5.1-3_amd64.deb ...
DEBUG:runner:Unpacking python3-all-dev (3.5.1-3) ...
DEBUG:runner:Selecting previously unselected package python3-theblues.
DEBUG:runner:Preparing to unpack .../python3-theblues_0.2.0-0ubuntu1_all.deb ...
DEBUG:runner:Unpacking python3-theblues (0.2.0-0ubuntu1) ...
DEBUG:runner:Selecting previously unselected package python3-libcharmstore.
DEBUG:runner:Preparing to unpack .../python3-libcharmstore_0.0.3-1ubuntu4~ubuntu16.04.1~ppa1_all.deb ...
DEBUG:runner:Unpacking python3-libcharmstore (0.0.3-1ubuntu4~ubuntu16.04.1~ppa1) ...
DEBUG:runner:Selecting previously unselected package python3-path.
DEBUG:runner:Preparing to unpack .../python3-path_8.1.2+dfsg-1ubuntu1~ubuntu16.04.1~ppa1_all.deb ...
DEBUG:runner:Unpacking python3-path (8.1.2+dfsg-1ubuntu1~ubuntu16.04.1~ppa1) ...
DEBUG:runner:Selecting previously unselected package python3-amulet.
DEBUG:runner:Preparing to unpack .../python3-amulet_1.14.4-0ubuntu4~ubuntu16.04.1~ppa2_all.deb ...
DEBUG:runner:Unpacking python3-amulet (1.14.4-0ubuntu4~ubuntu16.04.1~ppa2) ...
DEBUG:runner:Selecting previously unselected package python-amulet.
DEBUG:runner:Preparing to unpack .../python-amulet_1.14.4-0ubuntu4~ubuntu16.04.1~ppa2_all.deb ...
DEBUG:runner:Unpacking python-amulet (1.14.4-0ubuntu4~ubuntu16.04.1~ppa2) ...
DEBUG:runner:Selecting previously unselected package amulet.
DEBUG:runner:Preparing to unpack .../amulet_1.14.4-0ubuntu4~ubuntu16.04.1~ppa2_all.deb ...
DEBUG:runner:Unpacking amulet (1.14.4-0ubuntu4~ubuntu16.04.1~ppa2) ...
DEBUG:runner:Setting up libpython3-all-dev:amd64 (3.5.1-3) ...
DEBUG:runner:Setting up python3-all (3.5.1-3) ...
DEBUG:runner:Setting up python3-all-dev (3.5.1-3) ...
DEBUG:runner:Setting up python3-theblues (0.2.0-0ubuntu1) ...
DEBUG:runner:Setting up python3-libcharmstore (0.0.3-1ubuntu4~ubuntu16.04.1~ppa1) ...
DEBUG:runner:Setting up python3-path (8.1.2+dfsg-1ubuntu1~ubuntu16.04.1~ppa1) ...
DEBUG:runner:Setting up python3-amulet (1.14.4-0ubuntu4~ubuntu16.04.1~ppa2) ...
DEBUG:runner:Setting up python-amulet (1.14.4-0ubuntu4~ubuntu16.04.1~ppa2) ...
DEBUG:runner:Setting up amulet (1.14.4-0ubuntu4~ubuntu16.04.1~ppa2) ...
DEBUG:runner:Exit Code: 0
00-setup PASS
DEBUG:deployer.env: Terminating machines forcefully
DEBUG:root:Waiting for services to be removed...
DEBUG:runner:call ['/tmp/bundletester-9fmFGc/quobyte-client/tests/10-deploy'] (cwd: /tmp/bundletester-9fmFGc/quobyte-client)
DEBUG:runner:2016-05-10 18:33:47 Starting deployment of amazon
DEBUG:runner:2016-05-10 18:33:48 Deploying services...
DEBUG:runner:2016-05-10 18:33:48 Deploying service quobyte-client using /tmp/charm0pylglbq/trusty/quobyte-client
DEBUG:runner:2016-05-10 18:39:21 Adding relations...
DEBUG:runner:2016-05-10 18:39:22 Deployment complete in 334.74 seconds
DEBUG:runner:Exit Code: 0
10-deploy PASS
DEBUG:deployer.env: Destroying service quobyte-client
DEBUG:deployer.env: No unit errors found.
DEBUG:deployer.env: Terminating machines forcefully
DEBUG:deployer.env: Terminating machine 3
INFO:deployer.env: Waiting for machine termination
DEBUG:root:Waiting for services to be removed...
DEBUG:runner:call ['/tmp/bundletester-9fmFGc/quobyte-client/tests/20-relation-with-registry'] (cwd: /tmp/bundletester-9fmFGc/quobyte-client)
DEBUG:runner:2016-05-10 18:43:39 Starting deployment of amazon
DEBUG:runner:2016-05-10 18:43:40 Deploying services...
DEBUG:runner:2016-05-10 18:43:40 Deploying service quobyte-client using /tmp/charmpjchivjm/trusty/quobyte-client
DEBUG:runner:2016-05-10 18:43:55 Deploying service quobyte-registry using cs:~3-bruno/trusty/quobyte-registry-4
DEBUG:runner:Timeout occurred, printing juju status...environment: amazon
DEBUG:runner:machines:
DEBUG:runner: "0":
DEBUG:runner: agent-state: started
DEBUG:runner: agent-version: 1.25.5
DEBUG:runner: dns-name: 54.85.89.39
DEBUG:runner: instance-id: i-a9e7c234
DEBUG:runner: instance-state: running
DEBUG:runner: series: xenial
DEBUG:runner: hardware: arch=amd64 cpu-cores=1 cpu-power=300 mem=3840M root-disk=8192M availability-zone=us-east-1b
DEBUG:runner: state-server-member-status: has-vote
DEBUG:runner: "4":
DEBUG:runner: agent-state: started
DEBUG:runner: agent-version: 1.25.5
DEBUG:runner: dns-name: 52.87.253.99
DEBUG:runner: instance-id: i-d80a5d5f
DEBUG:runner: instance-state: running
DEBUG:runner: series: trusty
DEBUG:runner: hardware: arch=amd64 cpu-cores=1 cpu-power=300 mem=3840M root-disk=8192M availability-zone=us-east-1c
DEBUG:runner: "5":
DEBUG:runner: agent-state: error
DEBUG:runner: agent-state-info: 'cannot run instances: Your quota allows for 0 more running
DEBUG:runner: instance(s). You requested at least 1 (InstanceLimitExceeded)'
DEBUG:runner: instance-id: pending
DEBUG:runner: series: trusty
DEBUG:runner: "6":
DEBUG:runner: agent-state: error
DEBUG:runner: agent-state-info: 'cannot run instances: Your quota allows for 0 more running
DEBUG:runner: instance(s). You requested at least 1 (InstanceLimitExceeded)'
DEBUG:runner: instance-id: pending
DEBUG:runner: series: trusty
DEBUG:runner: "7":
DEBUG:runner: agent-state: error
DEBUG:runner: agent-state-info: 'cannot run instances: Your quota allows for 0 more running
DEBUG:runner: instance(s). You requested at least 1 (InstanceLimitExceeded)'
DEBUG:runner: instance-id: pending
DEBUG:runner: series: trusty
DEBUG:runner:services:
DEBUG:runner: quobyte-client:
DEBUG:runner: charm: local:trusty/quobyte-client-4
DEBUG:runner: exposed: false
DEBUG:runner: service-status:
DEBUG:runner: current: waiting
DEBUG:runner: message: no quobyte-registry-relation given, waiting for registry
DEBUG:runner: since: 10 May 2016 18:50:48Z
DEBUG:runner: units:
DEBUG:runner: quobyte-client/3:
DEBUG:runner: workload-status:
DEBUG:runner: current: waiting
DEBUG:runner: message: no quobyte-registry-relation given, waiting for registry
DEBUG:runner: since: 10 May 2016 18:50:48Z
DEBUG:runner: agent-status:
DEBUG:runner: current: idle
DEBUG:runner: since: 10 May 2016 18:55:51Z
DEBUG:runner: version: 1.25.5
DEBUG:runner: agent-state: started
DEBUG:runner: agent-version: 1.25.5
DEBUG:runner: machine: "4"
DEBUG:runner: public-address: 52.87.253.99
DEBUG:runner: quobyte-registry:
DEBUG:runner: charm: cs:~3-bruno/trusty/quobyte-registry-4
DEBUG:runner: exposed: false
DEBUG:runner: service-status:
DEBUG:runner: current: unknown
DEBUG:runner: message: Waiting for agent initialization to finish
DEBUG:runner: since: 10 May 2016 18:43:59Z
DEBUG:runner: relations:
DEBUG:runner: quobyte-registry-replica:
DEBUG:runner: - quobyte-registry
DEBUG:runner: units:
DEBUG:runner: quobyte-registry/0:
DEBUG:runner: workload-status:
DEBUG:runner: current: unknown
DEBUG:runner: message: Waiting for agent initialization to finish
DEBUG:runner: since: 10 May 2016 18:43:59Z
DEBUG:runner: agent-status:
DEBUG:runner: current: allocating
DEBUG:runner: since: 10 May 2016 18:43:59Z
DEBUG:runner: agent-state: pending
DEBUG:runner: machine: "5"
DEBUG:runner: quobyte-registry/1:
DEBUG:runner: workload-status:
DEBUG:runner: current: unknown
DEBUG:runner: message: Waiting for agent initialization to finish
DEBUG:runner: since: 10 May 2016 18:44:10Z
DEBUG:runner: agent-status:
DEBUG:runner: current: allocating
DEBUG:runner: since: 10 May 2016 18:44:10Z
DEBUG:runner: agent-state: pending
DEBUG:runner: machine: "6"
DEBUG:runner: quobyte-registry/2:
DEBUG:runner: workload-status:
DEBUG:runner: current: unknown
DEBUG:runner: message: Waiting for agent initialization to finish
DEBUG:runner: since: 10 May 2016 18:44:20Z
DEBUG:runner: agent-status:
DEBUG:runner: current: allocating
DEBUG:runner: since: 10 May 2016 18:44:20Z
DEBUG:runner: agent-state: pending
DEBUG:runner: machine: "7"
DEBUG:runner:Environment wasn't stood up in time
DEBUG:runner:Exit Code: 1
20-relation-with-registry ERROR
DEBUG:deployer.env: Destroying service quobyte-client
DEBUG:deployer.env: Destroying service quobyte-registry
DEBUG:deployer.env: No unit errors found.
DEBUG:deployer.env: Terminating machines forcefully
DEBUG:deployer.env: Terminating machine 4
DEBUG:deployer.env: Terminating machine 5
DEBUG:deployer.env: Terminating machine 6
DEBUG:deployer.env: Terminating machine 7
INFO:deployer.env: Waiting for machine termination
DEBUG:root:Waiting for services to be removed...
DEBUG:root: Remaining services: [u'quobyte-registry']
DEBUG:root: Remaining services: [u'quobyte-registry']
DEBUG:root: Remaining services: [u'quobyte-registry']
DEBUG:root: Remaining services: [u'quobyte-registry']
DEBUG:root: Remaining services: [u'quobyte-registry']
DEBUG:root: Remaining services: [u'quobyte-registry']
DEBUG:root: Remaining services: [u'quobyte-registry']
DEBUG:root: Remaining services: [u'quobyte-registry']
DEBUG:root: Remaining services: [u'quobyte-registry']
DEBUG:root: Remaining services: [u'quobyte-registry']
DEBUG:root: Remaining services: [u'quobyte-registry']
DEBUG:root: Remaining services: [u'quobyte-registry']
DEBUG:root: Remaining services: [u'quobyte-registry']
DEBUG:root: Remaining services: [u'quobyte-registry']
ERROR:runner:Timeout exceeded. Failed to destroy all services in 60 seconds.
Traceback (most recent call last):
File "/home/ubuntu/.local/lib/python2.7/site-packages/bundletester/runner.py", line 173, in _run_test
self.builder.reset()
File "/home/ubuntu/.local/lib/python2.7/site-packages/bundletester/builder.py", line 136, in reset
' in %s seconds.' % timeout)
RuntimeError: Timeout exceeded. Failed to destroy all services in 60 seconds.
DEBUG:bundletester.utils:Updating JUJU_ENV: "amazon" -> ""
Traceback (most recent call last):
File "/home/ubuntu/.local/bin/bundletester", line 11, in <module>
sys.exit(entrypoint())
File "/home/ubuntu/.local/lib/python2.7/site-packages/bundletester/tester.py", line 149, in entrypoint
status = main()
File "/home/ubuntu/.local/lib/python2.7/site-packages/bundletester/tester.py", line 141, in main
[report.emit(result) for result in run()]
File "/home/ubuntu/.local/lib/python2.7/site-packages/bundletester/reporter.py", line 145, in emit
cmd = message.test
File "/home/ubuntu/.local/lib/python2.7/site-packages/bundletester/reporter.py", line 14, in __getattr__
return self[k]
KeyError: 'test'
ubuntu@xenial:/charms/trusty/quobyte-client$
bundletester -e <env>
will bootstrap , but JUJU_ENV=<env>
needs to be set in order for amulet tests to run against the correct environment (otherwise, they'll run against the current, or default environment)
Running bundletester on a bundle (or presumably a charm) that doesn't have a Makefile
causes the following exception when using Juju 2.0, but not Juju 1.25:
[ubuntu@6bd9c0d2db52:~] local.aws:bundle-timeout:- 1 $ bundletester -vF -t bundle:~bigdata-dev/hadoop-processing -b bundle.yaml
INFO:requests.packages.urllib3.connectionpool:Starting new HTTPS connection (1): api.jujucharms.com
Traceback (most recent call last):
File "/usr/local/bin/bundletester", line 9, in <module>
load_entry_point('bundletester==0.7.1', 'console_scripts', 'bundletester')()
File "/usr/local/lib/python2.7/dist-packages/bundletester/tester.py", line 149, in entrypoint
status = main()
File "/usr/local/lib/python2.7/dist-packages/bundletester/tester.py", line 129, in main
suite = spec.SuiteFactory(options, options.testdir)
File "/usr/local/lib/python2.7/dist-packages/bundletester/spec.py", line 308, in SuiteFactory
suite.find_suite()
File "/usr/local/lib/python2.7/dist-packages/bundletester/spec.py", line 177, in find_suite
self.find_implicit_tests()
File "/usr/local/lib/python2.7/dist-packages/bundletester/spec.py", line 217, in find_implicit_tests
suite=self)
File "/usr/local/lib/python2.7/dist-packages/bundletester/spec.py", line 196, in conditional_make
stderr=subprocess.STDOUT)
File "/usr/lib/python2.7/subprocess.py", line 711, in __init__
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1340, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
A work-around is to add makefile: []
to tests.yaml
, but BT should handle this more gracefully by default. I'm also not sure why it behaves differently in 2.0.
When testing a bundle, BT deploys the bundle, then runs the charm tests, before finally running the bundle tests. This doesn't give the bundle test a chance to affect the deployment, meaning the only option in some cases is to reset the env and redeploy, which can make long tests take longer.
Suggested additions to test.yaml
options:
pre_deploy
(default: true) Allows you to disable the automatic pre-deployment of the bundlecharm_tests_first
(default: true) Allows you to have the bundle tests run before the charm testsIf both of these are changed, it would mean that the bundle tests are responsible for deploying the bundle and have full control over that deployment. The charm tests could still re-use that environment, assuming reset
is disabled and the service names match.
One thing i've noticed when we are testing the tip of the tooling during the beta, is we are constantly overwriting amulet with whatever is in archive if your charm does one of two things:
package:
key of tests.yamlapt install amulet
in 00-setup
What would be helpful is if we could continue to test using tip of the tooling without having to wholesale delete configuration files, or configuration lines for the tests.
proposed:
bundletester --skip-setup
or
bundletester --skip-packages
I get the following when I run bundletester -l DEBUG
in a charm directory. This is within the Juju Vagrant box.
$ bundletester -l DEBUG
DEBUG:root:Bootstrap environment: local
DEBUG:deployer.env:Connecting to environment...
DEBUG:deployer.env:Connected to environment
DEBUG:runner:call ['/home/vagrant/.virtualenvs/tests/bin/charm-proof']
DEBUG:runner:
I: relation image-testing has no hooks
DEBUG:runner:Exit Code: 0
simple-instance-test
charm-proof PASS
DEBUG:runner:call ['/charms/trusty/simple-instance-test/tests/00-setup']
DEBUG:runner:
gpg: keyring `/tmp/tmp9xvip08s/secring.gpg' created
gpg: keyring `/tmp/tmp9xvip08s/pubring.gpg' created
gpg: requesting key C8068B11 from hkp server keyserver.ubuntu.com
gpg: /tmp/tmp9xvip08s/trustdb.gpg: trustdb created
gpg: key C8068B11: public key "Launchpad Ensemble PPA" imported
gpg: Total number processed: 1
gpg: imported: 1 (RSA: 1)
OK
Ign http://ppa.launchpad.net trusty InRelease
Hit http://ppa.launchpad.net trusty Release.gpg
Hit http://ppa.launchpad.net trusty Release
Ign http://archive.ubuntu.com trusty InRelease
Hit http://ppa.launchpad.net trusty/main amd64 Packages
Ign http://archive.ubuntu.com trusty-updates InRelease
Hit http://ppa.launchpad.net trusty/main Translation-en
Hit http://archive.ubuntu.com trusty Release.gpg
Get:1 http://archive.ubuntu.com trusty-updates Release.gpg [933 B]
Hit http://archive.ubuntu.com trusty Release
Ign http://security.ubuntu.com trusty-security InRelease
Get:2 http://archive.ubuntu.com trusty-updates Release [59.7 kB]
Get:3 http://security.ubuntu.com trusty-security Release.gpg [933 B]
Hit http://archive.ubuntu.com trusty/main Sources
Hit http://archive.ubuntu.com trusty/universe Sources
Hit http://archive.ubuntu.com trusty/main amd64 Packages
Hit http://archive.ubuntu.com trusty/universe amd64 Packages
Get:4 http://security.ubuntu.com trusty-security Release [59.7 kB]
Hit http://archive.ubuntu.com trusty/main Translation-en
Hit http://archive.ubuntu.com trusty/universe Translation-en
Get:5 http://archive.ubuntu.com trusty-updates/main Sources [120 kB]
Get:6 http://archive.ubuntu.com trusty-updates/universe Sources [84.0 kB]
Get:7 http://archive.ubuntu.com trusty-updates/main amd64 Packages [319 kB]
Get:8 http://archive.ubuntu.com trusty-updates/universe amd64 Packages [202 kB]
Get:9 http://security.ubuntu.com trusty-security/main Sources [44.3 kB]
Hit http://archive.ubuntu.com trusty-updates/main Translation-en
Hit http://archive.ubuntu.com trusty-updates/universe Translation-en
Get:10 http://security.ubuntu.com trusty-security/universe Sources [10.8 kB]
Get:11 http://security.ubuntu.com trusty-security/main amd64 Packages [140 kB]
Get:12 http://security.ubuntu.com trusty-security/universe amd64 Packages [47.0 kB]
Hit http://security.ubuntu.com trusty-security/main Translation-en
Hit http://security.ubuntu.com trusty-security/universe Translation-en
Fetched 1088 kB in 6s (161 kB/s)
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
python-requests is already the newest version.
amulet is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 8 not upgraded.
DEBUG:runner:Exit Code: 0
00-setup PASS
DEBUG:runner:call ['/charms/trusty/simple-instance-test/tests/10-deploy']
DEBUG:runner:
2014-09-17 12:09:21 Starting deployment of local
Traceback (most recent call last):
File "/home/vagrant/.virtualenvs/tests/bin/juju-deployer", line 9, in <module>
load_entry_point('juju-deployer==0.4.1', 'console_scripts', 'juju-deployer')()
File "/home/vagrant/.virtualenvs/tests/local/lib/python2.7/site-packages/deployer/cli.py", line 127, in main
run()
File "/home/vagrant/.virtualenvs/tests/local/lib/python2.7/site-packages/deployer/cli.py", line 225, in run
importer.Importer(env, deployment, options).run()
File "/home/vagrant/.virtualenvs/tests/local/lib/python2.7/site-packages/deployer/action/importer.py", line 186, in run
self.get_charms()
File "/home/vagrant/.virtualenvs/tests/local/lib/python2.7/site-packages/deployer/action/importer.py", line 63, in get_charms
no_local_mods=self.options.no_local_mods)
File "/home/vagrant/.virtualenvs/tests/local/lib/python2.7/site-packages/deployer/deployment.py", line 140, in fetch_charms
charm.fetch()
File "/home/vagrant/.virtualenvs/tests/local/lib/python2.7/site-packages/deployer/charm.py", line 128, in fetch
self.vcs.branch()
File "/home/vagrant/.virtualenvs/tests/local/lib/python2.7/site-packages/deployer/vcs.py", line 103, in branch
self._call(params, self.err_branch, os.path.dirname(self.path))
File "/home/vagrant/.virtualenvs/tests/local/lib/python2.7/site-packages/deployer/vcs.py", line 30, in _call
args, cwd=cwd or self.path, stderr=stderr)
File "/usr/lib/python2.7/subprocess.py", line 566, in check_output
process = Popen(stdout=PIPE, *popenargs, **kwargs)
File "/usr/lib/python2.7/subprocess.py", line 710, in __init__
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1327, in _execute_child
raise child_exception
TypeError: execv() arg 2 must contain only strings
Traceback (most recent call last):
File "/charms/trusty/simple-instance-test/tests/10-deploy", line 12, in <module>
d.setup(timeout=900)
File "/usr/lib/python3/dist-packages/amulet/deployer.py", line 266, in setup
self.juju_env], cwd=self.deployer_dir)
File "/usr/lib/python3.4/subprocess.py", line 557, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['juju-deployer', '-W', '-L', '-c', '/tmp/amulet-juju-deployer-4zn_s3a9.json', '-e', 'local', 'local']' returned non-zero exit status 1
DEBUG:runner:Exit Code: 1
10-deploy ERROR
------------------------------------------------------------------------------
ERROR: simple-instance-test::10-deploy
[/charms/trusty/simple-instance-test/tests/10-deploy exit 1]
2014-09-17 12:09:21 Starting deployment of local
Traceback (most recent call last):
File "/home/vagrant/.virtualenvs/tests/bin/juju-deployer", line 9, in <module>
load_entry_point('juju-deployer==0.4.1', 'console_scripts', 'juju-deployer')()
File "/home/vagrant/.virtualenvs/tests/local/lib/python2.7/site-packages/deployer/cli.py", line 127, in main
run()
File "/home/vagrant/.virtualenvs/tests/local/lib/python2.7/site-packages/deployer/cli.py", line 225, in run
importer.Importer(env, deployment, options).run()
File "/home/vagrant/.virtualenvs/tests/local/lib/python2.7/site-packages/deployer/action/importer.py", line 186, in run
self.get_charms()
File "/home/vagrant/.virtualenvs/tests/local/lib/python2.7/site-packages/deployer/action/importer.py", line 63, in get_charms
no_local_mods=self.options.no_local_mods)
File "/home/vagrant/.virtualenvs/tests/local/lib/python2.7/site-packages/deployer/deployment.py", line 140, in fetch_charms
charm.fetch()
File "/home/vagrant/.virtualenvs/tests/local/lib/python2.7/site-packages/deployer/charm.py", line 128, in fetch
self.vcs.branch()
File "/home/vagrant/.virtualenvs/tests/local/lib/python2.7/site-packages/deployer/vcs.py", line 103, in branch
self._call(params, self.err_branch, os.path.dirname(self.path))
File "/home/vagrant/.virtualenvs/tests/local/lib/python2.7/site-packages/deployer/vcs.py", line 30, in _call
args, cwd=cwd or self.path, stderr=stderr)
File "/usr/lib/python2.7/subprocess.py", line 566, in check_output
process = Popen(stdout=PIPE, *popenargs, **kwargs)
File "/usr/lib/python2.7/subprocess.py", line 710, in __init__
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1327, in _execute_child
raise child_exception
TypeError: execv() arg 2 must contain only strings
Traceback (most recent call last):
File "/charms/trusty/simple-instance-test/tests/10-deploy", line 12, in <module>
d.setup(timeout=900)
File "/usr/lib/python3/dist-packages/amulet/deployer.py", line 266, in setup
self.juju_env], cwd=self.deployer_dir)
File "/usr/lib/python3.4/subprocess.py", line 557, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['juju-deployer', '-W', '-L', '-c', '/tmp/amulet-juju-deployer-4zn_s3a9.json', '-e', 'local', 'local']' returned non-zero exit status 1
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.