While attempting to debug errors on cloud-init on ppc64el, I noticed what I believe is a bug.
[ Help ] -> [Enter shell]
Enters a shell that a user will likely want to use for debugging. However, netplan (and I suspect other python-based tools as well) are broken:
root@ubuntu-server:/# netplan try
Traceback (most recent call last):
File "/usr/sbin/netplan", line 23, in <module>
netplan.main()
File "/usr/share/netplan/netplan/cli/core.py", line 50, in main
self.run_command()
File "/usr/share/netplan/netplan/cli/utils.py", line 247, in run_command
self.func()
File "/usr/share/netplan/netplan/cli/commands/try_command.py", line 81, in run
self.run_command()
File "/usr/share/netplan/netplan/cli/utils.py", line 247, in run_command
self.func()
File "/usr/share/netplan/netplan/cli/commands/try_command.py", line 84, in command_try
if not self.is_revertable():
File "/usr/share/netplan/netplan/cli/commands/try_command.py", line 169, in is_revertable
self.config_manager.parse(extra_config=extra_config)
File "/usr/share/netplan/netplan/configmanager.py", line 175, in parse
self._merge_yaml_config(yaml_file)
File "/usr/share/netplan/netplan/configmanager.py", line 290, in _merge_yaml_config
yaml_data = yaml.load(f, Loader=yaml.CSafeLoader)
AttributeError: module 'yaml' has no attribute 'CSafeLoader'. Did you mean: 'SafeLoader'?
root@ubuntu-server:/# python3
imPython 3.8.10 (default, Mar 15 2022, 12:22:08)
[GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import yaml
>>> yaml.__version__
'5.3.1'
>>> quit()
root@ubuntu-server:/# cat /etc/os-release
PRETTY_NAME="Ubuntu 22.04 LTS"
Overriding the settings allowed me to `netplan apply` and carry on as expected, but I don't think we want users to have to debug unexpected environment variables when they are trying to troubleshoot the system.
While attempting to debug errors on cloud-init on ppc64el, I noticed what I believe is a bug.
[ Help ] -> [Enter shell]
Enters a shell that a user will likely want to use for debugging. However, netplan (and I suspect other python-based tools as well) are broken:
root@ubuntu- server: /# netplan try netplan" , line 23, in <module> netplan/ netplan/ cli/core. py", line 50, in main run_command( ) netplan/ netplan/ cli/utils. py", line 247, in run_command netplan/ netplan/ cli/commands/ try_command. py", line 81, in run run_command( ) netplan/ netplan/ cli/utils. py", line 247, in run_command netplan/ netplan/ cli/commands/ try_command. py", line 84, in command_try revertable( ): netplan/ netplan/ cli/commands/ try_command. py", line 169, in is_revertable config_ manager. parse(extra_ config= extra_config) netplan/ netplan/ configmanager. py", line 175, in parse _merge_ yaml_config( yaml_file) netplan/ netplan/ configmanager. py", line 290, in _merge_yaml_config yaml.CSafeLoade r) server: /# python3 server: /# cat /etc/os-release
Traceback (most recent call last):
File "/usr/sbin/
netplan.main()
File "/usr/share/
self.
File "/usr/share/
self.func()
File "/usr/share/
self.
File "/usr/share/
self.func()
File "/usr/share/
if not self.is_
File "/usr/share/
self.
File "/usr/share/
self.
File "/usr/share/
yaml_data = yaml.load(f, Loader=
AttributeError: module 'yaml' has no attribute 'CSafeLoader'. Did you mean: 'SafeLoader'?
root@ubuntu-
imPython 3.8.10 (default, Mar 15 2022, 12:22:08)
[GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import yaml
>>> yaml.__version__
'5.3.1'
>>> quit()
root@ubuntu-
PRETTY_NAME="Ubuntu 22.04 LTS"
I believe this is caused by the PATH:
root@ubuntu- server: /# echo $PATH /3361/bin: /snap/subiquity /3361/usr/ bin:/usr/ local/sbin: /usr/local/ bin:/usr/ sbin:/usr/ bin:/sbin: /bin:/snap/ bin server: /# echo $PYTHONPATH /3361/lib/ python3. 8/site- packages
/snap/subiquity
root@ubuntu-
/snap/subiquity
Overriding the settings allowed me to `netplan apply` and carry on as expected, but I don't think we want users to have to debug unexpected environment variables when they are trying to troubleshoot the system.