From 39c807b9b3d434c0f2552d3552aea7b236ab12e5 Mon Sep 17 00:00:00 2001 From: James Page Date: Wed, 17 May 2017 10:43:40 +0100 Subject: [PATCH] Pass readonly flag as a string, not a boolean. The LXD API requires that data be passed as strings; pass the readonly flag for config-drive support as a string to ensure it can be parsed by LXD avoiding the following error: json: cannot unmarshal bool into Go value of type string Change-Id: I0c5dbd9cb8b8ea4f43398849f8b4c33305231d54 Closes-Bug: 1691428 (cherry picked from commit 95e1db84bc7c9bb83ca3081d613b013427b7ed56) --- nova/virt/lxd/driver.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nova/virt/lxd/driver.py b/nova/virt/lxd/driver.py index 014f99ad..0a57f2de 100644 --- a/nova/virt/lxd/driver.py +++ b/nova/virt/lxd/driver.py @@ -327,7 +327,7 @@ class LXDDriver(driver.ComputeDriver): 'path': '/config-drive', 'source': configdrive_path, 'type': 'disk', - 'readonly': True, + 'readonly': 'True', } } profile.devices.update(config_drive)