[
https://issues.apache.org/jira/browse/CLOUDSTACK-10032?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16148583#comment-16148583
]
ASF subversion and git services commented on CLOUDSTACK-10032:
--------------------------------------------------------------
Commit bf35aefe0fa7628f813863d2e288310c899adab1 in cloudstack's branch
refs/heads/master from niteshsarda
[ https://gitbox.apache.org/repos/asf?p=cloudstack.git;h=bf35aef ]
CLOUDSTACK-10032 : Database entries for templates created from snapshots
disappear after management-server service restart (#2224)
This issue occurs only with KVM hypervisor. Database entries for templates
created from snapshots disappear after management-server service restart
# STEPS TO REPRODUCE
Create a ACS setup and add KVM hypervisor as host.
Create snapshot of any disk (root or data disk) of an instance.
Create template using disk snapshot.
Verify that template got downloaded completely and is in Ready state.
Also, verify that entry for this template is present in template_store_ref
table in database.
Now restart management server.
Once management server is restarted completely and web UI is available, check
the template status. It will be in Active state instead of downloaded.
Also, entry for this template vanishes from template_store_ref table in
database.
# Fix for the Issue
In NfsSecondaryStorageResource.java class, inside method
copySnapshotToTemplateFromNfsToNfs() bufferwriter which was created for writing
data in template.properties file is not closed and hence few properties were
not getting written in template.properties. As few properties were absent in
template.properties file, so after management server restart, this template is
not loaded and hence it goes into Active state.
> Database entries for templates created from snapshots disappear after
> management-server service restart
> -------------------------------------------------------------------------------------------------------
>
> Key: CLOUDSTACK-10032
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-10032
> Project: CloudStack
> Issue Type: Bug
> Security Level: Public(Anyone can view this level - this is the
> default.)
> Reporter: Nitesh Sarda
>
> ISSUE
> ============
> *This issue occurs only with KVM hypervisor*. Database entries for templates
> created from snapshots disappear after management-server service restart
> STEPS TO REPRODUCE
> ==================
> # Create a ACP setup and add KVM hypervisor as host.
> # Create snapshot of any disk (root or data disk) of an instance.
> # Create template using disk snapshot.
> # Verify that template got downloaded completely and is in Ready state.
> # Also, verify that entry for this template is present in template_store_ref
> table in database.
> # Now restart management server.
> # Once management server is restarted completely and web UI is available,
> check the template status. It will be in Active state instead of downloaded.
> # Also, entry for this template vanishes from template_store_ref table in
> database.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)