charm build produces unexpected error (previously worked just fine) #67

Closed
cloudguru-bb opened this Issue Aug 20, 2016 · 6 comments

Comments

Projects
None yet
5 participants

Hi,

I have several charms that previously passed charm proof and charm build used to work just fine. Now when running charm build on this layer-docker based charm the following error is produced:

juju@mwc-2016:~/quortus/junk$ charm build ./qfiles
build: Composing into /home/juju/charms
build: Destination charm directory: /home/juju/charms/trusty/qfiles
build: Processing layer: layer:docker
Traceback (most recent call last):
File "/usr/bin/charm-build", line 9, in
load_entry_point('charm-tools==2.1.2', 'console_scripts', 'charm-build')()
File "/usr/lib/python2.7/dist-packages/charmtools/build/init.py", line 673, in main
build()
File "/usr/lib/python2.7/dist-packages/charmtools/build/init.py", line 516, in call
self.generate()
File "/usr/lib/python2.7/dist-packages/charmtools/build/init.py", line 467, in generate
self.formulate_plan(layers)
File "/usr/lib/python2.7/dist-packages/charmtools/build/init.py", line 408, in formulate_plan
self.plan = self.plan_layers(layers, output_files)
File "/usr/lib/python2.7/dist-packages/charmtools/build/init.py", line 319, in plan_layers
next_layer / BuildConfig.DEFAULT_FILE, True)
File "/usr/lib/python2.7/dist-packages/charmtools/build/config.py", line 81, in add_config
c.configure(config_file, allow_missing)
File "/usr/lib/python2.7/dist-packages/charmtools/build/config.py", line 69, in configure
tactic = load_tactic(name, basedir)
File "/usr/lib/python2.7/dist-packages/charmtools/build/tactics.py", line 661, in load_tactic
obj = utils.load_class(dpath, basedir)
File "/usr/lib/python2.7/dist-packages/charmtools/utils.py", line 321, in load_class
dpath, workingdir))
OSError: Unable to load tactics.docker.DockerWheelhouseTactic from /home/juju/charms/deps/layer/layer-basic

Regards,

Brian

sunzen commented Aug 27, 2016

Hi,
We also encounter the same issue. Could someone provide any clarification?
Look forward to response from related developers.

Regards

Contributor

simonklb commented Aug 27, 2016

It's fixed in the latest version of charmtools (see juju/charm-tools@f0fb2c9).

There is also a new release with that patch included. You should be good with an update.

sunzen commented Aug 27, 2016

Yes, we just found update 2.1.4, and would like to add up that this issue had been resolved in this release.
Thanks for your quick response. @simonklb

Collaborator

chuckbutler commented Aug 29, 2016

Thanks for filing the reports. This is due to layer-docker shipping a custom tactic (the bit of code used to assemble a layer from the primitives found in its layer and others). The custom tactic that's being called, is updating the virtualenv that's being used to pack the wheelhouse at build time. There are very very new dependencies that ship with docker.py and docker-compose. In order to make these components reliably offlineable, we had to modify that build environment.

Charm-tools was released last week, and if you encounter this issue while building, please file a bug here: https://github.com/juju/charm-tools/issues

We apologize if you found this rough corner while hacking away on your charms. We're going to continue to keep layer-docker using the best of the newest features released in our development tooling. So it would be prudent to check for updates before building any futures layers upon layer-docker, or use charmbox to assemble your charms ;)

@chuckbutler chuckbutler added the invalid label Aug 29, 2016

Collaborator

chuckbutler commented Aug 29, 2016

@simonklb big hat tip @ you for calling out the fix. Thanks!

@marcoceppi marcoceppi closed this Aug 29, 2016

Collaborator

chuckbutler commented Aug 29, 2016

Since there was a wider spread issue with embedding the docker components in the wheelhouse you had not yet hit, we've reverted this work again and made the layer rely on pip access. We're going to continue investigating off lining these dependencies, but as the dependencies move forward, it seems to lock the wheelhouse at 3.5 with how we were modifying it.

This poses a problem for trusty based layers. Sorry for the inconvenience uncovered here.

Let us know if this surfaces again

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment