Azure / Azure/azure-linux-extensions

AzureDiskEncryptionForLinux Fails with python error

Open
#785 1 comment 1 reaction 0 assignees View on GitHub
extensions/VMEncryption
Dominant language
Python
Stars
333
Forks
278
Avg merge
2d 9h
Merged PRs (30d)
4

Description

We are trying to encrypt our disk and we keep getting this issue.

Ubuntu 16.04.6 LTS

[Microsoft.Azure.Security.AzureDiskEncryptionForLinux-1.0]: 4468: [Error] Failed to update encryption settings with error: coercing to Unicode: need string or buffer, NoneType found, stack trace: Traceback (most recent call last):
2019/04/15 19:40:37 File "main/handle.py", line 313, in update_encryption_settings
2019/04/15 19:40:37 shutil.copy(existing_passphrase_file, encryption_environment.bek_backup_path)
2019/04/15 19:40:37 File "/usr/lib/python2.7/shutil.py", line 119, in copy
2019/04/15 19:40:37 copyfile(src, dst)
2019/04/15 19:40:37 File "/usr/lib/python2.7/shutil.py", line 68, in copyfile
2019/04/15 19:40:37 if _samefile(src, dst):
2019/04/15 19:40:37 File "/usr/lib/python2.7/shutil.py", line 58, in _samefile
2019/04/15 19:40:37 return os.path.samefile(src, dst)
2019/04/15 19:40:37 File "/usr/lib/python2.7/posixpath.py", line 155, in samefile
2019/04/15 19:40:37 s1 = os.stat(f1)
2019/04/15 19:40:37 TypeError: coercing to Unicode: need string

Contributor guide

No contributing guide indexed for this repository

Research direction

Start in main/handle.py at update_encryption_settings, especially the shutil.copy call at line 313, and trace how existing_passphrase_file and bek_backup_path are set. Reproduce the encryption attempt on Ubuntu 16.04.6 with the reported extension version. Done means the update completes without the NoneType path error and encryption settings are successfully updated.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cloud, security
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.