-
Notifications
You must be signed in to change notification settings - Fork 197
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
Cannot run anymore on Windows #995
Comments
I also did a base64 decode and unzip and I see this code which looks quite strange to run on Windows since fork doesn't exist there: R,W=os.pipe()
r,w=os.pipe()
if os.fork():
os.dup2(0,100)
os.dup2(R,0)
os.dup2(r,101)
os.close(R)
os.close(r)
os.close(W)
os.close(w)
if os.uname()[0]=='Darwin'and os.uname()[2][:2]<'19'and sys.executable=='/usr/bin/python':sys.executable='/usr/bin/python2.7'
if os.uname()[0]=='Darwin'and os.uname()[2][:2]in'2021'and sys.version[:3]=='2.7':os.environ['PYTHON_LAUNCHED_FROM_WRAPPER']='1'
os.environ['ARGV0']=sys.executable
os.execl(sys.executable,sys.executable+'(mitogen:1000@automation-job-96141-7s9zj:35)')
os.write(1,'MITO000\n'.encode())
C=_(os.fdopen(0,'rb').read(17101),'zip')
fp=os.fdopen(W,'wb',0)
fp.write(C)
fp.close()
fp=os.fdopen(w,'wb',0)
fp.write(C)
fp.close()
os.write(1,'MITO001\n'.encode())
os.close(2) For us an option to use normal lineair and forget about mitogen would be nice as well, since installing Python on all Windows server isn't necessarily the plan we would prefer to follow. |
Ansible strategies are designed to determine how to run plays in the playbook, as such it doesn't support assigning a strategy per host (since the whole distinction between linear and free (for example) is how the host actions are interleaved. With that said, you could reduce your playbook to a role and run the role separately against windows and linux with the strategy set appropriately for each. (Or similarly you could reduce the playbook to a list of tasks and include it twice, separately for 2 plays one that runs with windows and another with linux). |
Thanks a lot for explaining! I managed to split the bootstrap and become rules from the main tasks so it can run without mitogen. However our playbooks are often mixed throughout all tasks because often they accomplish the same type of tasks on both OS. I think we have no other option then to use mitogen on Windows as well. There could be 2 options then still:
|
I'm not a mitogen maintainer (just another user), and I don't have any windows systems in our environment, so I can't give you any authoritative answers on these questions. I've had some difficulties on my prefered platform as well (SmartOS, a derivative of Solaris). Although it's a unix system, |
@HOSTED-POWER |
I managed to fix even path issue, but I discovered it's executing a "python script" which isn't compatible with Windows... |
Mitogen has now support for Windows targets, and no plans to add it. |
Hi @moreati! I'm working on using mitogen in our existing Ansible plays, and was expecting to have to work on some logic in our orchestration tool to set the strategy to However, I tried this out earlier and was surprised to see that it worked fine? On both a mix and an entirely Windows based set of targets, everything seems to work as expected. Any idea why this might be? Am I right in thinking that, as mitogen doesn't support |
When we use mitogen with Linux and Windows targets, but on Windows they refuse to run.
Also when we tried to add Python.exe, it simply doesn't work (Windows over SSH with powershell).
Is there any easy way to (silently) skip Windows and use for example normal lineair there? Many of our playbooks are written to support both Linux and Windows at the same time, but it seems impossible to support this now.
The text was updated successfully, but these errors were encountered: