Thanks for verification, the patch has been merged BTW.

---
Lingxian Kong
Senior Cloud Engineer (Catalyst Cloud)
Trove PTL (OpenStack)
OpenStack Cloud Provider Co-Lead (Kubernetes)


On Wed, Jan 27, 2021 at 7:43 PM Ammad Syed <syedammad83@gmail.com> wrote:
Hi Lingxian,

I have done changes with your provided workaround. 

https://review.opendev.org/plugins/gitiles/openstack/trove/+/1e04b269ca75067e28ae3e6ecb60ac2d11ab5b3b%5E%21/#F1 

It worked and image creation became successful.

On Wed, Jan 27, 2021 at 3:22 AM Lingxian Kong <anlin.kong@gmail.com> wrote:
Hi, 

I can reproduce the issue. From the log, apparently it's because pip 21 dropped python 2 support recently.

I am working on this hopefully could fix ASAP.

---
Lingxian Kong
Senior Cloud Engineer (Catalyst Cloud)
Trove PTL (OpenStack)
OpenStack Cloud Provider Co-Lead (Kubernetes)


On Wed, Jan 27, 2021 at 2:40 AM Ammad Syed <syedammad83@gmail.com> wrote:
Hi,

I am creating a trove image with default parameters. 

 
./trovestack build-image ubuntu bionic true ubuntu
  

I am having below error . Please advise.

2021-01-26 13:19:24.905 | Installing collected packages: wheel, setuptools, pip
2021-01-26 13:19:25.292 |   Attempting uninstall: pip
2021-01-26 13:19:25.293 |     Found existing installation: pip 9.0.1
2021-01-26 13:19:25.294 |     Uninstalling pip-9.0.1:
2021-01-26 13:19:25.309 |       Successfully uninstalled pip-9.0.1
2021-01-26 13:19:26.231 | Successfully installed pip-21.0 setuptools-52.0.0 wheel-0.36.2
2021-01-26 13:19:26.761 | + python2 /tmp/get-pip.py -U --force-reinstall
2021-01-26 13:19:27.367 | Traceback (most recent call last):
2021-01-26 13:19:27.367 |   File "/tmp/get-pip.py", line 24226, in <module>
2021-01-26 13:19:27.371 |     main()
2021-01-26 13:19:27.371 |   File "/tmp/get-pip.py", line 199, in main
2021-01-26 13:19:27.372 |     bootstrap(tmpdir=tmpdir)
2021-01-26 13:19:27.372 |   File "/tmp/get-pip.py", line 82, in bootstrap
2021-01-26 13:19:27.372 |     from pip._internal.cli.main import main as pip_entry_point
2021-01-26 13:19:27.372 |   File "/tmp/tmpxnphbN/pip.zip/pip/_internal/cli/main.py", line 60
2021-01-26 13:19:27.372 |     sys.stderr.write(f"ERROR: {exc}")
2021-01-26 13:19:27.372 |                                    ^
2021-01-26 13:19:27.372 | SyntaxError: invalid syntax
2021-01-26 13:19:27.396 | ++ /usr/lib/python3/dist-packages/diskimage_builder/lib/img-functions:run_in_target:59 :   check_break after-error run_in_target bash
2021-01-26 13:19:27.409 | ++ /usr/lib/python3/dist-packages/diskimage_builder/lib/common-functions:check_break:143 :   echo ''
2021-01-26 13:19:27.410 | ++ /usr/lib/python3/dist-packages/diskimage_builder/lib/common-functions:check_break:143 :   egrep -e '(,|^)after-error(,|$)' -q
2021-01-26 13:19:27.428 | + /usr/lib/python3/dist-packages/diskimage_builder/lib/img-functions:run_in_target:1 :   trap_cleanup
2021-01-26 13:19:27.439 | + /usr/lib/python3/dist-packages/diskimage_builder/lib/img-functions:trap_cleanup:36 :   exitval=1
2021-01-26 13:19:27.447 | + /usr/lib/python3/dist-packages/diskimage_builder/lib/img-functions:trap_cleanup:37 :   cleanup
2021-01-26 13:19:27.457 | + /usr/lib/python3/dist-packages/diskimage_builder/lib/img-functions:cleanup:42    :   unmount_image

--
Regards,


Syed Ammad Ali


--
Regards,


Syed Ammad Ali