linux-system-roles / nbde_client

Ansible role for configuring Network Bound Disk Encryption clients (e.g. clevis)
https://linux-system-roles.github.io/nbde_client/
MIT License
14 stars 24 forks source link

RHELPLAN-68127 - Collections - Nbde_client - fixing ansible-test errors #37

Closed nhosoi closed 3 years ago

nhosoi commented 3 years ago

Notes: 1) pylint blacklisted-name on _ and ansible-format-automatic-specification on {} are to be in the ignore file.

plugins/modules/nbde_client_clevis.py pylint:blacklisted-name
plugins/modules/nbde_client_clevis.py pylint:ansible-format-automatic-specification

2) Unsolved validate-modules errors:

ERROR: Found 8 validate-modules issue(s) which need to be resolved:
ERROR: plugins/modules/nbde_client_clevis.py:0:0: doc-required-mismatch: Argument 'bindings' in argument_spec is not required, but is documented as being required
ERROR: plugins/modules/nbde_client_clevis.py:0:0: missing-gplv3-license: GPLv3 license header not found in the first 20 lines of the module
ERROR: plugins/modules/nbde_client_clevis.py:0:0: module-invalid-version-added: DOCUMENTATION: version_added ('2.9') is not a valid collection version (see specification at https://semver.org/): invalid semantic version '2.9'. Got {'module': 'nbde_client_clevis', 'short_description': 'Handle clevis-related operations on LUKS devices', 'version_added': '2.9', 'description': ['"Module manages clevis bindings on encrypted devices to match the state specified in input parameters.\n'], 'options': {'bindings': {'description': 'a list of dictionaries that describe a binding that should be either added or removed from a given device/slot. It supports the following keys: - >\n  device: the path of the underlying encrypted devic...
ERROR: plugins/modules/nbde_client_clevis.py:0:0: parameter-list-no-elements: Argument 'bindings' in argument_spec defines type as list but elements is not defined
ERROR: plugins/modules/nbde_client_clevis.py:0:0: parameter-type-not-in-doc: Argument 'bindings' in argument_spec defines type as 'list' but documentation doesn't define type
ERROR: plugins/modules/nbde_client_clevis.py:0:0: parameter-type-not-in-doc: Argument 'data_dir' in argument_spec defines type as 'str' but documentation doesn't define type
ERROR: plugins/modules/nbde_client_clevis.py:13:0: import-before-documentation: Import found before documentation variables. All imports must appear below DOCUMENTATION/EXAMPLES/RETURN.
ERROR: plugins/modules/nbde_client_clevis.py:1580:0: last-line-main-call: Call to main() not the last line
See documentation for help: https://docs.ansible.com/ansible/2.10/dev_guide/testing/sanity/validate-modules.html
ERROR: The 1 sanity test(s) listed below (out of 1) failed. See error output above for details.

3) The import sub-test passes with python 3.8, but fails with the other versions due to the pyyaml version mismatch.

nhosoi commented 3 years ago

Cause of the failures, e.g., in https://fedorapeople.org/groups/linuxsystemroles/logs/linux-system-roles-nbde_client-pull-linux-system-roles_nbde_client-37-e490ebb-centos-8-20210304-060726/artifacts/test.log.html. 'msg': 'Command cryptsetup luksAddKey --key-slot 1 --batch-mode --force-password /tmp/.nbde_client_dev_test failed: '

nhosoi commented 3 years ago

[citest bad]

pcahyna commented 3 years ago

@nhosoi do you know why did some of the tests fail?

richm commented 3 years ago

@nhosoi do you know why did some of the tests fail?

I'm pretty sure the failures are fixed by https://github.com/linux-system-roles/nbde_client/pull/38