[openstack-dev] [Solum] Should logs be deleted when we delete an app?

Adrian Otto adrian.otto at rackspace.com
Tue Jun 16 17:24:29 UTC 2015


On Jun 15, 2015, at 9:10 PM, Keith Bray <keith.bray at RACKSPACE.COM<mailto:keith.bray at RACKSPACE.COM>> wrote:

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?

E.g.
> solum app delete MyApp
         Do you want to also delete your logs? (default is Yes):  [YES/no]
              NOTE, if you choose No, application logs will remain on your account. Depending on your service provider, you may incur on-going storage charges.

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:

    solum app delete <NAME|UUID>
        Delete an application and all related artifacts.

Initial alternative:

    solum app delete <NAME|UUID>
        Delete an application and all related artifacts, including logs.

We could add the --keep-logs option Murali mentioned and say this instead:

    solum app delete [--keep-logs] <NAME|UUID>
        Delete an application and all related artifacts. Logs are kept if --keep-logs is used.

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.

Cheers,

Adrian

Thanks,
-Keith

From: Devdatta Kulkarni <devdatta.kulkarni at RACKSPACE.COM<mailto:devdatta.kulkarni at RACKSPACE.COM>>
Reply-To: "OpenStack Development Mailing List (not for usage questions)" <openstack-dev at lists.openstack.org<mailto:openstack-dev at lists.openstack.org>>
Date: Monday, June 15, 2015 9:56 AM
To: "OpenStack Development Mailing List (not for usage questions)" <openstack-dev at lists.openstack.org<mailto:openstack-dev at lists.openstack.org>>
Subject: Re: [openstack-dev] [Solum] Should logs be deleted when we delete an app?

Yes, the log deletion should be optional.

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?

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.
This is very useful for our CI jobs. Without this, we end up with lots of log files in the application's container,
and have to resort to separate scripts to delete them up after an app is deleted.

Once the app resource and CLI stabilize it should be straightforward to change the default behavior if required.

- Devdatta

________________________________
From: Adrian Otto <adrian.otto at rackspace.com<mailto:adrian.otto at rackspace.com>>
Sent: Friday, June 12, 2015 6:54 PM
To: OpenStack Development Mailing List (not for usage questions)
Subject: [openstack-dev] [Solum] Should logs be deleted when we delete an app?

Team,

We currently delete logs for an app when we delete the app[1].

https://bugs.launchpad.net/solum/+bug/1463986

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?

Thanks,

Adrian
__________________________________________________________________________
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: OpenStack-dev-request at lists.openstack.org<mailto:OpenStack-dev-request at lists.openstack.org>?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20150616/fde046f9/attachment.html>


More information about the OpenStack-dev mailing list