file exists when running ansible playbook

Bug #1858115 reported by Kevin Carter
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
Fix Released
High
Kevin Carter

Bug Description

When running playbooks in parallel we can run into the following exception.

2019-12-30 16:18:29 | Exception occured while running the command
2019-12-30 16:18:29 | Traceback (most recent call last):
2019-12-30 16:18:29 | File "/usr/lib/python2.7/site-packages/tripleoclient/command.py", line 32, in run
2019-12-30 16:18:29 | super(Command, self).run(parsed_args)
2019-12-30 16:18:29 | File "/usr/lib/python2.7/site-packages/osc_lib/command/command.py", line 41, in run
2019-12-30 16:18:29 | return super(Command, self).run(parsed_args)
2019-12-30 16:18:29 | File "/usr/lib/python2.7/site-packages/cliff/command.py", line 185, in run
2019-12-30 16:18:29 | return_code = self.take_action(parsed_args) or 0
2019-12-30 16:18:29 | File "/usr/lib/python2.7/site-packages/tripleoclient/v1/undercloud.py", line 141, in take_action
2019-12-30 16:18:29 | inflight=inflight)
2019-12-30 16:18:29 | File "/usr/lib/python2.7/site-packages/tripleoclient/v1/undercloud_config.py", line 783, in prepare_undercloud_deploy
2019-12-30 16:18:29 | undercloud_preflight.check(verbose_level, upgrade)
2019-12-30 16:18:29 | File "/usr/lib/python2.7/site-packages/tripleoclient/v1/undercloud_preflight.py", line 493, in check
2019-12-30 16:18:29 | _check_diskspace(upgrade)
2019-12-30 16:18:29 | File "/usr/lib/python2.7/site-packages/tripleoclient/v1/undercloud_preflight.py", line 98, in _check_diskspace
2019-12-30 16:18:29 | **playbook_args
2019-12-30 16:18:29 | File "/usr/lib/python2.7/site-packages/tripleoclient/utils.py", line 514, in run_ansible_playbook
2019-12-30 16:18:29 | status, rc = runner.run()
2019-12-30 16:18:29 | File "/usr/lib/python2.7/site-packages/ansible_runner/runner.py", line 205, in run
2019-12-30 16:18:29 | searchwindowsize=100)
2019-12-30 16:18:29 | File "/usr/lib/python2.7/site-packages/pexpect/spawnbase.py", line 341, in expect
2019-12-30 16:18:29 | timeout, searchwindowsize, async_)
2019-12-30 16:18:29 | File "/usr/lib/python2.7/site-packages/pexpect/spawnbase.py", line 369, in expect_list
2019-12-30 16:18:29 | return exp.expect_loop(timeout)
2019-12-30 16:18:29 | File "/usr/lib/python2.7/site-packages/pexpect/expect.py", line 111, in expect_loop
2019-12-30 16:18:29 | incoming = spawn.read_nonblocking(spawn.maxread, timeout)
2019-12-30 16:18:29 | File "/usr/lib/python2.7/site-packages/pexpect/pty_spawn.py", line 485, in read_nonblocking
2019-12-30 16:18:29 | return super(spawn, self).read_nonblocking(size)
2019-12-30 16:18:29 | File "/usr/lib/python2.7/site-packages/pexpect/spawnbase.py", line 179, in read_nonblocking
2019-12-30 16:18:29 | self._log(s, 'read')
2019-12-30 16:18:29 | File "/usr/lib/python2.7/site-packages/pexpect/spawnbase.py", line 130, in _log
2019-12-30 16:18:29 | second_log.write(s)
2019-12-30 16:18:29 | File "/usr/lib/python2.7/site-packages/ansible_runner/utils.py", line 312, in write
2019-12-30 16:18:29 | self._emit_event(line)
2019-12-30 16:18:29 | File "/usr/lib/python2.7/site-packages/ansible_runner/utils.py", line 349, in _emit_event
2019-12-30 16:18:29 | self._event_callback(event_data)
2019-12-30 16:18:29 | File "/usr/lib/python2.7/site-packages/ansible_runner/runner.py", line 51, in event_callback
2019-12-30 16:18:29 | os.mkdir(job_events_path, 0o700)
2019-12-30 16:18:29 | OSError: [Errno 17] File exists: '/tmp/tripleoSr_qmA/3a0b1bae-0047-433d-9466-b49a7517dbfa/job_events'
2019-12-30 16:18:29 | [Errno 17] File exists: '/tmp/tripleoSr_qmA/3a0b1bae-0047-433d-9466-b49a7517dbfa/job_events'

This issue is being caused by our overloaded output callback plugin, which was introduced in the following change: https://review.opendev.org/#/c/698015

This change should be reverted and reworked.

Changed in tripleo:
assignee: nobody → Kevin Carter (kevin-carter)
status: New → In Progress
Changed in tripleo:
importance: Undecided → High
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-tripleoclient (master)

Reviewed: https://review.opendev.org/700782
Committed: https://git.openstack.org/cgit/openstack/python-tripleoclient/commit/?id=dbfe988265663acaae9d7e1c03ccefd28f01c2a8
Submitter: Zuul
Branch: master

commit dbfe988265663acaae9d7e1c03ccefd28f01c2a8
Author: Kevin Carter (cloudnull) <email address hidden>
Date: Mon Dec 30 17:37:20 2019 +0000

    Revert "Overload stdout callback plugin"

    This reverts commit 49d3f725f2be0681b6e761781372782e2514c869.

    Closes-Bug: #1858115
    Change-Id: I49d560b2634847ea7f8bafefa8e7ee7f9726a193
    Signed-off-by: Kevin Carter <email address hidden>

Changed in tripleo:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/python-tripleoclient 13.1.0

This issue was fixed in the openstack/python-tripleoclient 13.1.0 release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.