Maybe use python2 instead of python in python scripts

Bug #1643740 reported by Chao Guo on 2016-11-22
This bug affects 1 person
Affects Status Importance Assigned to Milestone

Bug Description

Kolla python scripts no working,when /usr/bin/python is a symlink to python3 in the system, maybe it should use /usr/bin/env python2 to specify python version.

Paul Bourke (pauldbourke) wrote :

A better fix would be to make them py3 compatible. I thought this was the case, so can you please let us know which parts are causing problems with python3 and we can address those.

Changed in kolla:
status: New → Incomplete
importance: Undecided → Medium
Chao Guo (jimmygc) wrote :

kolla-ansible pull command stopped on "TASK [common : Pulling kolla-toolbox image]"

TASK [common : Pulling kolla-toolbox image] ************************************
fatal: [localhost]: FAILED! => {"changed": true, "failed": true, "msg": "'Traceback (most recent call last):\\n File \"/tmp/ansible_ojjsdkxn/\", line 742, in main\\n result = bool(getattr(dw, module.params.get(\\'action\\'))())\\n File \"/tmp/ansible_ojjsdkxn/\", line 430, in pull_image\\n repository=image, tag=tag, stream=True\\n File \"/tmp/ansible_ojjsdkxn/\", line 429, in <listcomp>\\n json.loads(line.strip()) for line in self.dc.pull(\\n File \"/usr/lib/python3.5/json/\", line 312, in loads\\n s.__class__.__name__))\\nTypeError: the JSON object must be str, not \\'bytes\\'\\n'"}

Paul Bourke (pauldbourke) wrote :

Hi can you try this patch and see if it works for you?

Changed in kolla:
status: Incomplete → Confirmed
Changed in kolla:
milestone: none → ocata-3

This issue was fixed in the openstack/kolla-ansible development milestone.

This is an automated cleanup. This bug report has been closed because it
is older than 18 months and there is no open code change to fix this.
After this time it is unlikely that the circumstances which lead to
the observed issue can be reproduced.

If you can reproduce the bug, please:
* reopen the bug report (set to status "New")
* AND add the detailed steps to reproduce the issue (if applicable)
* AND leave a comment "CONFIRMED FOR: <RELEASE_NAME>"
  Only still supported release names are valid (OCATA, PIKE, QUEENS, ROCKY, ROCKY).
  Valid example: CONFIRMED FOR: OCATA

Changed in kolla:
importance: Medium → Undecided
status: Confirmed → Expired
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers