incorrect extension on resource upload

Bug #1578383 reported by Jay R. Wren
6
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/thing-1" to the model.
ERROR PUT https://10.0.5.23:17070/model/cc9dc4ee-2332-4d3b-8adc-576e02855ab1/services/crap/resources
/one?pendingid=c7d0751f-2d8f-4483-83d2-875b853feade: incorrect extension on resource upload "ugh-err
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-xenial-amd64

same tools version. (2.0-beta7.1)

built today from master commit 1b5c7104af94ab143820a917bf8ef8434582bd29

Revision history for this message
Eric Snow (ericsnowcurrently) wrote :

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-576e02855ab1/services/crap/resources
/one?pendingid=c7d0751f-2d8f-4483-83d2-875b853feade: filename extension on resource upload "ugh-err
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).

Changed in juju-core:
importance: Undecided → Medium
status: New → Incomplete
Revision history for this message
Eric Snow (ericsnowcurrently) wrote :

...and if you think something else is afoot, please post the charm's metadata (at least the resources part) here. Thanks!

Revision history for this message
Jay R. Wren (evarlast) wrote : Re: [Bug 1578383] Re: incorrect extension on resource upload

Ah! I had no idea that there was such a restriction.

Yes, I think the different error message would have made things more clear.

Thanks.

On Thu, May 5, 2016 at 11:02 AM, Eric Snow <email address hidden> wrote:
> ...and if you think something else is afoot, please post the charm's
> metadata (at least the resources part) here. Thanks!
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1578383
>
> Title:
> incorrect extension on resource upload
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/juju-core/+bug/1578383/+subscriptions

Revision history for this message
Eric Snow (ericsnowcurrently) wrote :

Thanks for verifying, Jay.

We'll work on improving the error message.

We will also look at adding an extra sentence to the help text of the CLI (attach, deploy, upgrade-charm) that explicitly states the requirement on the filename suffix.

Changed in juju-core:
status: Incomplete → New
tags: added: resources
Curtis Hovey (sinzui)
Changed in juju-core:
status: New → Triaged
tags: added: ui
affects: juju-core → juju
Revision history for this message
Canonical Juju QA Bot (juju-qa-bot) wrote :

This bug has not been updated in 5 years, so we're marking it Expired. If you believe this is incorrect, please update the status.

Changed in juju:
status: Triaged → Expired
tags: added: expirebugs-bot
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.