juju ssh to some unit

Bug #1879008 reported by Andrea Ieri
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical Juju
Triaged
Low
Unassigned

Bug Description

It happens countless times during normal cloud operations that I need to ssh to a unit, but don't really care which unit I'm going to end up into. This happens particularly often (as an example) with ceph-mon and hacluster applications (since cluster commands can be run from any unit), but can also occur with single-unit applications: in either case I have to first run juju status to figure our the unit IDs, and only then I can juju ssh to the unit I have (randomly) chosen.

As a way to improve the user experience for operators I propose having `juju ssh <application>` make you land on a random unit; logging into the leader could be accomplished with `juju ssh <application>/leader` in order to align with the `juju run` semantics.

Also note the somewhat related bug 1313862.

Revision history for this message
Pen Gale (pengale) wrote :

This one is a little worrying to me from a new user’s perspective. If I haven’t yet grokked the relationship between applications and units, landing on a random unit in an application might be confusing.

I’d support a syntax like `juju ssh application/any`.

I do love the /leader idea!

Revision history for this message
Simon Richardson (simonrichardson) wrote :

I would suggest you could write a juju plugin for this. Juju has a powerful, yet simple plugin system that allows you to do this[1]

So you could do `juju jump-to <application>`.

1. https://juju.is/docs/juju-plugins

Revision history for this message
Achilleas Anagnostopoulos (achilleasa) wrote :

The <application>/leader syntax is indeed interesting but it also comes with a potential usability caveat. An operator may ssh into the leader unit and then perform a sequence of actions (e.g. start tailing files etc.). However, the leadership might change while they are still logged in but without them knowing about this unless they also monitor the unit statuses. This might cause confusion (e.g. why did the leader unit stop writing to the file?)

Pen Gale (pengale)
Changed in juju:
status: New → Triaged
importance: Undecided → Wishlist
Revision history for this message
Canonical Juju QA Bot (juju-qa-bot) wrote :

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

Changed in juju:
importance: Wishlist → Low
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.