Skip to content

0.11.0

Compare
Choose a tag to compare
@dmulyalin dmulyalin released this 29 May 02:53
· 108 commits to master since this release

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

  1. Added pydantic==1.9.0 to base requirements
  2. 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
  1. Proxy Module uses nornir-salt modelTestsProcessorSuite Pydantic model to verify tests suite items prior to running them, that way nr.test will fail immediately if any of the test items is not compliant
  2. 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 up nr.do dir calls and overall nr.do actions execution
  3. Added multiprocessing lock to files download, now only one worker at a time can download files from master
  4. 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.
  5. Moved dependency management to Poetry, removed all requirements files replacing them with pyproject.toml definition
  6. For test environment added fakenos container to run scale/performance tests
  7. Moved test environment to Rocky Linux container running Python 3.9 - all development will be done using that setup
  8. 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
  9. Test/Development containers environment updated to run on Rocky Linux using Python 3.9

FEATURES

  1. Added Pydantic package and Python versions to nr.nornir version report
  2. 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
  3. Salt-Nornir updated to use Poetry for packaging and dependency management and for virtual env management
  4. Added tree output to runner nr.inventory to visualize output for minions, devices and machines where they are hosted
  5. Added model_nornir_config pydantic model to run configuration parameters verification prior to starting proxy minion

BUGS

  1. Fixed issue #9 bug with simultaneous files download from master
  2. 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
  3. Fixed nr.cfg runner to honor Fx filters while filtering hosts to configure
  4. 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