Shepherd-Herd#
Note
TODO: WORK IN PROGRESS
- class shepherd_herd.Herd(inventory: str | None = None, limit: str | None = None, user: str | None = None, key_filepath: Path | None = None)#
- check_status(*, warn: bool = False) bool #
Returns true as long as one instance is still measuring
- Parameters:
warn –
- Returns:
True is one node is still active
- find_consensus_time() tuple[datetime, float] #
Finds a start time in the future when all nodes should start service
In order to run synchronously, all nodes should start at the same time. This is achieved by querying all nodes to check any large time offset, agreeing on a common time in the future and waiting for that time on each node.
- inventorize(output_path: Path) bool #
Collects information about the hosts, including the herd-server, return True on failure
- print_output(replies: dict[int, Result], *, verbose: bool = False) None #
Logs output-results of shell commands
- put_task(task: Path | ShpModel, remote_path: Path | str = '/etc/shepherd/config.yaml') None #
transfers shepherd tasks to the group of hosts / sheep.
Rolls out a configuration file according to the given command and parameters service.
- run_cmd(cmd: str, *, sudo: bool = False) dict[int, Result] #
Run COMMAND on the shell -> Returns output-results NOTE: in case of error on a node that corresponding dict value is unavailable
- start_measurement() int #
Starts shepherd service on the group of hosts.