Jepsen 0.3.2-SNAPSHOT
Released under the Eclipse Public License
Distributed systems testing framework.
Installation
To install, add the following dependency to your project or build file:
[jepsen "0.3.2-SNAPSHOT"]
Namespaces
jepsen.adya
Moved to jepsen.tests.adya.
+Generated by Codox
Jepsen 0.3.2
Jepsen 0.3.2
Released under the Eclipse Public License
Distributed systems testing framework.
Installation
To install, add the following dependency to your project or build file:
[jepsen "0.3.2"]
Namespaces
jepsen.checker
Validates that a history is correct with respect to some model.
Public variables and functions:
- check-safe
- Checker
- clock-plot
- compose
- concurrency-limit
- counter
- expand-queue-drain-ops
- frequency-distribution
- latency-graph
- linearizable
- log-file-pattern
- merge-valid
- noop
- perf
- queue
- rate-graph
- set
- set-full
- set-full-add
- set-full-element
- set-full-element-results
- set-full-read-absent
- set-full-read-present
- set-full-results
- stats
- stats-fold
- total-queue
- unbridled-optimism
- unhandled-exceptions
- unique-ids
- valid-priorities
jepsen.checker.perf
Supporting functions for performance analysis.
Public variables and functions:
- broaden-range
- bucket-points
- bucket-scale
- bucket-time
- buckets
- completions-by-f-type
- default-nemesis-color
- first-time
- fs->points
- has-data?
- interval->times
- invokes-by-f
- invokes-by-f-type
- invokes-by-type
- latencies->quantiles
- latency-point
- latency-preamble
- legend-part
- nemesis-activity
- nemesis-alpha
- nemesis-lines
- nemesis-ops
- nemesis-regions
- nemesis-series
- plot!
- point-graph!
- preamble
- qs->colors
- quantiles
- quantiles-graph!
- rate
- rate-graph!
- rate-preamble
- type->color
- types
- with-nemeses
- with-range
- without-empty-series
jepsen.checker.timeline
Renders an HTML timeline of a history.
jepsen.cli
Command line interface. Provides a default main method for common Jepsen functions (like the web interface), and utility functions for Jepsen tests to create their own test runners.
Public variables and functions:
- -main
- default-nodes
- help-opt
- merge-opt-specs
- one-of
- package-opt
- parse-concurrency
- parse-nodes
- rename-keys
- rename-options
- rename-ssh-options
- repeated-opt
- run!
- serve-cmd
- single-test-cmd
- tarball-opt
- test-all-cmd
- test-all-exit!
- test-all-print-summary!
- test-all-run-tests!
- test-opt-fn
- test-opt-spec
- test-usage
- validate-tarball
jepsen.codec
Serializes and deserializes objects to/from bytes.
jepsen.control
Provides control over a remote node. There’s a lot of dynamically bound state in this namespace because we want to make it as simple as possible for scripts to open connections to various nodes.
Public variables and functions:
- &&
- *dir*
- *dummy*
- *host*
- *password*
- *port*
- *private-key-path*
- *remote*
- *retries*
- *session*
- *strict-host-key-checking*
- *sudo*
- *sudo-password*
- *trace*
- *username*
- cd
- clj-ssh
- cmd-context
- conn-spec
- debug-data
- disconnect
- download
- env
- escape
- exec
- exec*
- expand-path
- file->path
- just-stdout
- lit
- on
- on-many
- on-nodes
- session
- ssh
- ssh*
- su
- sudo
- throw-on-nonzero-exit
- trace
- upload
- upload-resource!
- with-remote
- with-session
- with-ssh
- with-test-nodes
- wrap-cd
- wrap-sudo
- wrap-trace
- |
jepsen.control.clj-ssh
A CLJ-SSH powered implementation of the Remote protocol.
Public variables and functions:
jepsen.control.core
Provides the base protocol for running commands on remote nodes, as well as common functions for constructing and evaluating shell commands.
diff --git a/jepsen.adya.html b/jepsen.adya.html index b48c17fc4..d18628c92 100644 --- a/jepsen.adya.html +++ b/jepsen.adya.html @@ -1,4 +1,4 @@ -Generated by Codox
Jepsen 0.3.2-SNAPSHOT
jepsen.adya
Moved to jepsen.tests.adya.
+Generated by Codox
Jepsen 0.3.2
jepsen.adya
Moved to jepsen.tests.adya.
Generated by Codox
Jepsen 0.3.2-SNAPSHOT
jepsen.checker.clock
Helps analyze clock skew over time.
+Generated by Codox
Jepsen 0.3.2
jepsen.checker.clock
Helps analyze clock skew over time.
history->datasets
(history->datasets history)
Takes a history and produces a map of nodes to sequences of t offset pairs, representing the changing clock offsets for that node over time.
-plot!
(plot! test history opts)
Plots clock offsets over time. Looks for any op with a :clock-offset field, which contains a (possible incomplete) map of nodes to offsets, in seconds. Plots those offsets over time.
-short-node-names
(short-node-names nodes)
Takes a collection of node names, and maps them to shorter names by removing common trailing strings (e.g. common domains).
-plot!
(plot! test history opts)
Plots clock offsets over time. Looks for any op with a :clock-offset field, which contains a (possible incomplete) map of nodes to offsets, in seconds. Plots those offsets over time.
+short-node-names
(short-node-names nodes)
Takes a collection of node names, and maps them to shorter names by removing common trailing strings (e.g. common domains).
+Generated by Codox
Jepsen 0.3.2-SNAPSHOT
jepsen.checker
Validates that a history is correct with respect to some model.
+Generated by Codox
Jepsen 0.3.2
jepsen.checker
Validates that a history is correct with respect to some model.
check-safe
(check-safe checker test history)
(check-safe checker test history opts)
Like check, but wraps exceptions up and returns them as a map like
{:valid? :unknown :error “…”}
-Checker
protocol
members
check
(check checker test history opts)
Verify the history is correct. Returns a map like
+Checker
protocol
members
check
(check checker test history opts)
Verify the history is correct. Returns a map like
{:valid? true}
or
{:valid? false :some-details … :failed-at details of specific operations}
Opts is a map of options controlling checker execution. Keys include:
:subdirectory - A directory within this test’s store directory where output files should be written. Defaults to nil.
-compose
(compose checker-map)
Takes a map of names to checkers, and returns a checker which runs each check (possibly in parallel) and returns a map of names to results; plus a top-level :valid? key which is true iff every checker considered the history valid.
-concurrency-limit
(concurrency-limit limit checker)
Takes positive integer limit and a checker. Puts an upper bound on the number of concurrent executions of this checker. Use this when a checker is particularly thread or memory intensive, to reduce context switching and memory cost.
-counter
(counter)
A counter starts at zero; add operations should increment it by that much, and reads should return the present value. This checker validates that at each read, the value is greater than the sum of all :ok increments, and lower than the sum of all attempted increments.
+compose
(compose checker-map)
Takes a map of names to checkers, and returns a checker which runs each check (possibly in parallel) and returns a map of names to results; plus a top-level :valid? key which is true iff every checker considered the history valid.
+concurrency-limit
(concurrency-limit limit checker)
Takes positive integer limit and a checker. Puts an upper bound on the number of concurrent executions of this checker. Use this when a checker is particularly thread or memory intensive, to reduce context switching and memory cost.
+counter
(counter)
A counter starts at zero; add operations should increment it by that much, and reads should return the present value. This checker validates that at each read, the value is greater than the sum of all :ok increments, and lower than the sum of all attempted increments.
Note that this counter verifier assumes the value monotonically increases: decrements are not allowed.
Returns a map:
:valid? Whether the counter remained within bounds :reads [lower-bound read-value upper-bound …] :errors [lower-bound read-value upper-bound …]
; Not implemented, but might be nice:
:max-absolute-error The lower read upper where read falls furthest outside :max-relative-error Same, but with error computed as a fraction of the mean}
-expand-queue-drain-ops
(expand-queue-drain-ops)
A Tesser fold which looks for :drain operations with their value being a collection of queue elements, and expands them to a sequence of :dequeue invoke/complete pairs.
-frequency-distribution
(frequency-distribution points c)
Computes a map of percentiles (0–1, not 0–100, we’re not monsters) of a collection of numbers, taken at percentiles points
. If the collection is empty, returns nil.
latency-graph
(latency-graph)
(latency-graph opts)
Spits out graphs of latencies. Checker options take precedence over those passed in with this constructor.
-linearizable
(linearizable {:keys [algorithm model]})
Validates linearizability with Knossos. Defaults to the competition checker, but can be controlled by passing either :linear or :wgl.
+expand-queue-drain-ops
(expand-queue-drain-ops)
A Tesser fold which looks for :drain operations with their value being a collection of queue elements, and expands them to a sequence of :dequeue invoke/complete pairs.
+frequency-distribution
(frequency-distribution points c)
Computes a map of percentiles (0–1, not 0–100, we’re not monsters) of a collection of numbers, taken at percentiles points
. If the collection is empty, returns nil.
latency-graph
(latency-graph)
(latency-graph opts)
Spits out graphs of latencies. Checker options take precedence over those passed in with this constructor.
+linearizable
(linearizable {:keys [algorithm model]})
Validates linearizability with Knossos. Defaults to the competition checker, but can be controlled by passing either :linear or :wgl.
Takes an options map for arguments, ex. {:model (model/cas-register) :algorithm :wgl}
-log-file-pattern
(log-file-pattern pattern filename)
Takes a PCRE regular expression pattern (as a Pattern or string) and a filename. Checks the store directory for this test, and in each node directory (e.g. n1), examines the given file to see if it contains instances of the pattern. Returns :valid? true if no instances are found, and :valid? false otherwise, along with a :count of the number of matches, and a :matches list of maps, each with the node and matching string from the file.
+log-file-pattern
(log-file-pattern pattern filename)
Takes a PCRE regular expression pattern (as a Pattern or string) and a filename. Checks the store directory for this test, and in each node directory (e.g. n1), examines the given file to see if it contains instances of the pattern. Returns :valid? true if no instances are found, and :valid? false otherwise, along with a :count of the number of matches, and a :matches list of maps, each with the node and matching string from the file.
(log-file-pattern-checker #“panic: (\w+)$” “db.log”)
{:valid? false :count 5 :matches {:node “n1” :line “panic: invariant violation” “invariant violation” …]}}
-merge-valid
(merge-valid valids)
Merge n :valid values, yielding the one with the highest priority.
-perf
(perf)
(perf opts)
Composes various performance statistics. Checker options take precedence over those passed in with this constructor.
-queue
(queue model)
Every dequeue must come from somewhere. Validates queue operations by assuming every non-failing enqueue succeeded, and only OK dequeues succeeded, then reducing the model with that history. Every subhistory of every queue should obey this property. Should probably be used with an unordered queue model, because we don’t look for alternate orderings. O(n).
-rate-graph
(rate-graph)
(rate-graph opts)
Spits out graphs of throughput over time. Checker options take precedence over those passed in with this constructor.
-set
(set)
Given a set of :add operations followed by a final :read, verifies that every successfully added element is present in the read, and that the read contains only elements for which an add was attempted.
-set-full
(set-full)
(set-full checker-opts)
A more rigorous set analysis. We allow :add operations which add a single element, and :reads which return all elements present at that time. For each element, we construct a timeline like so:
+merge-valid
(merge-valid valids)
Merge n :valid values, yielding the one with the highest priority.
+perf
(perf)
(perf opts)
Composes various performance statistics. Checker options take precedence over those passed in with this constructor.
+queue
(queue model)
Every dequeue must come from somewhere. Validates queue operations by assuming every non-failing enqueue succeeded, and only OK dequeues succeeded, then reducing the model with that history. Every subhistory of every queue should obey this property. Should probably be used with an unordered queue model, because we don’t look for alternate orderings. O(n).
+rate-graph
(rate-graph)
(rate-graph opts)
Spits out graphs of throughput over time. Checker options take precedence over those passed in with this constructor.
+set
(set)
Given a set of :add operations followed by a final :read, verifies that every successfully added element is present in the read, and that the read contains only elements for which an add was attempted.
+set-full
(set-full)
(set-full checker-opts)
A more rigorous set analysis. We allow :add operations which add a single element, and :reads which return all elements present at that time. For each element, we construct a timeline like so:
[nonexistent] ... [created] ... [present] ... [absent] ... [present] ...
For each element:
@@ -80,20 +80,20 @@ element was known to be inserted, but never observed. -set-full-element
(set-full-element op)
Given an add invocation, constructs a new set element state record to track that element
-set-full-element-results
(set-full-element-results e)
Takes a SetFullElement and computes a map of final results from it:
+set-full-element
(set-full-element op)
Given an add invocation, constructs a new set element state record to track that element
+set-full-element-results
(set-full-element-results e)
Takes a SetFullElement and computes a map of final results from it:
:element The element itself :outcome :stable, :lost, :never-read :lost-latency :stable-latency
-set-full-results
(set-full-results opts elements)
Takes options from set-full, and a collection of SetFullElements. Computes agggregate results; see set-full for details.
-stats
(stats)
Computes basic statistics about success and failure rates, both overall and broken down by :f. Results are valid only if every :f has at some :ok operations; otherwise they’re :unknown.
-total-queue
(total-queue)
What goes in must come out. Verifies that every successful enqueue has a successful dequeue. Queues only obey this property if the history includes draining them completely. O(n).
-unhandled-exceptions
(unhandled-exceptions)
Returns information about unhandled exceptions: a sequence of maps sorted in descending frequency order, each with:
+set-full-results
(set-full-results opts elements)
Takes options from set-full, and a collection of SetFullElements. Computes agggregate results; see set-full for details.
+stats
(stats)
Computes basic statistics about success and failure rates, both overall and broken down by :f. Results are valid only if every :f has at some :ok operations; otherwise they’re :unknown.
+total-queue
(total-queue)
What goes in must come out. Verifies that every successful enqueue has a successful dequeue. Queues only obey this property if the history includes draining them completely. O(n).
+unhandled-exceptions
(unhandled-exceptions)
Returns information about unhandled exceptions: a sequence of maps sorted in descending frequency order, each with:
:class The class of the exception thrown
:count How many of this exception we observed
:example An example operation
-unique-ids
(unique-ids)
Checks that a unique id generator actually emits unique IDs. Expects a history with :f :generate invocations matched by :ok responses with distinct IDs for their :values. IDs should be comparable. Returns
+unique-ids
(unique-ids)
Checks that a unique id generator actually emits unique IDs. Expects a history with :f :generate invocations matched by :ok responses with distinct IDs for their :values. IDs should be comparable. Returns
{:valid? Were all IDs unique?
:attempted-count Number of attempted ID generation calls
:acknowledged-count Number of IDs actually returned successfully
@@ -102,5 +102,5 @@
they appeared--not complete for perf reasons :D
:range [lowest-id highest-id]}
-valid-priorities
A map of :valid? values to their importance. Larger numbers are considered more signficant and dominate when checkers are composed.
-valid-priorities
A map of :valid? values to their importance. Larger numbers are considered more signficant and dominate when checkers are composed.
+Generated by Codox
Jepsen 0.3.2-SNAPSHOT
jepsen.checker.perf
Supporting functions for performance analysis.
+Generated by Codox
Jepsen 0.3.2
jepsen.checker.perf
Supporting functions for performance analysis.
broaden-range
(broaden-range [a b])
Given a lower upper range for a plot, returns lower’ upper’, which covers the original range, but slightly expanded, to fall nicely on integral boundaries.
-bucket-points
(bucket-points dt points)
Takes a time window dt and a sequence of time, _ points, and emits a seq of time, points-in-window buckets, ordered by time. Time is at the midpoint of the window.
-bucket-scale
(bucket-scale dt b)
Given a bucket size dt, and a bucket number (e.g. 0, 1, …), returns the time at the midpoint of that bucket.
-bucket-time
(bucket-time dt t)
Given a bucket size dt and a time t, computes the time at the midpoint of the bucket this time falls into.
-buckets
(buckets dt)
(buckets dt tmax)
Given a bucket size dt, emits a lazy sequence of times at the midpoints of each bucket.
-completions-by-f-type
(completions-by-f-type history)
Takes a history and returns a map of f -> type-> ops, for all completions in history.
-first-time
(first-time history)
Takes a history and returns the first :time in it, in seconds, as a double.
-fs->points
(fs->points fs)
Given a sequence of :f’s, yields a map of f -> gnuplot-point-type, so we can render each function in a different style.
-has-data?
(has-data? plot)
Takes a plot and returns true iff it has at least one series with data points.
-interval->times
(interval->times [a b])
Given an interval of two operations a b, returns the times time-a time-b covering the interval. If b is missing, yields time-a nil.
-invokes-by-f
(invokes-by-f)
(invokes-by-f history)
Takes a history and returns a map of f -> ops, for all invocations. Either a tesswer fold, or runs on a history.
-invokes-by-f-type
(invokes-by-f-type)
(invokes-by-f-type history)
A fold which returns a map of f -> type -> ops, for all invocations.
-invokes-by-type
(invokes-by-type)
(invokes-by-type history)
Splits up a sequence of invocations into ok, failed, and crashed ops by looking at their corresponding completions. Either a tesser fold, or runs on a history.
-latencies->quantiles
(latencies->quantiles dt qs points)
Takes a time window in seconds, a sequence of quantiles from 0 to 1, and a sequence of time, latency pairs. Groups pairs by their time window and emits a emits a map of quantiles to sequences of view source
bucket-points
(bucket-points dt points)
Takes a time window dt and a sequence of time, _ points, and emits a seq of time, points-in-window buckets, ordered by time. Time is at the midpoint of the window.
+bucket-scale
(bucket-scale dt b)
Given a bucket size dt, and a bucket number (e.g. 0, 1, …), returns the time at the midpoint of that bucket.
+bucket-time
(bucket-time dt t)
Given a bucket size dt and a time t, computes the time at the midpoint of the bucket this time falls into.
+buckets
(buckets dt)
(buckets dt tmax)
Given a bucket size dt, emits a lazy sequence of times at the midpoints of each bucket.
+completions-by-f-type
(completions-by-f-type history)
Takes a history and returns a map of f -> type-> ops, for all completions in history.
+first-time
(first-time history)
Takes a history and returns the first :time in it, in seconds, as a double.
+fs->points
(fs->points fs)
Given a sequence of :f’s, yields a map of f -> gnuplot-point-type, so we can render each function in a different style.
+has-data?
(has-data? plot)
Takes a plot and returns true iff it has at least one series with data points.
+interval->times
(interval->times [a b])
Given an interval of two operations a b, returns the times time-a time-b covering the interval. If b is missing, yields time-a nil.
+invokes-by-f
(invokes-by-f)
(invokes-by-f history)
Takes a history and returns a map of f -> ops, for all invocations. Either a tesswer fold, or runs on a history.
+invokes-by-f-type
(invokes-by-f-type)
(invokes-by-f-type history)
A fold which returns a map of f -> type -> ops, for all invocations.
+invokes-by-type
(invokes-by-type)
(invokes-by-type history)
Splits up a sequence of invocations into ok, failed, and crashed ops by looking at their corresponding completions. Either a tesser fold, or runs on a history.
+latencies->quantiles
(latencies->quantiles dt qs points)
Takes a time window in seconds, a sequence of quantiles from 0 to 1, and a sequence of time, latency pairs. Groups pairs by their time window and emits a emits a map of quantiles to sequences of time, latency-at-that-quantile pairs, one per time window.
-latency-point
(latency-point op)
Given an operation, returns a time, latency pair: times in seconds, latencies in ms.
-latency-preamble
(latency-preamble test output-path)
Gnuplot commands for setting up a latency plot.
-legend-part
(legend-part series)
Takes a series map and returns the list of gnuplot commands to render that series.
-nemesis-activity
(nemesis-activity nemeses history)
Given a nemesis specification and a history, partitions the set of nemesis operations in the history into different nemeses, as per the spec. Returns the spec, restricted to just those nemeses taking part in this history, and with each spec augmented with two keys:
+latency-point
(latency-point op)
Given an operation, returns a time, latency pair: times in seconds, latencies in ms.
+latency-preamble
(latency-preamble test output-path)
Gnuplot commands for setting up a latency plot.
+legend-part
(legend-part series)
Takes a series map and returns the list of gnuplot commands to render that series.
+nemesis-activity
(nemesis-activity nemeses history)
Given a nemesis specification and a history, partitions the set of nemesis operations in the history into different nemeses, as per the spec. Returns the spec, restricted to just those nemeses taking part in this history, and with each spec augmented with two keys:
:ops All operations the nemeses performed :intervals A set of start end paired ops.
-nemesis-lines
(nemesis-lines plot nemeses)
Given nemesis activity, emits a sequence of gnuplot commands rendering vertical lines where nemesis events occurred.
-nemesis-ops
(nemesis-ops nemeses history)
Given a history and a nemeses specification, partitions the set of nemesis operations in the history into different nemeses, as per the spec. Returns the nemesis spec, restricted to just those nemeses taking part in this history, and with each spec augmented with an :ops key, which contains all operations that nemesis performed.
-nemesis-regions
(nemesis-regions plot nemeses)
Given nemesis activity, emits a sequence of gnuplot commands rendering shaded regions where each nemesis was active. We can render a maximum of 12 nemeses; this keeps size and spacing consistent.
-nemesis-series
(nemesis-series plot nemeses)
Given nemesis activity, constructs the series required to show every present nemesis’ activity in the legend. We do this by constructing dummy data, and a key that will match the way that nemesis’s activity is rendered.
-nemesis-lines
(nemesis-lines plot nemeses)
Given nemesis activity, emits a sequence of gnuplot commands rendering vertical lines where nemesis events occurred.
+nemesis-ops
(nemesis-ops nemeses history)
Given a history and a nemeses specification, partitions the set of nemesis operations in the history into different nemeses, as per the spec. Returns the nemesis spec, restricted to just those nemeses taking part in this history, and with each spec augmented with an :ops key, which contains all operations that nemesis performed.
+nemesis-regions
(nemesis-regions plot nemeses)
Given nemesis activity, emits a sequence of gnuplot commands rendering shaded regions where each nemesis was active. We can render a maximum of 12 nemeses; this keeps size and spacing consistent.
+nemesis-series
(nemesis-series plot nemeses)
Given nemesis activity, constructs the series required to show every present nemesis’ activity in the legend. We do this by constructing dummy data, and a key that will match the way that nemesis’s activity is rendered.
+plot!
(plot! opts)
Renders a gnuplot plot. Takes an option map:
:preamble Gnuplot commands to send first :series A vector of series maps :draw-fewer-on-top? If passed, renders series with fewer points on top :xrange A pair xmin xmax which controls the xrange :yrange Ditto, for the y axis :logscale e.g. :y
A series map is a map with:
:data A sequence of data points to render, e,g. [0 0 1 2 2 4] :with How to draw this series, e.g. ’points :linetype What kind of line to use :pointtype What kind of point to use :title A string, or nil, to label this series map
-point-graph!
(point-graph! test history {:keys [subdirectory nemeses], :as opts})
Writes a plot of raw latency data points.
-qs->colors
(qs->colors qs)
Given a sequence of quantiles q, yields a map of q -> gnuplot-color, so we can render each latency curve in a different color.
-quantiles
(quantiles qs points)
Takes a sequence of quantiles from 0 to 1 and a sequence of values, and returns a map of quantiles to values at those quantiles.
-quantiles-graph!
(quantiles-graph! test history {:keys [subdirectory nemeses]})
Writes a plot of latency quantiles, by f, over time.
-rate
(rate history)
Map breaking down the mean rate of completions by f and type, plus totals at each level.
-rate-graph!
(rate-graph! test history {:keys [subdirectory nemeses]})
Writes a plot of operation rate by their completion times.
-rate-preamble
(rate-preamble test output-path)
Gnuplot commands for setting up a rate plot.
-with-nemeses
(with-nemeses plot history nemeses)
Augments a plot map to render nemesis activity. Takes a nemesis specification: a collection of nemesis spec maps, each of which has keys:
+point-graph!
(point-graph! test history {:keys [subdirectory nemeses], :as opts})
Writes a plot of raw latency data points.
+qs->colors
(qs->colors qs)
Given a sequence of quantiles q, yields a map of q -> gnuplot-color, so we can render each latency curve in a different color.
+quantiles
(quantiles qs points)
Takes a sequence of quantiles from 0 to 1 and a sequence of values, and returns a map of quantiles to values at those quantiles.
+quantiles-graph!
(quantiles-graph! test history {:keys [subdirectory nemeses]})
Writes a plot of latency quantiles, by f, over time.
+rate
(rate history)
Map breaking down the mean rate of completions by f and type, plus totals at each level.
+rate-graph!
(rate-graph! test history {:keys [subdirectory nemeses]})
Writes a plot of operation rate by their completion times.
+rate-preamble
(rate-preamble test output-path)
Gnuplot commands for setting up a rate plot.
+with-nemeses
(with-nemeses plot history nemeses)
Augments a plot map to render nemesis activity. Takes a nemesis specification: a collection of nemesis spec maps, each of which has keys:
:name A string uniquely naming this nemesis :color What color to use for drawing this nemesis (e.g. “#abcd01”) :start A set of :f’s which begin this nemesis’ activity :stop A set of :f’s which end this nemesis’ activity :fs A set of :f’s otherwise related to this nemesis
-with-range
(with-range plot)
Takes a plot object. Where xrange or yrange are not provided, fills them in by iterating over each series :data.
-without-empty-series
(without-empty-series plot)
Takes a plot, and strips out empty series objects.
-with-range
(with-range plot)
Takes a plot object. Where xrange or yrange are not provided, fills them in by iterating over each series :data.
+without-empty-series
(without-empty-series plot)
Takes a plot, and strips out empty series objects.
+Generated by Codox
Jepsen 0.3.2-SNAPSHOT
jepsen.checker.timeline
Renders an HTML timeline of a history.
-breadcrumbs
(breadcrumbs test history-key)
Renders a series of back links increasing in depth
-op-limit
Maximum number of operations to render. Helps make timeline usable on massive histories.
-pair->div
(pair->div history test process-index [start stop])
Turns a pair of start/stop operations into a div.
-pairs
(pairs history)
(pairs invocations [op & ops])
Pairs up ops from each process in a history. Yields a lazy sequence of info or invoke, ok|fail|info pairs.
-render-op-extra-keys
(render-op-extra-keys op)
Helper for render-op which renders keys we didn’t explicitly print
-sub-index
(sub-index history)
Attaches a :sub-index key to each element of this timeline’s subhistory, identifying its relative position.
-Generated by Codox
Jepsen 0.3.2
jepsen.checker.timeline
Renders an HTML timeline of a history.
+breadcrumbs
(breadcrumbs test history-key)
Renders a series of back links increasing in depth
+op-limit
Maximum number of operations to render. Helps make timeline usable on massive histories.
+pair->div
(pair->div history test process-index [start stop])
Turns a pair of start/stop operations into a div.
+pairs
(pairs history)
(pairs invocations [op & ops])
Pairs up ops from each process in a history. Yields a lazy sequence of info or invoke, ok|fail|info pairs.
+render-op-extra-keys
(render-op-extra-keys op)
Helper for render-op which renders keys we didn’t explicitly print
+sub-index
(sub-index history)
Attaches a :sub-index key to each element of this timeline’s subhistory, identifying its relative position.
+Generated by Codox
Jepsen 0.3.2-SNAPSHOT
jepsen.cli
Command line interface. Provides a default main method for common Jepsen functions (like the web interface), and utility functions for Jepsen tests to create their own test runners.
-merge-opt-specs
(merge-opt-specs a b)
Takes two option specifications and merges them together. Where both offer the same option name, prefers the latter.
-one-of
(one-of coll)
Takes a collection and returns a string like “Must be one of …” and a list of names. For maps, uses keys.
-parse-concurrency
(parse-concurrency parsed)
(parse-concurrency parsed k)
Takes a parsed map. Parses :concurrency; if it is a string ending with n, e.g 3n, sets it to 3 * the number of :nodes. Otherwise, parses as a plain integer. With an optional keyword k, parses that key in the parsed map–by default, the key is :concurrency.
-parse-nodes
(parse-nodes parsed)
Takes a parsed map and merges all the various node specifications together. In particular:
+Generated by Codox
Jepsen 0.3.2
jepsen.cli
Command line interface. Provides a default main method for common Jepsen functions (like the web interface), and utility functions for Jepsen tests to create their own test runners.
+merge-opt-specs
(merge-opt-specs a b)
Takes two option specifications and merges them together. Where both offer the same option name, prefers the latter.
+one-of
(one-of coll)
Takes a collection and returns a string like “Must be one of …” and a list of names. For maps, uses keys.
+parse-concurrency
(parse-concurrency parsed)
(parse-concurrency parsed k)
Takes a parsed map. Parses :concurrency; if it is a string ending with n, e.g 3n, sets it to 3 * the number of :nodes. Otherwise, parses as a plain integer. With an optional keyword k, parses that key in the parsed map–by default, the key is :concurrency.
+parse-nodes
(parse-nodes parsed)
Takes a parsed map and merges all the various node specifications together. In particular:
- If :nodes-file and :nodes are blank, and :node is the default node list, uses the default node list.
- Otherwise, merges together :nodes-file, :nodes, and :node into a single list.
The new parsed map will have a merged nodes list in :nodes, and lose :nodes-file and :node options.
-rename-keys
(rename-keys m replacements)
Given a map m, and a map of keys to replacement keys, yields m with keys renamed.
-rename-options
(rename-options parsed replacements)
Like rename-keys, but takes a parsed map and updates keys in :options.
-rename-ssh-options
(rename-ssh-options parsed)
Takes a parsed map and moves SSH options to a map under :ssh.
-repeated-opt
(repeated-opt short-opt long-opt docstring default)
(repeated-opt short-opt long-opt docstring default parse-map)
Helper for vector options where we want to replace the default vector (checking via identical?) if any options are passed, building a vector for multiple args. If parse-map is provided (a map of string cmdline options to parsed values), the special word “all” can be used to specify every value in the map.
-run!
(run! subcommands [command & arguments :as argv])
Parses arguments and runs tests, etc. Takes a map of subcommand names to subcommand-specs, and a list of arguments. Each subcommand-spec is a map with the following keys:
+rename-keys
(rename-keys m replacements)
Given a map m, and a map of keys to replacement keys, yields m with keys renamed.
+rename-options
(rename-options parsed replacements)
Like rename-keys, but takes a parsed map and updates keys in :options.
+rename-ssh-options
(rename-ssh-options parsed)
Takes a parsed map and moves SSH options to a map under :ssh.
+repeated-opt
(repeated-opt short-opt long-opt docstring default)
(repeated-opt short-opt long-opt docstring default parse-map)
Helper for vector options where we want to replace the default vector (checking via identical?) if any options are passed, building a vector for multiple args. If parse-map is provided (a map of string cmdline options to parsed values), the special word “all” can be used to specify every value in the map.
+run!
(run! subcommands [command & arguments :as argv])
Parses arguments and runs tests, etc. Takes a map of subcommand names to subcommand-specs, and a list of arguments. Each subcommand-spec is a map with the following keys:
:opt-spec - The option parsing spec to use. :opt-fn - A function to transform the tools.cli options map, e.g. {:options …, :arguments …, :summary …}. Default: identity :usage - A usage string (default: “Usage:”) :run - Function to execute with the transformed options (default: pprint)
If an unrecognized (or no command) is given, prints out a general usage guide and exits.
For a subcommand, if help or –help is given, prints out a help string with usage for the given subcommand and exits with status 0.
If invalid arguments are given, prints those errors to the console, and exits with status 254.
Finally, if everything looks good, calls the given subcommand’s run
function with parsed options, and exits with status 0.
Catches exceptions, logs them to the console, and exits with status 255.
-single-test-cmd
(single-test-cmd opts)
A command which runs a single test with standard built-ins. Options:
+single-test-cmd
(single-test-cmd opts)
A command which runs a single test with standard built-ins. Options:
{:opt-spec A vector of additional options for tools.cli. Merge into test-opt-spec
. Optional. :opt-fn A function which transforms parsed options. Composed after test-opt-fn
. Optional. :opt-fn* Replaces test-opt-fn, in case you want to override it altogether. :tarball If present, adds a –tarball option to this command, defaulting to whatever URL is given here. :usage Defaults to jc/test-usage
. Optional. :test-fn A function that receives the option map and constructs a test.}
This comes with two commands: test
, which runs a test and analyzes it, and analyze
, which constructs a test map using the same arguments as run
, but analyzes a history from disk instead.
test-all-cmd
(test-all-cmd opts)
A command that runs a whole suite of tests in one go. Options:
+test-all-cmd
(test-all-cmd opts)
A command that runs a whole suite of tests in one go. Options:
:opt-spec A vector of additional options for tools.cli. Appended to test-opt-spec. Optional. :opt-fn A function which transforms parsed options. Composed after test-opt-fn. Optional. :opt-fn* Replaces test-opt-fn, instead of composing with it. :usage Defaults to test-usage
. Optional. :tests-fn A function that receives the transformed option map and constructs a sequence of tests to run.
test-all-exit!
(test-all-exit! results)
Takes a map of statuses and exits with an appropriate error code: 255 if any crashed, 2 if any were unknown, 1 if any were invalid, 0 if all passed.
-test-all-print-summary!
(test-all-print-summary! results)
Prints a summary of test outcomes. Takes a map of statuses (e.g. :crashed, true, false, :unknown), to test files. Returns results.
-test-all-run-tests!
(test-all-run-tests! tests)
Runs a sequence of tests and returns a map of outcomes (e.g. true, :unknown, :crashed, false) to collections of test folders with that outcome.
-test-opt-fn
(test-opt-fn parsed)
An opt fn for running simple tests. Remaps ssh keys, remaps :node to :nodes, reads :nodes-file into :nodes, and parses :concurrency.
-validate-tarball
(validate-tarball parsed)
Takes a parsed map and ensures a tarball is present.
-test-all-exit!
(test-all-exit! results)
Takes a map of statuses and exits with an appropriate error code: 255 if any crashed, 2 if any were unknown, 1 if any were invalid, 0 if all passed.
+test-all-print-summary!
(test-all-print-summary! results)
Prints a summary of test outcomes. Takes a map of statuses (e.g. :crashed, true, false, :unknown), to test files. Returns results.
+test-all-run-tests!
(test-all-run-tests! tests)
Runs a sequence of tests and returns a map of outcomes (e.g. true, :unknown, :crashed, false) to collections of test folders with that outcome.
+test-opt-fn
(test-opt-fn parsed)
An opt fn for running simple tests. Remaps ssh keys, remaps :node to :nodes, reads :nodes-file into :nodes, and parses :concurrency.
+validate-tarball
(validate-tarball parsed)
Takes a parsed map and ensures a tarball is present.
+Generated by Codox
Jepsen 0.3.2-SNAPSHOT
jepsen.client
Applies operations to a database.
+Generated by Codox
Jepsen 0.3.2
jepsen.client
Applies operations to a database.
Client
protocol
members
close!
(close! client test)
Close the client connection when work is completed or an invocation crashes the client. Close should not affect the logical state of the test.
invoke!
(invoke! client test operation)
Apply an operation to the client, returning an operation to be appended to the history. For multi-stage operations, the client may reach into the test and conj onto the history atom directly.
open!
(open! client test node)
Set up the client to work with a particular node. Returns a client which is ready to accept operations via invoke! Open should not affect the logical state of the test; it should not, for instance, modify tables or insert records.
setup!
(setup! client test)
Called to set up database state for testing.
teardown!
(teardown! client test)
Tear down database state when work is complete.
-is-reusable?
(is-reusable? client test)
Wrapper around reusable?; returns false when not implemented.
-Reusable
protocol
members
reusable?
(reusable? client test)
If true, this client can be re-used with a fresh process after a call to invoke
throws or returns an info
operation. If false (or if this protocol is not implemented), crashed clients will be closed and new ones opened to replace them.
validate
(validate client)
Wraps a client, validating that its return types are what you’d expect.
-with-client
macro
(with-client [client-sym client-expr] & body)
Analogous to with-open. Takes a binding of the form view source
is-reusable?
(is-reusable? client test)
Wrapper around reusable?; returns false when not implemented.
+Reusable
protocol
members
reusable?
(reusable? client test)
If true, this client can be re-used with a fresh process after a call to invoke
throws or returns an info
operation. If false (or if this protocol is not implemented), crashed clients will be closed and new ones opened to replace them.
timeout
(timeout timeout-or-fn client)
Sometimes a client library’s own timeouts don’t work reliably. This takes either a timeout as a number of ms, or a function (f op) => timeout-in-ms, and a client. Wraps that client in a new one which automatically times out operations that take longer than the given timeout. Timed out operations have :error :jepsen.client/timeout.
+validate
(validate client)
Wraps a client, validating that its return types are what you’d expect.
+with-client
macro
(with-client [client-sym client-expr] & body)
Analogous to with-open. Takes a binding of the form client-sym client-expr, and a body. Binds client-sym to client-expr (presumably, client-expr opens a new client), evaluates body with client-sym bound, and ensures client is closed before returning.
-Generated by Codox
Jepsen 0.3.2-SNAPSHOT
jepsen.codec
Serializes and deserializes objects to/from bytes.
+Generated by Codox
Jepsen 0.3.2
jepsen.codec
Serializes and deserializes objects to/from bytes.
Generated by Codox
Jepsen 0.3.2-SNAPSHOT
jepsen.control.clj-ssh
A CLJ-SSH powered implementation of the Remote protocol.
+Generated by Codox
Jepsen 0.3.2
jepsen.control.clj-ssh
A CLJ-SSH powered implementation of the Remote protocol.
clj-ssh-agent
Acquiring an SSH agent is expensive and involves a global lock; we save the agent and re-use it to speed things up.
-clj-ssh-session
(clj-ssh-session conn-spec)
Opens a raw session to the given connection spec
-concurrency-limit
OpenSSH has a standard limit of 10 concurrent channels per connection. However, commands run in quick succession with 10 concurrent also seem to blow out the channel limit–perhaps there’s an asynchronous channel teardown process. We set the limit a bit lower here. This is experimentally determined for clj-ssh by running jepsen.control-test’s integration test…
with-errors
macro
(with-errors conn context & body)
Takes a conn spec, a context map, and a body. Evals body, remapping clj-ssh exceptions to :type :jepsen.control/ssh-failed.
-clj-ssh-session
(clj-ssh-session conn-spec)
Opens a raw session to the given connection spec
+concurrency-limit
OpenSSH has a standard limit of 10 concurrent channels per connection. However, commands run in quick succession with 10 concurrent also seem to blow out the channel limit–perhaps there’s an asynchronous channel teardown process. We set the limit a bit lower here. This is experimentally determined for clj-ssh by running jepsen.control-test’s integration test…
with-errors
macro
(with-errors conn context & body)
Takes a conn spec, a context map, and a body. Evals body, remapping clj-ssh exceptions to :type :jepsen.control/ssh-failed.
+Generated by Codox
Jepsen 0.3.2-SNAPSHOT
jepsen.control.core
Provides the base protocol for running commands on remote nodes, as well as common functions for constructing and evaluating shell commands.
+Generated by Codox
Jepsen 0.3.2
jepsen.control.core
Provides the base protocol for running commands on remote nodes, as well as common functions for constructing and evaluating shell commands.
env
(env env)
We often want to construct env vars for a process. This function takes a map of environment variable names (any Named type, e.g. :HOME, “HOME”) to values (which are coerced using (str value)
), and constructs a Literal string, suitable for passing to exec, which binds those environment variables.
Callers of this function (especially indirectly, as with start-stop-daemon), may wish to construct env var strings themselves. Passing a string s
to this function simply returns (lit s)
. Passing a Literal l
to this function returns l
. nil is passed through unchanged.
escape
(escape s)
Escapes a thing for the shell.
Nils are empty strings.
Literal wrappers are passed through directly.
The special keywords :>, :>>, and :< map to their corresponding shell I/O redirection operators.
Named things like keywords and symbols use their name, escaped. Strings are escaped like normal.
Sequential collections and sets have each element escaped and space-separated.
-Remote
protocol
Remotes allow jepsen.control to run shell commands, upload, and download files. They use a context map, which encodes the current user, directory, etc:
+Remote
protocol
Remotes allow jepsen.control to run shell commands, upload, and download files. They use a context map, which encodes the current user, directory, etc:
:dir - The directory to execute remote commands in :sudo - The user we want to execute a command as :password - The user’s password, for sudo, if necessary.
members
connect
(connect this conn-spec)
Set up the remote to work with a particular node. Returns a Remote which is ready to accept actions via execute!
and upload!
and download!
. conn-spec is a map of:
{:host :post :username :password :private-key-path :strict-host-key-checking}
@@ -24,6 +24,6 @@:exit The command’s exit status. :out The stdout string. :err The stderr string.
upload!
(upload! this context local-paths remote-path opts)
Copy the specified local-path to the remote-path on the connected host.
Opts is an option map. There are no defined options right now, but later we might introduce some for e.g. recursive uploads, compression, etc. This is also a place for Remote implementations to offer custom semantics.
-throw-on-nonzero-exit
(throw-on-nonzero-exit {:keys [exit action], :as result})
Throws when an SSH result has nonzero exit status.
-wrap-sudo
(wrap-sudo {:keys [sudo sudo-password]} cmd)
Takes a context map and a command action, and returns the command action, modified to wrap it in a sudo command, if necessary. Uses the context map’s :sudo and :sudo-password fields.
-throw-on-nonzero-exit
(throw-on-nonzero-exit {:keys [exit action], :as result})
Throws when an SSH result has nonzero exit status.
+wrap-sudo
(wrap-sudo {:keys [sudo sudo-password]} cmd)
Takes a context map and a command action, and returns the command action, modified to wrap it in a sudo command, if necessary. Uses the context map’s :sudo and :sudo-password fields.
+Generated by Codox
Jepsen 0.3.2-SNAPSHOT
jepsen.control.docker
The recommended way is to use SSH to setup and teardown databases. It’s however sometimes conveniet to be able to setup and teardown the databases using docker exec
and docker cp
instead, which is what this namespace helps you do.
Generated by Codox
Jepsen 0.3.2
jepsen.control.docker
The recommended way is to use SSH to setup and teardown databases. It’s however sometimes conveniet to be able to setup and teardown the databases using docker exec
and docker cp
instead, which is what this namespace helps you do.
Use at your own risk, this is an unsupported way of running Jepsen.
cp-from
(cp-from container-id remote-paths local-path)
Copies files from a container filesystem to the host.
-cp-to
(cp-to container-id local-paths remote-path)
Copies files from the host to a container filesystem.
-exec
(exec container-id {:keys [cmd], :as opts})
Execute a shell command on a docker container.
-resolve-container-id
(resolve-container-id host)
Takes a host, e.g. localhost:30404
, and resolves the Docker container id exposing that port. Due to a bug in Docker (https://github.com/moby/moby/pull/40442) this is more difficult than it should be.
cp-to
(cp-to container-id local-paths remote-path)
Copies files from the host to a container filesystem.
+exec
(exec container-id {:keys [cmd], :as opts})
Execute a shell command on a docker container.
+resolve-container-id
(resolve-container-id host)
Takes a host, e.g. localhost:30404
, and resolves the Docker container id exposing that port. Due to a bug in Docker (https://github.com/moby/moby/pull/40442) this is more difficult than it should be.
Generated by Codox
Jepsen 0.3.2-SNAPSHOT
jepsen.control
Provides control over a remote node. There’s a lot of dynamically bound state in this namespace because we want to make it as simple as possible for scripts to open connections to various nodes.
+Generated by Codox
Jepsen 0.3.2
jepsen.control
Provides control over a remote node. There’s a lot of dynamically bound state in this namespace because we want to make it as simple as possible for scripts to open connections to various nodes.
Note that a whole bunch of this namespace refers to things as ‘ssh’, although they really can apply to any remote, not just SSH.
cmd-context
(cmd-context)
Constructs a context map for a command’s execution from dynamically bound vars.
-conn-spec
(conn-spec)
jepsen.control originally stored everything–host, post, etc.–in separate dynamic variables. Now, we store these things in a conn-spec map, which can be passed to remotes without creating cyclic dependencies. This function exists to support the transition from those variables to a conn-spec, and constructs a conn spec from current var bindings.
-env
(env env)
We often want to construct env vars for a process. This function takes a map of environment variable names (any Named type, e.g. :HOME, “HOME”) to values (which are coerced using (str value)
), and constructs a Literal string, suitable for passing to exec, which binds those environment variables.
cmd-context
(cmd-context)
Constructs a context map for a command’s execution from dynamically bound vars.
+conn-spec
(conn-spec)
jepsen.control originally stored everything–host, post, etc.–in separate dynamic variables. Now, we store these things in a conn-spec map, which can be passed to remotes without creating cyclic dependencies. This function exists to support the transition from those variables to a conn-spec, and constructs a conn spec from current var bindings.
+env
(env env)
We often want to construct env vars for a process. This function takes a map of environment variable names (any Named type, e.g. :HOME, “HOME”) to values (which are coerced using (str value)
), and constructs a Literal string, suitable for passing to exec, which binds those environment variables.
Callers of this function (especially indirectly, as with start-stop-daemon), may wish to construct env var strings themselves. Passing a string s
to this function simply returns (lit s)
. Passing a Literal l
to this function returns l
. nil is passed through unchanged.
escape
(escape s)
Escapes a thing for the shell.
Nils are empty strings.
Literal wrappers are passed through directly.
The special keywords :>, :>>, and :< map to their corresponding shell I/O redirection operators.
Named things like keywords and symbols use their name, escaped. Strings are escaped like normal.
Sequential collections and sets have each element escaped and space-separated.
-exec
(exec & commands)
Takes a shell command and arguments, runs the command, and returns stdout, throwing if an error occurs. Escapes all arguments.
-file->path
(file->path x)
Takes an object, if it’s an instance of java.io.File, gets the path, otherwise returns the object
-just-stdout
(just-stdout result)
Returns the stdout from an ssh result, trimming any newlines at the end.
-on
macro
(on host & body)
Opens a session to the given host and evaluates body there; and closes session when body completes.
-on-many
macro
(on-many hosts & body)
Takes a list of hosts, executes body on each host in parallel, and returns a map of hosts to return values.
-on-nodes
(on-nodes test f)
(on-nodes test nodes f)
Given a test, evaluates (f test node) in parallel on each node, with that node’s SSH connection bound. If nodes
is provided, evaluates only on those nodes in particular.
ssh*
(ssh* action)
Evaluates an SSH action against the current host. Retries packet corrupt errors.
-throw-on-nonzero-exit
(throw-on-nonzero-exit {:keys [exit action], :as result})
Throws when an SSH result has nonzero exit status.
-upload
(upload local-paths remote-path)
Copies local path(s) to remote node and returns the remote path.
-upload-resource!
(upload-resource! resource-name remote-path)
Uploads a local JVM resource (as a string) to the given remote path.
-with-remote
macro
(with-remote remote & body)
Takes a remote and evaluates body with that remote in that scope.
-with-session
macro
(with-session host session & body)
Binds a host and session and evaluates body. Does not open or close session; this is just for the namespace dynamic state.
-with-ssh
macro
(with-ssh ssh & body)
Takes a map of SSH configuration and evaluates body in that scope. Catches JSchExceptions and re-throws with all available debugging context. Options:
+exec
(exec & commands)
Takes a shell command and arguments, runs the command, and returns stdout, throwing if an error occurs. Escapes all arguments.
+file->path
(file->path x)
Takes an object, if it’s an instance of java.io.File, gets the path, otherwise returns the object
+just-stdout
(just-stdout result)
Returns the stdout from an ssh result, trimming any newlines at the end.
+on
macro
(on host & body)
Opens a session to the given host and evaluates body there; and closes session when body completes.
+on-many
macro
(on-many hosts & body)
Takes a list of hosts, executes body on each host in parallel, and returns a map of hosts to return values.
+on-nodes
(on-nodes test f)
(on-nodes test nodes f)
Given a test, evaluates (f test node) in parallel on each node, with that node’s SSH connection bound. If nodes
is provided, evaluates only on those nodes in particular.
ssh*
(ssh* action)
Evaluates an SSH action against the current host. Retries packet corrupt errors.
+throw-on-nonzero-exit
(throw-on-nonzero-exit {:keys [exit action], :as result})
Throws when an SSH result has nonzero exit status.
+upload
(upload local-paths remote-path)
Copies local path(s) to remote node and returns the remote path.
+upload-resource!
(upload-resource! resource-name remote-path)
Uploads a local JVM resource (as a string) to the given remote path.
+with-remote
macro
(with-remote remote & body)
Takes a remote and evaluates body with that remote in that scope.
+with-session
macro
(with-session host session & body)
Binds a host and session and evaluates body. Does not open or close session; this is just for the namespace dynamic state.
+with-ssh
macro
(with-ssh ssh & body)
Takes a map of SSH configuration and evaluates body in that scope. Catches JSchExceptions and re-throws with all available debugging context. Options:
:dummy? :username :password :sudo-password :private-key-path :strict-host-key-checking
-with-test-nodes
macro
(with-test-nodes test & body)
Given a test, evaluates body in parallel on each node, with that node’s SSH connection bound.
-with-test-nodes
macro
(with-test-nodes test & body)
Given a test, evaluates body in parallel on each node, with that node’s SSH connection bound.
+Generated by Codox
Jepsen 0.3.2-SNAPSHOT
jepsen.control.k8s
The recommended way is to use SSH to setup and teardown databases. It’s however sometimes conveniet to be able to setup and teardown the databases using kubectl
instead, which is what this namespace helps you do. Use at your own risk, this is an unsupported way of running Jepsen.
Generated by Codox
Jepsen 0.3.2
jepsen.control.k8s
The recommended way is to use SSH to setup and teardown databases. It’s however sometimes conveniet to be able to setup and teardown the databases using kubectl
instead, which is what this namespace helps you do. Use at your own risk, this is an unsupported way of running Jepsen.
cp-from
(cp-from context namespace pod-name remote-paths local-path)
Copies files from a pod filesystem to the host.
-cp-to
(cp-to context namespace pod-name local-paths remote-path)
Copies files from the host to a pod filesystem.
-exec
(exec context namespace pod-name {:keys [cmd], :as opts})
Execute a shell command on a pod.
-k8s
(k8s)
Returns a remote that does things via kubectl exec
and kubectl cp
, in the default context and namespacd.
list-pods
(list-pods context namespace)
A helper function to list all pods in a given context/namespace
-cp-to
(cp-to context namespace pod-name local-paths remote-path)
Copies files from the host to a pod filesystem.
+exec
(exec context namespace pod-name {:keys [cmd], :as opts})
Execute a shell command on a pod.
+k8s
(k8s)
Returns a remote that does things via kubectl exec
and kubectl cp
, in the default context and namespacd.
list-pods
(list-pods context namespace)
A helper function to list all pods in a given context/namespace
+