[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-5997?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14231230#comment-14231230
 ] 

ASF subversion and git services commented on CLOUDSTACK-5997:
-------------------------------------------------------------

Commit e5761cc85fb257867c52e00502d0110be214702e in cloudstack's branch 
refs/heads/4.3 from [~nitinme]
[ https://git-wip-us.apache.org/repos/asf?p=cloudstack.git;h=e5761cc ]

CLOUDSTACK-5997: Template state changes side affects

(cherry picked from commit 0e2e6995b7ae92c253c1fcea0d7e3fb93689f827)
Signed-off-by: Rohit Yadav <[email protected]>

Conflicts:
        engine/schema/src/com/cloud/storage/dao/VMTemplateDaoImpl.java
        server/src/com/cloud/template/HypervisorTemplateAdapter.java

This makes setup/db/db/schema-421to430.sql same as in master branch. The
change is table view related and does not affect db at all. Making it same
as the version on master for sanity purposes.


> Template state changes side affects
> -----------------------------------
>
>                 Key: CLOUDSTACK-5997
>                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-5997
>             Project: CloudStack
>          Issue Type: Bug
>      Security Level: Public(Anyone can view this level - this is the 
> default.) 
>    Affects Versions: 4.3.0
>            Reporter: Nitin Mehta
>            Assignee: Nitin Mehta
>             Fix For: 4.4.0
>
>
> Template state change functionality.
> A state has been introduced for vm_template. It reflects the user action for 
> making template active/inactive for further use. 
> When the template is marked inactive it becomes unusable for the entire 
> cloud. 
> If the user wants to make it as inactive for a particular zone, 
> template_zone_ref would be accordingly reflected.
> Admin listing should still be able to see the inactive templates.
> The intent of the removed flag is to capture the system state meaning whether 
> it has been physically removed from the cloud. 
> The garbage collection thread checks the inactive state of the template and 
> deletes it physically from sec. storage when no vm is referencing this 
> template anymore. It also deletes it from PS.
> This is when the removed flag is set in the vm_template table. At the moment 
> this functionality doesn't exist in CS so the removed flag is never set as of 
> now.
> Things that need to be fixed
> Deleting the template by user for a particular zone should mark the removed 
> flag in template zone ref only. It should mark the template as inactive if 
> its there is no other zone carrying it.
> Deleting the template without any zone should mark it as inactive right away. 
> Removed flag is not set and there shouldn't be any code setting it at the 
> moment (Delete template shouldn't mark the removed flag.)
> Start showing the state in the api. Regular users should see only active 
> templates but admins should be able to see active/inactive templates
> Template Sync. Should start using active/inactive state than the removed flag.
> Show removed functionality introduced for CPBM would be fixed automatically 
> when admin sees the inactive state - 
> Any template code referencing the removed flag from vm_template should use 
> the active/inactive flag.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to