dispatch-only charms cannot be deployed, hooks/ directory required

Bug #1881839 reported by Stuart Bishop
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical Juju
Fix Released
High
Heather Lanigan

Bug Description

A charm containing a dispatch script in its root but no hooks/* scripts cannot be deployed with Juju 2.8-rc3. If one or more hooks/* links are created, it works as intended (for all hooks, not just the ones linked)

$ ls -al dispatch
-rwxrwxr-x 1 stub stub 603 Jun 2 18:14 dispatch

$ juju deploy .
ERROR invalid charm "plinth": has no hooks

$ mv foo hooks

$ ls -al hooks/
total 11
drwxrwxr-x 2 stub stub 5 Jun 1 21:54 .
drwxrwxr-x 11 stub stub 34 Jun 3 13:26 ..
lrwxrwxrwx 1 stub stub 11 Jun 1 21:54 install -> ../dispatch
lrwxrwxrwx 1 stub stub 11 Jun 1 21:54 start -> ../dispatch
lrwxrwxrwx 1 stub stub 11 Jun 1 21:54 upgrade-charm -> ../dispatch

stub@aargh:~/charms/plinth (operator-zaza %)$ juju deploy .
Deploying charm "local:focal/plinth-0".

Changed in juju:
status: New → Triaged
importance: Undecided → High
assignee: nobody → Heather Lanigan (hmlanigan)
milestone: none → 2.8.1
Revision history for this message
Heather Lanigan (hmlanigan) wrote :
Changed in juju:
status: Triaged → Fix Committed
Revision history for this message
Tim McNamara (tim-clicks) wrote :

FWIW there was a process failure when the hooks directory was made mandatory. Our docs currently lie. Perhaps they always have. From https://discourse.juju.is/t/charm-metadata/1043

    The only file that must be present in a charm is metadata.yaml,
    in the root directory. It must be a valid YAML dictionary."

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.