0.11.0
Major change in this release - introduction of Pydantic models to validate execution/sate/runner modules arguments to implement fail fast approach and significantly improve overall reliability as all arguments are now validated by Pydantic ensuring semantic and functional validity.
Another change are a switch to Poetry for dependency management and switch to Rocky Linux with Python3.9 as a main development and testing environment.
CHANGES
- Added pydantic==1.9.0 to base requirements
- Added these pydantic models to verify execution/state/runner modules function arguments using yangdantic module from nornir-salt:
- model_exec_nr_cli
- model_exec_nr_task
- model_exec_nr_cfg
- model_exec_nr_tping
- model_exec_nr_test
- model_exec_nr_nc
- model_exec_nr_http
- model_exec_nr_do
- model_exec_nr_file
- model_exec_nr_learn
- model_exec_nr_find
- model_exec_nr_diff
- model_exec_nr_nornir_fun
- model_exec_nr_gnmi
- model_state_nr_workflow
- model_runner_nr_inventory
- model_runner_nr_call
- model_runner_nr_event
- model_runner_nr_cfg
- model_nornir_config
- Proxy Module uses nornir-salt
modelTestsProcessorSuite
Pydantic model to verify tests suite items prior to running them, that waynr.test
will fail immediately if any of the test items is not compliant nr.do
changed to omit searching for actions in master config, minion config and grains, it only sources them from pillar or text files from master, this is to speed upnr.do dir
calls and overallnr.do
actions execution- Added multiprocessing lock to files download, now only one worker at a time can download files from master
- File downloading from master with
cp.get_url
was updated to use files cached on Minion, instead of downloading files over and over again from master if content is the same. - Moved dependency management to Poetry, removed all requirements files replacing them with
pyproject.toml
definition - For test environment added
fakenos
container to run scale/performance tests - Moved test environment to Rocky Linux container running Python 3.9 - all development will be done using that setup
- Runner nr.call makes use of _get_hosts_minions function to get a list of hosts and proxy minion to target before running the task, that is to ensure that we only targeting alive proxy minions without unnecessary retry attempts on disconnected.downed minions
- Test/Development containers environment updated to run on Rocky Linux using Python 3.9
FEATURES
- Added Pydantic package and Python versions to
nr.nornir version
report - Introduced Pydantic models for Salt-Nornir modules functions' input validation, that is to make sure that parameters supplied comply with required format - increase Salt-Nornir proxy robustness/reliability and enforce fail-fast approach
- Salt-Nornir updated to use Poetry for packaging and dependency management and for virtual env management
- Added tree output to runner
nr.inventory
to visualize output for minions, devices and machines where they are hosted - Added model_nornir_config pydantic model to run configuration parameters verification prior to starting proxy minion
BUGS
- Fixed issue #9 bug with simultaneous files download from master
- When doing 'nr.file rm filegrouop_name' was getting tf_index file overwritten probably by various task threads trying to remove files simultaneously, introduced file lock support mechanism passing it onto the 'files' task and 'ToFileProcessor' from proxy minion
- Fixed nr.cfg runner to honor Fx filters while filtering hosts to configure
- nr.cfg runner fixed batches calculations to account for cases when using odd numbers of hosts and of batch size e.g. 7 / 3 should produce 3 batches while previously was resulted in 2 batches