'/opt/vyatta/etc/config/' becomes empty after disabling TPM config encryption. Reproduces with both TPM and no-TPM encryption.
vyos@vyos# commit
_archive_active_config: CRITICAL:mv file to archive failed: mv: cannot move '/tmp/config.boot.4728' to '/opt/vyatta/etc/config/archive/config.boot': No such file or directory
vyos@vyos# save
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/vyos/component_version.py", line 138, in write
write_file(config_file, string)
File "/usr/lib/python3/dist-packages/vyos/utils/file.py", line 78, in write_file
raise e
File "/usr/lib/python3/dist-packages/vyos/utils/file.py", line 67, in write_file
with open(fname, 'w' if not append else 'a') as f:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/opt/vyatta/etc/config/config.boot'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/libexec/vyos/vyos-save-config.py", line 59, in <module>
add_system_version(config_str, write_file)
File "/usr/lib/python3/dist-packages/vyos/component_version.py", line 223, in add_system_version
version_info.write(out_file)
File "/usr/lib/python3/dist-packages/vyos/component_version.py", line 140, in write
raise ValueError(e) from e
ValueError: [Errno 2] No such file or directory: '/opt/vyatta/etc/config/config.boot'Steps to reproduce:
- Enable encryption
encryption enable
- Disable encryption
encryption disable