Skip to content

Feature request: jhack etail #157

Open

Description

@taurus-forever

Hi,

I am constantly using jhack tail to understand the deployment progress and monitor the internal charm activities.

Example:
Screenshot from 2024-05-23 12-20-31

I have to constantly open several tmux windows to monitor:

  1. jhack tail # to see juju events
  2. juju status --watch 1s
  3. juju debug-log --tail # overall charm progress / stuck
  4. juju debug-log --tail | grep ERROR # errors only to do not miss some in endless flying debug-log

It is a feature request to create high-level jhack etail to speed up initial setup.
The etail could be an enhanced tail which will show the last errors and the last debug-log...

P.S. Is it a time for some nice-aligned default tmux config for juju? jhack tmux???

Activity

  1. PietroPasotti commented on May 27, 2024

    @PietroPasotti
    Collaborator

    funny enough I'd considered this in the past but I encountered a couple of issues:

    • tmux is hard to script: I'm using tmux-resurrect to autoload the layout, but I couldn't yet find a way to save/load what commands are running on each pane
    • I found it hard to generalize, as everyone likes their terminals :)
  2. taurus-forever commented on May 27, 2024

    @taurus-forever
    Author

    My tmux oneliner:

    ubuntu@juju342:~$ cat ./new_model_tmux.sh 
    #/bin/bash
    
    juju add-model "test$(date +%s)" && tmux new-session '' \; \
      split-window -v \; \
      send-keys "echo 'Type your Juju commands here... '" C-m \; \
      split-window -h \; \
      send-keys 'juju status --watch 1s' C-m \; \
      split-window -v \; \
      send-keys 'juju model-config "logging-config=<root>=INFO;unit=DEBUG" ' C-m \; \
      send-keys 'juju debug-log --tail' C-m \; \
      split-window -v \; \
      send-keys 'juju debug-log --tail | grep ERROR' C-m \; \
      split-window -v \; \
      send-keys 'jhack tail' C-m \; \
    
    tmux -2 attach-session -d
    
    ubuntu@juju342:~$ ./new_model_tmux.sh 
    

    As I am bored to type the same commands many times...

    I agree, all pencils have different colors and flavors, but we have no recommendation/best-practices for newbies (which are comfortable to use AS IS).

  3. PietroPasotti commented on May 31, 2024

    @PietroPasotti
    Collaborator

    I think a better place for this would be the charm-dev multipass blueprint

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions