Open Alcap opened 4 years ago
can you provide the task and results from the task?
Hi,
Sure. tasks:
The task results:
TASK [Install policy] ****
task path: $HOME/dev/playbooks/install_policy_fortimanager.yaml:6
<1.1.1.1> ESTABLISH HTTP(S) CONNECTFOR USER: user1 TO http://1.1.1.1:80
<1.1.1.1> ESTABLISH LOCAL CONNECTION FOR USER: user2
<1.1.1.1> EXEC /bin/sh -c '( umask 77 && mkdir -p "echo $HOME/.ansible/tmp/ansible-local-35579gp60i3yq
"&& mkdir $HOME/.ansible/tmp/ansible-local-35579gp60i3yq/ansible-tmp-1593816686.63519-35589-225658846582156 && echo ansible-tmp-1593816686.63519-35589-225658846582156="echo $HOME/.ansible/tmp/ansible-local-35579gp60i3yq/ansible-tmp-1593816686.63519-35589-225658846582156
" ) && sleep 0'
Using module file $HOME/dev/fortimanager-ansible/library/fortimgr_install.py
<1.1.1.1> PUT $HOME/.ansible/tmp/ansible-local-35579gp60i3yq/tmp3hkcn08i TO $HOME/.ansible/tmp/ansible-local-35579gp60i3yq/ansible-tmp-1593816686.63519-35589-225658846582156/AnsiballZ_fortimgr_install.py
<1.1.1.1> EXEC /bin/sh -c 'chmod u+x $HOME/.ansible/tmp/ansible-local-35579gp60i3yq/ansible-tmp-1593816686.63519-35589-225658846582156/ $HOME/.ansible/tmp/ansible-local-35579gp60i3yq/ansible-tmp-1593816686.63519-35589-225658846582156/AnsiballZ_fortimgr_install.py && sleep 0'
<1.1.1.1> EXEC /bin/sh -c 'python $HOME/.ansible/tmp/ansible-local-35579gp60i3yq/ansible-tmp-1593816686.63519-35589-225658846582156/AnsiballZ_fortimgr_install.py && sleep 0'
<1.1.1.1> EXEC /bin/sh -c 'rm -f -r $HOME/.ansible/tmp/ansible-local-35579gp60i3yq/ansible-tmp-1593816686.63519-35589-225658846582156/ > /dev/null 2>&1 && sleep 0'
The full traceback is:
Traceback (most recent call last):
File "$HOME/.ansible/tmp/ansible-local-35579gp60i3yq/ansible-tmp-1593816686.63519-35589-225658846582156/AnsiballZ_fortimgr_install.py", line 114, in
fatal: [fortigate]: FAILED! => {
"changed": false,
"module_stderr": "Traceback (most recent call last):\n File \"$HOME/.ansible/tmp/ansible-local-35579gp60i3yq/ansible-tmp-1593816686.63519-35589-225658846582156/AnsiballZ_fortimgr_install.py\", line 114, in
This is just one of the failures that caused the hanging session. I was able to solve this by adding the install_flags option to the play. Some values have been obfuscated.
In fact, I just noticed that this is happening also when it fails to lock the ADOM for editing. I reviewed the code quickly and it should be logging out the user, I'll have to debug further to know what is happening. Can anyone else reproduce this behaviour?
looks like this needs to be caught after line 1589, do you want to put in the PR?
Hi,
Yes, just not sure how long this will take because I'm still new to the module and ansible in general.
Hi,
Just added a pull request for the log out feature when failure to aquire a lock: #86
I know that more actions, when failing, are not logging out the users, so I'll keep an eye on those and keep on submitting pull requests when I find them. I think we should keep this issue open to keep track of the remaining issues.
Please let me know if I did something wrong in this, as this is my first PR on a real project.
Hi,
The last time I ran a playbook and it failed I noticed that the session was left hanging on the fortimanager GUI. The session was idle there for, at least, 10m and then I deleted it manually.
I'm happy to take point in solving this issue, I just wanted to confirm that more people are able to reproduce this. This occurred with the install policy module (fortimgr_install)
Thanks!