Skip to content

Commit

Permalink
Fix: Set Item hash of the VM as string and enconding as bytes to be a…
Browse files Browse the repository at this point in the history
…ble to use it on b32encode function.
  • Loading branch information
Andres D. Molins committed Oct 5, 2023
1 parent bb6b9b0 commit f277859
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion vm_supervisor/vm/firecracker/instance.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ def _create_network_file(self) -> bytes:
def _create_metadata_file(self) -> bytes:
"""Creates metadata configuration file for cloud-init tool"""

hostname = base64.b32encode(self.vm_hash).decode().strip("=").lower()
hostname = base64.b32encode(str.encode(self.vm_hash)).decode().strip("=").lower()

metadata = {
"instance-id": f"iid-instance-{self.vm_id}",
Expand Down

0 comments on commit f277859

Please sign in to comment.