incorrect extension on resource upload
Bug #1578383 reported by
Jay R. Wren
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical Juju |
Expired
|
Medium
|
Unassigned |
Bug Description
Just trying out the new resources feature and this surprised me when upgrading a charm:
$ juju upgrade-charm crap --resource one=ugh-error.log --resource two=TODO
Added charm "cs:~evarlast/
ERROR PUT https:/
/one?pendingid=
or.log", expected ""
Apparently it doesn't like the filename "ugh-error.log" but if I use a file with name without extension it succeeds.
$ juju version
2.0-beta7-
same tools version. (2.0-beta7.1)
built today from master commit 1b5c7104af94ab1
Changed in juju-core: | |
status: | New → Triaged |
tags: | added: ui |
affects: | juju-core → juju |
To post a comment you must log in.
The filename suffix of the uploaded file must match the suffix of the filename in the charm metadata. Presumably that field in the charm metadata was set to a name without a file extension.
So while the behavior is as designed (intended as a sanity check in lieu of full mime-type inspection, for better or worse), the error message is not very clear. Would something like the following have been more helpful?
ERROR PUT https:/ /10.0.5. 23:17070/ model/cc9dc4ee- 2332-4d3b- 8adc-576e02855a b1/services/ crap/resources c7d0751f- 2d8f-4483- 83d2-875b853fea de: filename extension on resource upload "ugh-err
/one?pendingid=
or.log" does not match filename in resource definition in charm metadata (expected "")
Also, I was going to ask what we could do to improve the docs, but it looks like the docs don't yet mention resources. :( I've opened a separate bug for that (https:/ /github. com/juju/ docs/issues/ 1079).