diff --git a/CHANGELOG.md b/CHANGELOG.md index cd4913b6..16937f3a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## Unreleased +## [2.6.2] - 08-14-2023 +### Fixed +Fixed HSM query handling to prevent errors from querying with an empty list nodes. + ## [2.6.1] - 08-10-2023 ### Fixed Fixed database key migration when upgrading from newer versions of BOS. diff --git a/src/bos/operators/session_setup.py b/src/bos/operators/session_setup.py index a60f5f3b..c3fd5aa9 100644 --- a/src/bos/operators/session_setup.py +++ b/src/bos/operators/session_setup.py @@ -181,7 +181,7 @@ def _apply_arch(self, nodes, arch): """ valid_archs = set([arch]) if arch == 'X86': - valid_archs.add('Unknown') + valid_archs.add('UNKNOWN') hsm_filter = HSMState(enabled=True) return set(hsm_filter.filter_by_arch(nodes, valid_archs)) diff --git a/src/bos/operators/utils/clients/hsm.py b/src/bos/operators/utils/clients/hsm.py index 3439f186..d8815855 100644 --- a/src/bos/operators/utils/clients/hsm.py +++ b/src/bos/operators/utils/clients/hsm.py @@ -80,6 +80,8 @@ def read_all_node_xnames(): def get_components(node_list, enabled=None): """Get information for all list components HSM""" + if not node_list: + return [] session = requests_retry_session() try: payload = {'ComponentIDs': node_list}