You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by de...@apache.org on 2014/01/17 14:45:39 UTC
git commit: updated refs/heads/4.3 to eb6bed8
Updated Branches:
refs/heads/4.3 1bf610d0c -> eb6bed803
CLOUDSTACK-5894: A template created from a volume on hyper-v became unusable after
the management server was restarted. The template.properties file created for the
template has the format field in upper-case. This caused the template service to
not to recognise the format and it removed the entry from the template_store_ref
table in db. Fixed the format field in the templatee.properties.
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/eb6bed80
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/eb6bed80
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/eb6bed80
Branch: refs/heads/4.3
Commit: eb6bed80376b48244b48f7cb6fff46e5d1866c1e
Parents: 1bf610d
Author: Devdeep Singh <de...@gmail.com>
Authored: Sat Jan 18 00:50:22 2014 +0530
Committer: Devdeep Singh <de...@gmail.com>
Committed: Fri Jan 17 19:12:59 2014 +0530
----------------------------------------------------------------------
.../ServerResource/HypervResource/HypervResourceController.cs | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/eb6bed80/plugins/hypervisors/hyperv/DotNet/ServerResource/HypervResource/HypervResourceController.cs
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/hyperv/DotNet/ServerResource/HypervResource/HypervResourceController.cs b/plugins/hypervisors/hyperv/DotNet/ServerResource/HypervResource/HypervResourceController.cs
index 62eebda..f39cc97 100644
--- a/plugins/hypervisors/hyperv/DotNet/ServerResource/HypervResource/HypervResourceController.cs
+++ b/plugins/hypervisors/hyperv/DotNet/ServerResource/HypervResource/HypervResourceController.cs
@@ -1590,6 +1590,11 @@ namespace HypervResource
string templatePropFile = Path.Combine(path, "template.properties");
using (StreamWriter sw = new StreamWriter(File.Open(templatePropFile, FileMode.Create), Encoding.GetEncoding("iso-8859-1")))
{
+ if (format != null)
+ {
+ format = format.ToLower();
+ }
+
sw.NewLine = "\n";
sw.WriteLine("id=" + templateId);
sw.WriteLine("filename=" + templateUuid + "." + format);
@@ -1599,7 +1604,7 @@ namespace HypervResource
sw.WriteLine("virtualsize=" + virtualSize);
sw.WriteLine(format + ".virtualsize=" + virtualSize);
sw.WriteLine("size=" + physicalSize);
- sw.WriteLine("vhd.size=" + physicalSize);
+ sw.WriteLine(format + ".size=" + physicalSize);
sw.WriteLine("public=false");
}
}