I'm dealing with an old OpsWorks stack (Chef 11.10) that has been running for years. A few days ago autoscaling had to start up new instances but it couldn't.
The error indicates the pip version may be the issue. The stack has 'python2.7' and 'python-pip' in its "OS Packages" but this error comes up:
Mixlib::ShellOut::ShellCommandFailed
------------------------------------
Expected process to exit with [0], but received '1'
---- Begin output of pip install --upgrade setuptools ----
STDOUT:
STDERR: Traceback (most recent call last):
File "/usr/local/bin/pip", line 9, in <module>
load_entry_point('pip==21.0.1', 'console_scripts', 'pip')()
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 351, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2363, in load_entry_point
return ep.load()
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2088, in load
entry = __import__(self.module_name, globals(),globals(), ['__name__'])
File "/usr/local/lib/python2.7/dist-packages/pip/_internal/cli/main.py", line 60
sys.stderr.write(f"ERROR: {exc}")
^
SyntaxError: invalid syntax
---- End output of pip install --upgrade setuptools ----
Ran pip install --upgrade setuptools returned 1
The pip version being used is version 21.0.1 but as I understand it that version no longer supports Python 2.7. I need to force pin the version of pip to 20.3.4 but haven't had luck figuring out how to do that.
Is this something I can set in the Custom JSON? Do I need to overwrite the built-in dependency attributes?