Giter Site home page Giter Site logo

zrepl status subcommand about zrepl HOT 4 CLOSED

zrepl avatar zrepl commented on May 18, 2024
zrepl status subcommand

from zrepl.

Comments (4)

problame avatar problame commented on May 18, 2024

Use Cases

Interactive System Administration & Debugging

  • Show snapshots and bookmarks created by a job, sorted by createtxg, with creation date and scheduled pruning date (not possible with grid policy)
  • Learn about the state of a job
    • what tasks are sleeping, what tasks are doing somehting? (! multiple concurrent tasks !)
    • For how long is a sleeping task going to sleep? Since when does it sleep? (UTC for log!)
    • replication tasks
      • what filesystem is it replicating, at what speed / number of bytes txed?
      • diff error visualization
        • pretty-print a diff
        • ad-hoc compute a new diff
    • Attach to the log of a single job at a user-specified level (Crazy?)
      • Or: Show the last N bytes of warn log with timestamp?
      • Or: Show warn log since last run of task

Monitoring

  • Simple binary check via exit status: green or anything red
  • Detailed errors are can be found through log monitoring warn log
  • Monitoring should not rely on zrepl output to check if replication actually worked
    • short script a la zfs list -o creation -t snapshot -s creation -r -d 1 filesystem/to/check | tail -n 1 | ... sufficient, should already exist in your org

Implementation Concerns

  • control socket is currently only accessible to zrepl user due to lack of authentication / authorization mechanisms.
  • monitoring tools would likely use an HTTP API
  • the same API should be consumed by the CLI frontend
  • consider possibility of web-based zrepl status one day -> streaming interface?
  • requires refactoring of existing control socket api

from zrepl.

problame avatar problame commented on May 18, 2024

@woodsb02 It's still a bit early, but you can test the status functionality by building this branch status_command.
Status can be displayed using zrepl control status, the raw JSON exposed by zrepl daemon can be displayed using the --format json argument.

What do you think?

from zrepl.

problame avatar problame commented on May 18, 2024
  • Task API
  • Cleanup adoption throughout zrepl
  • Use show lastChanged in zrepl control status

from zrepl.

problame avatar problame commented on May 18, 2024

merged.

list command is tracked in #49

from zrepl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.