juju unable to deploy a local charm with absolute symlinks in charm directory

Bug #1813799 reported by James Page
24
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Canonical Juju
Fix Released
Medium
Achilleas Anagnostopoulos
2.5
Fix Released
Medium
Achilleas Anagnostopoulos

Bug Description

juju version: 2.5.0

The OpenStack charms make fairly extensive use of tox for linting, unit and functional testing of charms; this results in a .tox directory with lots of temporary state including symlinks to python binaries on the hosting system.

Juju rejects these and won't use the charm if found:

ERROR cannot deploy bundle: cannot repackage charm: symlink ".tox/func/include/python3.6m" is absolute: "/usr/include/python3.6m"

It would be nice if juju could deal with this better or at least provide the ability to .jujuignore certain files/directories within the charm if found.

Tim Penhey (thumper)
Changed in juju:
status: New → Triaged
importance: Undecided → Medium
tags: added: bitesize charm
Changed in juju:
assignee: nobody → Achilleas Anagnostopoulos (achilleasa)
status: Triaged → In Progress
Revision history for this message
Richard Harding (rharding) wrote :

The objective here is to add support for a .jujuignore file format in charms that would not be deployed as part of the application.

Revision history for this message
Achilleas Anagnostopoulos (achilleasa) wrote :

The current edge snap contains our proposal for addressing this issue by means of a .jujuignore file (uses same syntax as .gitignore files). For more information on the supported patterns please refer to the extended commit log here: https://github.com/juju/charm/pull/271/commits/2ed83967f1668fae235d9a4dbb610ee63532f735

When packaging a charm we start with a set of sane defaults for excluding vcs-related dirs and some internal-/build-related files (for the full list see: https://github.com/juju/charm/blob/v6/charmdir.go#L28-L39). Then we look for a .jujuignore file at the root of the charm dir and if one is provided we append its contents to the exclusion list.

By updating our charm templates to include a .jujuignore file we can easily exclude things like additional template-specific build directories and/or things like the absolute links that break deployments.

We would appreciate some feedback on this solution so we can back-port it to the 2.5 branch.

Changed in juju:
status: In Progress → Fix Committed
milestone: none → 2.6-beta1
Alvaro Uria (aluria)
tags: added: canonical-bootstack
Revision history for this message
Achilleas Anagnostopoulos (achilleasa) wrote :

This fix was back-ported and released with 2.5.3

Changed in juju:
status: Fix Committed → Fix Released
Changed in juju:
status: Fix Released → Fix Committed
Changed in juju:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.