You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The issue is with win_get_url wherein it throws error sporadically on the same scenario on identical cicd VMs. We are utilizing an execution environment to run our playbooks within Ansible Automation Platform. So the info I have provided below came from the configs that are set to build the execution environment.
ISSUE TYPE
Bug Report
COMPONENT NAME
ansible.windows.win_get_url
ANSIBLE VERSION
"ansible_distribution_version": "10.0.14393.0",
COLLECTION VERSION
- name: ansible.windows
version: 1.11.0
CONFIGURATION
OS / ENVIRONMENT
Target OS version is Windows 2019; our cicd server wherein we test our code before promoting it in our main branch.
STEPS TO REPRODUCE
Put a file in Azure blob container, generate sas token and encrypt in ansible-vault, utilize it on your playbook, same error and same location fails sporadically. It cannot be predicted and it is very intermittent. If only we could identify the root cause of it, probably we can put a retry on the ansible task. But the error that we are getting is some kind of a powershell script with a line number error which doesn't exist on our end. It seems like the win_get_url has this particular script and it is failing for a specific condition. Here is the code snippet that is failing sporadically:
- name: Fetch esob_secrets.txt to C:\appl\grafana-alloy-installansible.windows.win_get_url:
url: "{{ blob_container_uri }}/windows/secrets/esob_secrets.txt{{ esob_sas_key }}"dest: C:\appl\grafana-alloy-install\esob_secrets.txtforce: truewhen: not alloy_service_name_stat_result.exists or not old_grafana_service_name_stat_result.existsnotify: Reran_startup_script_windows
Can you share the Ansible version you are running with in your EE? Are you running the win_get_url module in parallel on the same host or this just fails randomly on the host?
we are utilizing the ee-minimal-rhel8:latest image when creating our EE. After checking, it utilizes v2.12
win_get_url module fails randomly on some hosts which we cannot identify the pattern. it is very sporadic
ansible/ansible#80293 was merged into Ansible and is present in 2.13.x and newer. Unfortunately 2.12 doesn't include those changes so I recommended updating the Ansible version to one that includes the newer fixes in the temp dir handling. This should hopefully avoid this error but even if it failed to delete the file it'll warn rather than error now.
SUMMARY
The issue is with win_get_url wherein it throws error sporadically on the same scenario on identical cicd VMs. We are utilizing an execution environment to run our playbooks within Ansible Automation Platform. So the info I have provided below came from the configs that are set to build the execution environment.
ISSUE TYPE
COMPONENT NAME
ansible.windows.win_get_url
ANSIBLE VERSION
COLLECTION VERSION
CONFIGURATION
OS / ENVIRONMENT
Target OS version is Windows 2019; our cicd server wherein we test our code before promoting it in our main branch.
STEPS TO REPRODUCE
Put a file in Azure blob container, generate sas token and encrypt in ansible-vault, utilize it on your playbook, same error and same location fails sporadically. It cannot be predicted and it is very intermittent. If only we could identify the root cause of it, probably we can put a retry on the ansible task. But the error that we are getting is some kind of a powershell script with a line number error which doesn't exist on our end. It seems like the win_get_url has this particular script and it is failing for a specific condition. Here is the code snippet that is failing sporadically:
EXPECTED RESULTS
"msg": "OK",
"status_code": 200,
"checksum_src": "d22893a6c61b28fc9608f333c2b9ebe66ac70fe0",
"checksum_dest": "d22893a6c61b28fc9608f333c2b9ebe66ac70fe0",
ACTUAL RESULTS
{
"exception": "Exception calling "ExitJson" with "0" argument(s): "The directory is not empty.\r\n"\r\nAt line:299 char:1\r\n+ $module.ExitJson()\r\n+ ~~~~~~~~~~~~~~~~~~\r\n + CategoryInfo : NotSpecified: (:) [], ParentContainsErrorRecordException\r\n + FullyQualifiedErrorId : IOException\r\n\r\nScriptStackTrace:\r\nat , : line 299\r\n",
"msg": "Unhandled exception while executing module: Exception calling "ExitJson" with "0" argument(s): "The directory is not empty.\r\n"",
"_ansible_no_log": null,
"changed": false
}
The text was updated successfully, but these errors were encountered: