diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 1d17458..9214b70 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -153,7 +153,7 @@ - Ignore winrm patching inside plugin virtualenv if already done. - Remove cloudify 6.3 from constraints.txt 3.2.0: - - Some changes to account for external storage. + - Some changes to account for external storage.q 3.2.1: - Re-release with bumped utilities-plugins-sdk. 3.2.2: Rerelease with updated dependencies. @@ -162,4 +162,5 @@ 3.2.5: Handle secure log edge-case with numbers. 3.2.6: Adjust retry log message. 3.2.7: added .drp folder to exclude files from trufflehog -3.2.8: blackduck \ No newline at end of file +3.2.8: blackduck +3.2.9: NE-29645 diff --git a/Makefile b/Makefile index b253eab..2900214 100644 --- a/Makefile +++ b/Makefile @@ -77,4 +77,4 @@ wheels: @pip wheel ${HOME}/${FUSION_COMMON}/ -w /workspace/build/ --find-links /workspace/build @pip wheel ${HOME}/${FUSION_AGENT}/ -w /workspace/build/ --find-links /workspace/build @pip wheel ${HOME}/${FUSION_MANAGER}/mgmtworker -w /workspace/build/ --find-links /workspace/build - @pip wheel ${HOME}/${NATIVEEDGE_SDK} -w /workspace/build/ --find-links /workspace/build \ No newline at end of file + @pip wheel ${HOME}/${NATIVEEDGE_SDK} -w /workspace/build/ --find-links /workspace/build diff --git a/cloudify_ansible/utils.py b/cloudify_ansible/utils.py index a0da453..826ed4d 100644 --- a/cloudify_ansible/utils.py +++ b/cloudify_ansible/utils.py @@ -37,7 +37,7 @@ from ansible.parsing.dataloader import DataLoader from cloudify_rest_client.constants import VisibilityState from cloudify_ansible_sdk._compat import ( - text_type, urlopen, URLError) + text_type, urlopen) from cloudify_common_sdk.utils import ( get_blueprint_dir, get_deployment_dir, @@ -190,7 +190,7 @@ def _get_formatted_version(version): def _get_collections_location(instance): runtime_properties = instance.runtime_properties - if not is_local_venv() and \ + if not is_local_venv() or \ (get_node(ctx).properties.get('galaxy_collections') or runtime_properties.get('galaxy_collections')): return runtime_properties.get(WORKSPACE) @@ -416,12 +416,11 @@ def create_playbook_workspace(ctx): :return: """ instance = get_instance(ctx) - if WORKSPACE not in instance.runtime_properties: + workspace_dir = instance.runtime_properties.get(WORKSPACE) + if not workspace_dir: workspace_dir = mkdtemp(dir=get_node_instance_dir()) os.chmod(workspace_dir, 0o755) instance.runtime_properties[WORKSPACE] = workspace_dir - else: - workspace_dir = instance.runtime_properties.get(WORKSPACE) collections_location = _get_collections_location(instance) ansible_cfg_file = os.path.join(workspace_dir, 'ansible.cfg') with open(ansible_cfg_file, 'w') as f: @@ -1059,13 +1058,15 @@ def create_playbook_venv(_ctx): def is_connected_to_internet(): - try: - urlopen('http://google.com', timeout=5) - ctx.logger.debug("Connected to internet.") - return True - except URLError: - ctx.logger.debug("No Internet connection.") - return False + for n in range(0, 3): + try: + urlopen('http://www.microsoft.com', timeout=5) + ctx.logger.info("Connected to internet.") + return True + except Exception as e: + ctx.logger.debug(f"exception {str(e)}") + ctx.logger.info('No Internet connection.') + return False def process_execution(script_func, script_path, ctx, process=None): diff --git a/requirements.in b/requirements.in index 2faa602..5f48f24 100644 --- a/requirements.in +++ b/requirements.in @@ -2,4 +2,4 @@ -e ${HOME}/fusion-manager/mgmtworker -e ${HOME}/fusion-agent -e ${HOME}/cloudify-utilities-plugins-sdk -cryptography>=42.0.5 \ No newline at end of file +cryptography>=42.0.5 diff --git a/requirements.txt b/requirements.txt index c7f4f4d..8179be2 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,28 +4,10 @@ # # pip-compile --no-emit-index-url --output-file=requirements.txt requirements.in setup.py # -# -e file:///home/circleci/cloudify-utilities-plugins-sdk -# # via -# # -r requirements.in -# # cloudify-ansible-plugin (setup.py) -# -e file:///home/circleci/fusion-agent -# # via -# # -r requirements.in -# # fusion-mgmtworker -# -e file:///home/circleci/fusion-common -# # via -# # -r requirements.in -# # cloudify-ansible-plugin (setup.py) -# # fusion-agent -# # fusion-mgmtworker -# -e file:///home/circleci/fusion-manager/mgmtworker -# # via -r requirements.in adal==1.2.7 # via msrestazure aiohttp==3.9.3 - # via - # cloudify-common - # fusion-common + # via fusion-common aiosignal==1.3.1 # via aiohttp amqp==5.2.0 @@ -56,15 +38,10 @@ bcrypt==4.1.2 billiard==4.2.0 # via celery boto3==1.34.67 +boto3==1.34.55 # via cloudify-utilities-plugins-sdk -botocore==1.34.67 - # via - # boto3 - # s3transfer +botocore==1.34.55 bottle==0.12.25 - # via - # cloudify-common - # fusion-common cachetools==5.3.3 # via google-auth celery==5.3.6 @@ -96,7 +73,6 @@ click-plugins==1.1.1 click-repl==0.3.0 # via celery cloudify-common==7.0.3 - # via cloudify-utilities-plugins-sdk cryptography==42.0.5 # via # -r requirements.in