Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Creating application pool with win_iis_webapppool on ansible 2.4 isn't working #33178

Closed
EliMutchnik opened this issue Nov 22, 2017 · 9 comments
Labels
affects_2.4 This issue/PR affects Ansible v2.4 bug This issue/PR relates to a bug. module This issue/PR relates to a module. support:community This issue/PR relates to code supported by the Ansible community. windows Windows community

Comments

@EliMutchnik
Copy link

EliMutchnik commented Nov 22, 2017

ISSUE TYPE
  • Bug Report
COMPONENT NAME

win_iis_webapppool

ANSIBLE VERSION

ansible 2.4.0.0

CONFIGURATION

No settings were changed

OS / ENVIRONMENT

CentOS Linux release 7.4.1708 (Core)

SUMMARY

When running iis app pool creating with win_iis_webapppool on ansible 2.4 I'm getting the following error: Failed to stop Web App Pool UPS Traffic: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED).
The app pool is fine when creating is manualy on the IIS.
After trying to fix the issue locally on IIS with microsoft documantation, Iv'e downgraded the ansible to 2.3.2.0 and the same code started working again.

STEPS TO REPRODUCE

Running the next task:

- name: Create {{ server_type }} application pool
  win_iis_webapppool:
    name: "{{ server_type }}"
    state: stopped

EXPECTED RESULTS

The task should create stopped app pool on the IIS.

ACTUAL RESULTS

The error i'm getting:

TASK [upsDeploy : Create App Server application pool] **************************
�[1;30mtask path: /home/jenkins/workspace/UPS-Deploy-New@3/Env_Config_Tools/Commons/DeployCommons/UpsTefCommons/tasks/deploy_common.yml:235�[0m
�[0;36mskipping: [HAIUPSAPP1] => {�[0m
�[0;36m    "changed": false, �[0m
�[0;36m    "skip_reason": "Conditional result was False", �[0m
�[0;36m    "skipped": true�[0m
�[0;36m}�[0m
�[0;34mUsing module file /usr/lib/python2.7/site-packages/ansible/modules/windows/win_iis_webapppool.ps1�[0m
�[0;34m<10.0.213.226> ESTABLISH WINRM CONNECTION FOR USER: DOAdmin on PORT 5986 TO 10.0.213.226�[0m
�[0;34mUsing module file /usr/lib/python2.7/site-packages/ansible/modules/windows/win_iis_webapppool.ps1�[0m
�[0;34m<10.0.213.225> ESTABLISH WINRM CONNECTION FOR USER: DOAdmin on PORT 5986 TO 10.0.213.225�[0m
/usr/lib/python2.7/site-packages/urllib3/connectionpool.py:858: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
  InsecureRequestWarning)
/usr/lib/python2.7/site-packages/urllib3/connectionpool.py:858: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
  InsecureRequestWarning)
�[0;34mEXEC (via pipeline wrapper)�[0m
�[0;34mEXEC (via pipeline wrapper)�[0m
�[0;31mfatal: [HAIUPSTRFC1]: FAILED! => {�[0m
�[0;31m    "attributes": {}, �[0m
�[0;31m    "changed": false, �[0m
�[0;31m    "failed": true, �[0m
�[0;31m    "info": {�[0m
�[0;31m        "attributes": {}, �[0m
�[0;31m        "cpu": {}, �[0m
�[0;31m        "failure": {}, �[0m
�[0;31m        "name": "UPS Traffic", �[0m
�[0;31m        "processModel": {}, �[0m
�[0;31m        "recycling": {�[0m
�[0;31m            "periodicRestart": {}�[0m
�[0;31m        }, �[0m
�[0;31m        "state": "stopped"�[0m
�[0;31m    }, �[0m
�[0;31m    "msg": "Failed to stop Web App Pool UPS Traffic: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))"�[0m
�[0;31m}�[0m
@ansibot
Copy link
Contributor

ansibot commented Nov 22, 2017

Files identified in the description:

If these files are inaccurate, please update the component name section of the description or use the !component bot command.

click here for bot help

@ansibot
Copy link
Contributor

ansibot commented Nov 22, 2017

@ansibot ansibot added affects_2.4 This issue/PR affects Ansible v2.4 bug_report module This issue/PR relates to a module. needs_triage Needs a first human triage before being processed. support:community This issue/PR relates to code supported by the Ansible community. windows Windows community labels Nov 22, 2017
@jborean93 jborean93 removed the needs_triage Needs a first human triage before being processed. label Nov 22, 2017
@jborean93
Copy link
Contributor

Are you able to consistently reproduce this error, I've just reviewed the 2.4 code vs the 2.3 code and while it is different, the basic workflow and cmdlets called are the same. I don't really see how they can be different when it comes to stopping a pool but if you can reproduce it consistently then it may be a start to finding out what is happening.

@EliMutchnik
Copy link
Author

@jborean93 Thanks!
I have tried to run this task couple of times on different IIS hosts and on ansible 2.4 the result was the same.
Please notice that the error occurs when creating app pool (only the state is stopped).
Another thing - the error is about access issues. I guess it's not the ansible credentials access because all the rest does work so seems it's some kind of internal IIS\Windows access stuff.
What do you think guys?

@EliMutchnik
Copy link
Author

Hi Guys! Someone by any chance can assist on this issue?

@jborean93
Copy link
Contributor

Unfortunately this is a really hard one to figure out as the tests seem to work find in our testing suite. If you can find out more information such as if a plain vanilla web app pool works/what options seemt to cause the access is denied would help. I'm sure there was something that changed in the code to break this but unfortunately from looking at it I cannot really seem to see what it is. The way Ansible makes the changes are still using the same cmdlets as before 2.4.

@jborean93
Copy link
Contributor

@EliMutchnik are you able to try the latest devel again, an issue was found with the code and I am hoping it has fixed your issue. The PR for this was here #33777

@ansibot
Copy link
Contributor

ansibot commented Jan 6, 2018

@EliMutchnik
Copy link
Author

Seems to work now. Thanks guys!

@ansibot ansibot added bug This issue/PR relates to a bug. and removed bug_report labels Mar 7, 2018
@ansible ansible locked and limited conversation to collaborators Apr 26, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.4 This issue/PR affects Ansible v2.4 bug This issue/PR relates to a bug. module This issue/PR relates to a module. support:community This issue/PR relates to code supported by the Ansible community. windows Windows community
Projects
None yet
Development

No branches or pull requests

3 participants