Hosts With pf9-glance Role Failing To Converge With Error "inconsistent use of tabs and spaces in indentation
Problem
Hosts with pf9-glance role fail to converge. The following error is observed in the glance-api.log:
ERROR stevedore.extension [-] Could not load 'cinder': inconsistent use of tabs and spaces in indentation (rbd.py, line 704): File "/opt/pf9/glance/lib/python3.6/site-packages/rbd.py", line 704Environment
Platform9 Managed OpenStack - v5.0 and below
Ceph
Glance
Cause
Use of tabs and spaces for indentation in the rbd.py file.
Resolution
Add the following environment variables on the Glance host.
LD_LIBRARY_PATH="/opt/pf9/python/pf9-lib:$LD_LIBRARY_PATH"LD_LIBRARY_PATH="/opt/pf9/glance/lib:${LD_LIBRARY_PATH}"export LD_LIBRARY_PATHPYTHONPATH="/opt/pf9/python/lib/python3.6:${PYTHONPATH}"PYTHONPATH="/opt/pf9/glance/lib/python3.6/site-packages:${PYTHONPATH}"export PYTHONPATH2. Install autopep8 using pip.
~$ /opt/pf9/glance/bin/python /opt/pf9/glance/bin/pip install autopep8==1.5.13. Correct the formatting issues by running the following command.
4. Restart the pf9-glance-api service.
Last updated
