2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Ansible2.1が走りきっても終了しない(未解決)

Posted at

Ansible2.1が終了しなくて悩んだ

最初にansibleでgit clone --mirrorしたくて悩んでたら、git_config moduleが出ていたので、
git モジュールの bare オプション+git_confiでmirror設定追加 を試してみた。
試してみたが、動かなくて確認するとgit_confiモジュールはv2.1からだった、。
早速アップデートするよね。

そしたらgit clone --mirrorはできたけど、なんか終了しない...(下記の状態でプロンプトが帰ってこない)

PLAY RECAP *********************************************************************
10.100.10.253              : ok=21   changed=1    unreachable=0    failed=0

試しにstraceしてみたらずっと変なのでてるよね

$ sudo strace -p 6852
poll([{fd=6, events=POLLIN|POLLPRI}], 1, 0) = 0 (Timeout)
select(0, NULL, NULL, NULL, {0, 100})   = 0 (Timeout)
poll([{fd=6, events=POLLIN|POLLPRI}], 1, 0) = 0 (Timeout)
select(0, NULL, NULL, NULL, {0, 100})   = 0 (Timeout)

ansibleのpromptで ctrl+C するとだらだろエラー

PLAY RECAP *********************************************************************
10.100.10.253              : ok=21   changed=1    unreachable=0    failed=0

Error in atexit._run_exitfuncs:
Traceback (most recent call last):
  File "/usr/lib64/python2.7/atexit.py", line 24, in _run_exitfuncs
    func(*targs, **kargs)
  File "/usr/lib64/python2.7/multiprocessing/util.py", line 325, in _exit_function
    p.join()
  File "/usr/lib64/python2.7/multiprocessing/process.py", line 145, in join
    res = self._popen.wait(timeout)
  File "/usr/lib64/python2.7/multiprocessing/forking.py", line 154, in wait
    return self.poll(0)
  File "/usr/lib64/python2.7/multiprocessing/forking.py", line 135, in poll
    pid, sts = os.waitpid(self.pid, flag)
KeyboardInterrupt
Error in sys.exitfunc:
Traceback (most recent call last):
  File "/usr/lib64/python2.7/atexit.py", line 24, in _run_exitfuncs
    func(*targs, **kargs)
  File "/usr/lib64/python2.7/multiprocessing/util.py", line 325, in _exit_function
    p.join()
  File "/usr/lib64/python2.7/multiprocessing/process.py", line 145, in join
    res = self._popen.wait(timeout)
  File "/usr/lib64/python2.7/multiprocessing/forking.py", line 154, in wait
    return self.poll(0)
  File "/usr/lib64/python2.7/multiprocessing/forking.py", line 135, in poll
    pid, sts = os.waitpid(self.pid, flag)
KeyboardInterrupt

わからん...私には読み解く力なんてありません。
ただふと、ansibleだったか定かではないですが、tmux上で実行すると不具合が起こる的な記事を読んだことを思い出したのでtmuxをデタッチしてから実行してみると...

すんなりと終わった...

PLAY RECAP *********************************************************************
10.100.10.253              : ok=21   changed=1    unreachable=0    failed=0

$

つまり、ansible2.1でプロンプトが帰ってこない人でtmux使ってたなら抜けてみよう!
解決策など何も出してないですが、ご存知の方いらっしゃいましたらコメントなどいただけると幸いです。

ちなみに試してた環境は以下

# amazone linuxです
$ uname -a
Linux ip-10-255-0-194 4.4.8-20.46.amzn1.x86_64 #1 SMP Wed Apr 27 19:28:52 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
$
$ ansible --version
ansible 2.1.0.0
  config file = /home/momin/ansible/ansible.cfg
  configured module search path = Default w/o overrides
$
$ tmux -V
tmux 1.8
2
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?