Hi,
First post here so sorry if I miss any information etc.
We're upgrading our estate across the board and one of the major projects I'm doing is updating MongoDB using Ops Manager, I have reached the stage where I need to upgrade 16.04 to 18.04 and then to 20.04 but after running 'apt update' and then 'apt upgrade' as root they both complete but upgrade fires out one final error:
Errors were encountered while processing:
cloud-init
E: Sub-process /usr/bin/dpkg returned an error code (1)
I've tried this on two 16.04 machines built using the same ansible script (after upgrading them from MongoDB 3.6 manually and then to 4.4 using Ops Manager) and now whenever I try to attempt any upgrade, I just get cloud-init errors thrown at me that seem to relate to python3:
SyntaxError: invalid syntax
File "/usr/lib/python3/dist-packages/cloudinit/url_helper.py", line 638
loop_n: int = 0
^
SyntaxError: invalid syntax
File "/usr/lib/python3/dist-packages/cloudinit/util.py", line 408
sys.stdout.write(f"{console_error}\n")
^
SyntaxError: invalid syntax
Theres about 400 lines of these so won't past them all but you can get the gist.
'Python' is set to 2.7.12
'Python3' is set to 3.5.2
Any help would be greatly appreciated here as I'm pulling hair out!
Bookmarks