<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body dir="auto">
<div>I agree, users should have a mechanism to keep logs around.</div>
<div><br>
</div>
<div>I implemented the logs deletion feature after we got a bunch of requests from users to delete logs once they delete an app, so they don't get charged for storage once the app is deleted.</div>
<div><br>
</div>
<div>My implementation deletes the logs by default and I think that is the right behavior. Based on user requests, that is exactly what they were asking for. I'm planning to add a --keep-logs flag in a follow up patch. The command will look as follows</div>
<div><br>
</div>
<div>Solum delete app MyApp --keep-logs</div>
<div><br>
</div>
<div>-Murali</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
<div><br>
</div>
</div>
<div><br>
On Jun 15, 2015, at 11:19 PM, Keith Bray <<a href="mailto:keith.bray@RACKSPACE.COM">keith.bray@RACKSPACE.COM</a>> wrote:<br>
<br>
</div>
<blockquote type="cite">
<div>
<div>Regardless of what the API defaults to, could we have the CLI prompt/warn so that the user easily knows that both options exist?  Is there a precedent within OpenStack for a similar situation?</div>
<div><br>
</div>
<div>E.g. </div>
<div>> solum app delete MyApp</div>
<div>         Do you want to also delete your logs? (default is Yes):  [YES/no]</div>
<div>              NOTE, if you choose No, application logs will remain on your account. Depending on your service provider, you may incur on-going storage charges.  </div>
<div><br>
</div>
<div>Thanks,</div>
<div>-Keith</div>
<div><br>
</div>
<span id="OLK_SRC_BODY_SECTION">
<div style="font-family:Calibri; font-size:11pt; text-align:left; color:black; BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BORDER-TOP: #b5c4df 1pt solid; BORDER-RIGHT: medium none; PADDING-TOP: 3pt">
<span style="font-weight:bold">From: </span>Devdatta Kulkarni <<a href="mailto:devdatta.kulkarni@RACKSPACE.COM">devdatta.kulkarni@RACKSPACE.COM</a>><br>
<span style="font-weight:bold">Reply-To: </span>"OpenStack Development Mailing List (not for usage questions)" <<a href="mailto:openstack-dev@lists.openstack.org">openstack-dev@lists.openstack.org</a>><br>
<span style="font-weight:bold">Date: </span>Monday, June 15, 2015 9:56 AM<br>
<span style="font-weight:bold">To: </span>"OpenStack Development Mailing List (not for usage questions)" <<a href="mailto:openstack-dev@lists.openstack.org">openstack-dev@lists.openstack.org</a>><br>
<span style="font-weight:bold">Subject: </span>Re: [openstack-dev] [Solum] Should logs be deleted when we delete an app?<br>
</div>
<div><br>
</div>
<blockquote id="MAC_OUTLOOK_ATTRIBUTION_BLOCKQUOTE" style="BORDER-LEFT: #b5c4df 5 solid; PADDING:0 0 0 5; MARGIN:0 0 0 5;">
<div>
<div dir="ltr" style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
<p>Yes, the log deletion should be optional. </p>
<p><br>
The question is what should be the default behavior. Should the default be to delete the logs and provide a flag to keep them, or keep the logs by default and provide a override flag to delete them?<br>
<br>
Delete-by-default is consistent with the view that when an app is deleted, all its artifacts are deleted (the app's meta data, the deployment units (DUs), and the logs). This behavior is also useful in our current state when the app resource and the CLI are
 in flux. For now, without a way to specify a flag, either to delete the logs or to keep them, delete-by-default behavior helps us clean all the log files from the application's cloud files container when an app is deleted.
</p>
<p>This is very useful for our CI jobs. Without this, we end up with lots of log files in the application's container,</p>
<p>and have to resort to separate scripts to delete them up after an app is deleted.</p>
<p><br>
</p>
<p>Once the app resource and CLI stabilize it should be straightforward to change the default behavior if required.<br>
</p>
<p><br>
</p>
<p>- Devdatta<br>
</p>
<p><br>
</p>
<div style="word-wrap:break-word">
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font style="font-size:11pt" face="Calibri,sans-serif" color="#000000"><b>From:</b> Adrian Otto <<a href="mailto:adrian.otto@rackspace.com">adrian.otto@rackspace.com</a>><br>
<b>Sent:</b> Friday, June 12, 2015 6:54 PM<br>
<b>To:</b> OpenStack Development Mailing List (not for usage questions)<br>
<b>Subject:</b> [openstack-dev] [Solum] Should logs be deleted when we delete an app?</font>
<div> </div>
</div>
<div>Team,
<div class=""><br class="">
</div>
<div class="">We currently delete logs for an app when we delete the app[1]. </div>
<div class=""><br class="">
</div>
<div class=""><a href="https://bugs.launchpad.net/solum/+bug/1463986" class="">https://bugs.launchpad.net/solum/+bug/1463986</a></div>
<div class=""><br class="">
</div>
<div class="">Perhaps there should be an optional setting at the tenant level that determines whether your logs are deleted or not by default (set to off initially), and an optional parameter to our DELETE calls that allows for the opposite action from the
 default to be specified if the user wants to override it at the time of the deletion. Thoughts?</div>
<div class=""><br class="">
</div>
<div class="">Thanks,</div>
<div class=""><br class="">
</div>
<div class="">Adrian</div>
</div>
</div>
</div>
</div>
</blockquote>
</span></div>
</blockquote>
<blockquote type="cite">
<div><span>__________________________________________________________________________</span><br>
<span>OpenStack Development Mailing List (not for usage questions)</span><br>
<span>Unsubscribe: <a href="mailto:OpenStack-dev-request@lists.openstack.org">OpenStack-dev-request@lists.openstack.org</a>?subject:unsubscribe</span><br>
<span><a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a></span><br>
</div>
</blockquote>
</body>
</html>