Merge lp://staging/~jimbaker/pyjuju/scp-command into lp://staging/pyjuju

Proposed by Jim Baker
Status: Superseded
Proposed branch: lp://staging/~jimbaker/pyjuju/scp-command
Merge into: lp://staging/pyjuju
Diff against target: 719 lines (+501/-19)
9 files modified
juju/control/__init__.py (+22/-4)
juju/control/command.py (+2/-1)
juju/control/scp.py (+117/-0)
juju/control/ssh.py (+32/-9)
juju/control/tests/test_scp.py (+161/-0)
juju/control/tests/test_ssh.py (+64/-2)
juju/control/tests/test_utils.py (+48/-1)
juju/control/utils.py (+53/-0)
misc/bash_completion.d/juju (+2/-2)
To merge this branch: bzr merge lp://staging/~jimbaker/pyjuju/scp-command
Reviewer Review Type Date Requested Status
William Reade (community) Approve
Review via email: mp+80286@code.staging.launchpad.net

This proposal has been superseded by a proposal from 2011-10-25.

Description of the change

Implements juju scp command, which is just a frontend to scp that expands unit names and machine IDs to their corresponding hosts. In addition, a relative path for a unit name like mysql/0 gets prepended with /var/lib/juju/units/mysql/0. (There's nothing that immediately made sense for machine ID, so this is relative to /home/ubuntu.) All other options are passed through.

Unlike juju ssh, juju scp does not verify agent liveness. It seems to me that this is not necessarily desirable, especially for debugging, but if so, it's certainly easy to add this verification.

To post a comment you must log in.
Revision history for this message
William Reade (fwereade) wrote :

All looks sensible to me.

[0]

This rather looks as though it was intended to be stacked on ssh-passthrough.

[1]

I didn't realise "juju ssh" demands a live agent; if anything should be changed, I think it's this. I rather imagine that the majority of uses of ssh/scp will be in response to something surprising happening, and if one of the surprising things is a dead machine agent it will be somewhat irritating to have "juju ssh" inoperable, where plain old "ssh" would still work fine..

review: Approve
Revision history for this message
Kapil Thangavelu (hazmat) wrote :

Excerpts from William Reade's message of Tue Oct 25 14:27:33 UTC 2011:
> Review: Approve
>
> All looks sensible to me.
>
> [0]
>
> This rather looks as though it was intended to be stacked on ssh-passthrough.
>
> [1]
>
> I didn't realise "juju ssh" demands a live agent; if anything should be changed, I think it's this. I rather imagine that the majority of uses of ssh/scp will be in response to something surprising happening, and if one of the surprising things is a dead machine agent it will be somewhat irritating to have "juju ssh" inoperable, where plain old "ssh" would still work fine..

It depends on a live 'machine' agent because else we have a potentially large
window while we wait for the machine to come up and cloud-init to finish
(imports ssh keys) and for ssh to be operational.

-k

418. By Jim Baker

Merged trunk

419. By Jim Baker

Addressed review points

420. By Jim Baker

PEP8/PyFlakes

421. By Jim Baker

Updated tab completion

422. By Jim Baker

Slim down help output

423. By Jim Baker

PEP8

Unmerged revisions

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches

to status/vote changes: