sync-tools uploads 0kB juju tools when relative path is used for "--source"

Bug #1255006 reported by Nobuto Murata
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
juju-core
Fix Released
High
Ian Booth

Bug Description

juju-core: 1.16.3-0ubuntu1~ubuntu12.04.1~juju1 on ppa:juju/stable

I have a directory structure below like S3 bucket for juju-tools:

/home/ubuntu/juju-tools/
└── tools
    ├── juju-1.16.3-precise-amd64.tgz
    ├── juju-1.16.3-precise-armhf.tgz
    ├── juju-1.16.3-precise-i386.tgz
    ├── <snip>
    ├── juju-1.16.3-trusty-i386.tgz
    ├── releases
    │ ├── juju-1.16.3-precise-amd64.tgz
    │ ├── juju-1.16.3-precise-armhf.tgz
    │ ├── juju-1.16.3-precise-i386.tgz
    │ ├── <snip>
    │ └── juju-1.16.3-trusty-i386.tgz
    └── streams
        └── v1
            ├── com.ubuntu.juju:released:tools.json
            └── index.json

When I execute sync-tools from local directory and if relative path is specified for "--source", sync-tools uploads 0kB juju tools. This makes bootstrap node not working.

==========
~$ juju sync-tools -v --source juju-tools/
verbose is deprecated with the current meaning, use show-log
2013-11-26 08:46:13 INFO juju.environs.sync sync.go:66 listing available tools
listing available tools
2013-11-26 08:46:13 INFO juju.environs.sync sync.go:90 found 13 tools
found 13 tools
2013-11-26 08:46:13 INFO juju.environs.sync sync.go:94 found 13 recent tools (version 1.16.3)
found 13 recent tools (version 1.16.3)
2013-11-26 08:46:13 INFO juju.environs.sync sync.go:100 listing target bucket
listing target bucket
2013-11-26 08:46:13 INFO juju.environs.sync sync.go:113 found 0 tools in target; 13 tools to be copied
found 0 tools in target; 13 tools to be copied
2013-11-26 08:46:13 INFO juju.environs.sync sync.go:143 copying 1.16.3-precise-amd64 from file://juju-tools/tools/releases/juju-1.16.3-precise-amd64.tgz
copying 1.16.3-precise-amd64 from file://juju-tools/tools/releases/juju-1.16.3-precise-amd64.tgz
2013-11-26 08:46:13 INFO juju.environs.sync sync.go:157 copying tools/releases/juju-1.16.3-precise-amd64.tgz
copying tools/releases/juju-1.16.3-precise-amd64.tgz
2013-11-26 08:46:13 INFO juju.environs.sync sync.go:171 downloaded tools/releases/juju-1.16.3-precise-amd64.tgz (0kB), uploading
downloaded tools/releases/juju-1.16.3-precise-amd64.tgz (0kB), uploading
2013-11-26 08:46:13 INFO juju.environs.sync sync.go:172 download 0kB, uploading
download 0kB, uploading
<snip>
2013-11-26 08:46:14 INFO juju.environs.sync sync.go:118 copied 13 tools
copied 13 tools
2013-11-26 08:46:14 INFO juju.environs.sync sync.go:120 generating tools metadata
generating tools metadata
2013-11-26 08:46:14 INFO juju.environs.tools simplestreams.go:277 Writing tools/streams/v1/index.json
2013-11-26 08:46:14 INFO juju.environs.tools simplestreams.go:277 Writing tools/streams/v1/com.ubuntu.juju:released:tools.json
2013-11-26 08:46:14 INFO juju.environs.sync sync.go:128 tools metadata written
tools metadata written
2013-11-26 08:46:14 INFO juju supercommand.go:286 command finished
==========

sync-tools accepts absolute path for "--source" as expected.
So expected result for relative path is behaving the same as absolute path.

Tags: sync-tools ui

Related branches

Nobuto Murata (nobuto)
description: updated
Revision history for this message
Curtis Hovey (sinzui) wrote :

Yes. Thank you for reporting this bug. I discovered this weeks ago and adjusted the juju release scripts instead of asking the developer to make the option work as everyone would expect.

Changed in juju-core:
status: New → Triaged
importance: Undecided → High
milestone: none → 1.17.1
tags: added: sync-tools ui
Ian Booth (wallyworld)
Changed in juju-core:
assignee: nobody → Ian Booth (wallyworld)
status: Triaged → In Progress
Ian Booth (wallyworld)
Changed in juju-core:
status: In Progress → Fix Committed
Curtis Hovey (sinzui)
Changed in juju-core:
milestone: 1.17.1 → 1.17.0
Curtis Hovey (sinzui)
Changed in juju-core:
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.