Stable branch CI fails when gathering facts - invalid syntax (fake_filesystem.py, line 1195)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
kolla-ansible |
Invalid
|
Undecided
|
Unassigned | ||
Rocky |
Fix Committed
|
Critical
|
Mark Goddard | ||
Stein |
Fix Committed
|
Critical
|
Mark Goddard | ||
Train |
Fix Committed
|
Critical
|
Mark Goddard |
Bug Description
On train and earlier stable branches, CI is failing in the following task:
2020-03-04 12:42:33.898606 | TASK [Record the running state of the environment as seen by the setup module]
2020-03-04 12:42:35.824197 | primary | ERROR! Unexpected Exception, this is probably a bug: invalid syntax (fake_filesyste
2020-03-04 12:42:35.979719 | primary | ERROR
2020-03-04 12:42:35.980054 | primary | {
2020-03-04 12:42:35.980172 | primary | "delta": "0:00:01.671291",
2020-03-04 12:42:35.980299 | primary | "end": "2020-03-04 12:42:35.872841",
2020-03-04 12:42:35.980409 | primary | "msg": "non-zero return code",
2020-03-04 12:42:35.980516 | primary | "rc": 250,
2020-03-04 12:42:35.980642 | primary | "start": "2020-03-04 12:42:34.201550"
2020-03-04 12:42:35.980746 | primary | }
On train this happens on CentOS 7 (not 8) and Debian jobs. These jobs use Ansible 2.6 or earlier, whereas Ubuntu and CentOS 8 use Ansible 2.8 (on train).
The command that is executed during that task is:
ansible all -i {{ kolla_inventory _path }} -e ansible_user={{ ansible_user }} -m setup > /tmp/logs/ ansible/ initial- setup
Essentially, gathering facts.
Reproducing on a CentOS 7 box:
sudo yum -y install python-virtualenv gcc libffi-devel openssl-devel 2.6/bin/ activate ansible- 2.6/lib/ python2. 7/site- packages/ ara/plugins/ callbacks 2.6/bin/ ansible localhost -m setup -e ansible_ python_ interpreter= $(which python) -vvvv
virtualenv ansible-2.6
source ansible-
pip install 'ansible<2.7' 'ara<1.0.0'
cat << EOF > ansible.cfg
[defaults]
callback_plugins = $(pwd)/
EOF
./ansible-
This fails:
ansible 2.6.20 ansible. cfg mark/.ansible/ plugins/ modules' , u'/usr/ share/ansible/ plugins/ modules' ] ansible- 2.6/lib/ python2. 7/site- packages/ ansible ansible- 2.6/bin/ ansible ansible. cfg as config file
config file = /home/mark/
configured module search path = [u'/home/
ansible python module location = /home/mark/
executable location = /home/mark/
python version = 2.7.5 (default, Aug 7 2019, 00:51:29) [GCC 4.8.5 20150623 (Red Hat 4.8.5-39)]
Using /home/mark/
setting up inventory plugins
Parsed /etc/ansible/hosts inventory source with ini plugin
[WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match 'all'
Loading callback plugin minimal of type stdout, v2.0 from /home/mark/ ansible- 2.6/lib/ python2. 7/site- packages/ ansible/ plugins/ callback/ minimal. pyc m.py, line 1195)
ERROR! Unexpected Exception, this is probably a bug: invalid syntax (fake_filesyste
the full traceback was:
Traceback (most recent call last): mark/ansible- 2.6/bin/ ansible" , line 118, in <module> mark/ansible- 2.6/lib/ python2. 7/site- packages/ ansible/ cli/adhoc. py", line 181, in run mark/ansible- 2.6/lib/ python2. 7/site- packages/ ansible/ executor/ task_queue_ manager. py", line 231, in run load_callbacks( ) mark/ansible- 2.6/lib/ python2. 7/site- packages/ ansible/ executor/ task_queue_ manager. py", line 193, in load_callbacks loader. all(class_ only=True) : mark/ansible- 2.6/lib/ python2. 7/site- packages/ ansible/ plugins/ loader. py", line 489, in all module_ source( name, path) mark/ansible- 2.6/lib/ python2. 7/site- packages/ ansible/ plugins/ loader. py", line 357, in _load_module_source source( full_name, path, module_file) mark/ansible- 2.6/lib/ python2. 7/site- packages/ ara/plugins/ callbacks/ log_ara. py", line 29, in <module> mark/ansible- 2.6/lib/ python2. 7/site- packages/ ara/webapp. py", line 39, in <module> mark/ansible- 2.6/lib/ python2. 7/site- packages/ ara/utils. py", line 24, in <module> fake_filesystem as fake_filesystem mark/ansible- 2.6/lib/ python2. 7/site- packages/ pyfakefs/ fake_filesystem .py", line 1195 symlinks= True):
^
File "/home/
exit_code = cli.run()
File "/home/
result = self._tqm.run(play)
File "/home/
self.
File "/home/
for callback_plugin in callback_
File "/home/
module = self._load_
File "/home/
module = imp.load_
File "/home/
from ara.webapp import create_app
File "/home/
from ara.utils import fast_count
File "/home/
import pyfakefs.
File "/home/
def utime(self, path, times=None, *, ns=None, follow_
SyntaxError: invalid syntax
pyfakefs ...