From 1afadb0f659e9ed803cb440f5f087d434a19b7a9 Mon Sep 17 00:00:00 2001 From: Webster Mudge Date: Tue, 21 May 2024 17:59:23 -0400 Subject: [PATCH] Update to version 4.4.0 (#231) * Add missing poll and delay parameters to first_run * Add str cast for command ID * Update installation instruction for API docs * Update to version 4.4.0 Signed-off-by: Webster Mudge --- docsbuild/antsibull-docs.cfg | 2 +- galaxy.yml | 2 +- plugins/module_utils/cm_utils.py | 2 +- plugins/modules/cluster.py | 4 +++- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/docsbuild/antsibull-docs.cfg b/docsbuild/antsibull-docs.cfg index 3a72f36b..a4adeb2a 100644 --- a/docsbuild/antsibull-docs.cfg +++ b/docsbuild/antsibull-docs.cfg @@ -17,7 +17,7 @@ collection_url = { # The same wildcard rules and formatting rules as for collection_url apply. collection_install = { - * = "ansible-galaxy collection install git+https://github.com/cloudera-labs/{namespace}.{name}.git" + * = "ansible-galaxy collection install {namespace}.{name}" } logging_cfg = { diff --git a/galaxy.yml b/galaxy.yml index 2cac4b4f..bcd5617f 100644 --- a/galaxy.yml +++ b/galaxy.yml @@ -16,7 +16,7 @@ namespace: cloudera name: cluster -version: 4.3.1 +version: 4.4.0 readme: README.md authors: - Webster Mudge @wmudge diff --git a/plugins/module_utils/cm_utils.py b/plugins/module_utils/cm_utils.py index 1ad6b57f..f75273a0 100644 --- a/plugins/module_utils/cm_utils.py +++ b/plugins/module_utils/cm_utils.py @@ -492,7 +492,7 @@ def wait_command(self, command: ApiCommand, polling: int = 10, delay: int = 5): poll_count = 0 while command.active: if poll_count > polling: - self.module.fail_json(msg="Command timeout: " + command.id) + self.module.fail_json(msg="Command timeout: " + str(command.id)) sleep(delay) poll_count += 1 command = CommandsResourceApi(self.api_client).read_command(command.id) diff --git a/plugins/modules/cluster.py b/plugins/modules/cluster.py index 42689d56..2f0eeb0a 100644 --- a/plugins/modules/cluster.py +++ b/plugins/modules/cluster.py @@ -816,7 +816,9 @@ def process(self): # If newly created or created by not yet initialize if not existing or existing.entity_status == "NONE": first_run = self.cluster_api.first_run(cluster_name=self.name) - self.wait_command(first_run) + self.wait_command( + first_run, polling=self.timeout, delay=self.delay + ) # Start the existing and previously initialized cluster else: start = self.cluster_api.start_command(cluster_name=self.name)