<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
<br class="">
<div>
<blockquote type="cite" class="">
<div class="">On Jun 15, 2015, at 9:10 PM, Keith Bray <<a href="mailto:keith.bray@RACKSPACE.COM" class="">keith.bray@RACKSPACE.COM</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; font-size: 14px; font-family: Calibri, sans-serif;" class="">
<div class="">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 class=""><br class="">
</div>
<div class="">E.g. </div>
<div class="">> solum app delete MyApp</div>
<div class="">         Do you want to also delete your logs? (default is Yes):  [YES/no]</div>
<div class="">              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>
</div>
</blockquote>
<div><br class="">
</div>
Interactive choices like that one can make it more confusing for developers who want to script with the CLI. My preference would be to label the app delete help text to clearly indicate that it deletes logs. Today the help text is:</div>
<div><br class="">
</div>
<div>
<div>    solum app delete <NAME|UUID></div>
<div>        Delete an application and all related artifacts.</div>
<div><br class="">
</div>
<div>Initial alternative:</div>
<div><br class="">
</div>
<div>    solum app delete <NAME|UUID></div>
<div>        Delete an application and all related artifacts, including logs.</div>
<div><br class="">
</div>
<div>We could add the --keep-logs option Murali mentioned and say this instead:</div>
<div><br class="">
</div>
<div>
<div>    solum app delete [--keep-logs] <NAME|UUID></div>
<div>        Delete an application and all related artifacts. Logs are kept if --keep-logs is used.</div>
<div><br class="">
</div>
<div>This should conform to the principle of least surprise, allow for keeping logs around for those who want them, and not interfere with those wanting to script with the CLI.</div>
<div><br class="">
</div>
<div>Cheers,</div>
<div><br class="">
</div>
<div>Adrian</div>
<div><br class="">
</div>
</div>
<blockquote type="cite" class="">
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; font-size: 14px; font-family: Calibri, sans-serif;" class="">
<div class="">Thanks,</div>
<div class="">-Keith</div>
<div class=""><br class="">
</div>
<span id="OLK_SRC_BODY_SECTION" class="">
<div style="font-family: Calibri; font-size: 11pt; text-align: left; border-width: 1pt medium medium; border-style: solid none none; padding: 3pt 0in 0in; border-top-color: rgb(181, 196, 223);" class="">
<span style="font-weight:bold" class="">From: </span>Devdatta Kulkarni <<a href="mailto:devdatta.kulkarni@RACKSPACE.COM" class="">devdatta.kulkarni@RACKSPACE.COM</a>><br class="">
<span style="font-weight:bold" class="">Reply-To: </span>"OpenStack Development Mailing List (not for usage questions)" <<a href="mailto:openstack-dev@lists.openstack.org" class="">openstack-dev@lists.openstack.org</a>><br class="">
<span style="font-weight:bold" class="">Date: </span>Monday, June 15, 2015 9:56 AM<br class="">
<span style="font-weight:bold" class="">To: </span>"OpenStack Development Mailing List (not for usage questions)" <<a href="mailto:openstack-dev@lists.openstack.org" class="">openstack-dev@lists.openstack.org</a>><br class="">
<span style="font-weight:bold" class="">Subject: </span>Re: [openstack-dev] [Solum] Should logs be deleted when we delete an app?<br class="">
</div>
<div class=""><br class="">
</div>
<blockquote id="MAC_OUTLOOK_ATTRIBUTION_BLOCKQUOTE" style="BORDER-LEFT: #b5c4df 5 solid; PADDING:0 0 0 5; MARGIN:0 0 0 5;" class="" type="cite">
<div class=""><style type="text/css" style="display:none" class=""><!--P{margin-top:0;margin-bottom:0;} --></style>
<div dir="ltr" style="font-size: 12pt; background-color: rgb(255, 255, 255); font-family: Calibri, Arial, Helvetica, sans-serif;" class="">
<div class="">Yes, the log deletion should be optional. </div>
<div class=""><br class="">
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 class="">
<br class="">
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.
</div>
<div class="">This is very useful for our CI jobs. Without this, we end up with lots of log files in the application's container,</div>
<div class="">and have to resort to separate scripts to delete them up after an app is deleted.</div>
<div class=""><br class="">
</div>
<div class="">Once the app resource and CLI stabilize it should be straightforward to change the default behavior if required.<br class="">
</div>
<div class=""><br class="">
</div>
<div class="">- Devdatta<br class="">
</div>
<div class=""><br class="">
</div>
<div style="word-wrap:break-word" class="">
<hr tabindex="-1" style="display:inline-block; width:98%" class="">
<div id="divRplyFwdMsg" dir="ltr" class=""><font style="font-size:11pt" face="Calibri,sans-serif" class=""><b class="">From:</b> Adrian Otto <<a href="mailto:adrian.otto@rackspace.com" class="">adrian.otto@rackspace.com</a>><br class="">
<b class="">Sent:</b> Friday, June 12, 2015 6:54 PM<br class="">
<b class="">To:</b> OpenStack Development Mailing List (not for usage questions)<br class="">
<b class="">Subject:</b> [openstack-dev] [Solum] Should logs be deleted when we delete an app?</font>
<div class=""> </div>
</div>
<div class="">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>
__________________________________________________________________________<br class="">
OpenStack Development Mailing List (not for usage questions)<br class="">
Unsubscribe: <a href="mailto:OpenStack-dev-request@lists.openstack.org" class="">
OpenStack-dev-request@lists.openstack.org</a>?subject:unsubscribe<br class="">
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" class="">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br class="">
</blockquote>
</div>
<br class="">
</body>
</html>