)]}'
{"id":"openstack%2Fpython-troveclient~420158","triplet_id":"openstack%2Fpython-troveclient~master~Ide36a3ae3e5e8596737227c43f1229b887aba524","project":"openstack/python-troveclient","branch":"master","hashtags":[],"change_id":"Ide36a3ae3e5e8596737227c43f1229b887aba524","subject":"Restrict reset-status command to admin","status":"ABANDONED","created":"2017-01-13 20:10:41.000000000","updated":"2017-04-26 12:41:51.000000000","total_comment_count":1,"unresolved_comment_count":0,"has_review_started":true,"meta_rev_id":"de40c3bcc1a30a65419db1a50c3b53941af6d4e3","_number":420158,"virtual_id_number":420158,"owner":{"_account_id":21668,"name":"Ali Asgar Adil","email":"aadil@tesora.com","username":"aliaadil"},"actions":{},"labels":{"Verified":{"recommended":{"_account_id":3,"name":"Jenkins","username":"jenkins"},"all":[{"date":"2017-01-17 19:18:37.000000000","_account_id":14576,"name":"Petr Malik","email":"pmalik@tesora.com","username":"pmalik"},{"value":1,"date":"2017-01-13 21:18:05.000000000","_account_id":3,"name":"Jenkins","username":"jenkins"},{"date":"2017-01-16 19:08:51.000000000","_account_id":21668,"name":"Ali Asgar Adil","email":"aadil@tesora.com","username":"aliaadil"},{"_account_id":10215,"name":"Peter Stachowski","email":"peter@tesora.com","username":"peterstac"},{"date":"2017-01-16 18:18:09.000000000","_account_id":20378,"name":"Trevor McCasland","email":"TM2086@att.com","username":"twm2016"}],"values":{"-2":"Fails","-1":"Doesn\u0027t seem to work"," 0":"No score","+1":"Works for me","+2":"Verified"},"description":"","value":1,"default_value":0,"optional":true},"Code-Review":{"disliked":{"_account_id":10215,"name":"Peter Stachowski","email":"peter@tesora.com","username":"peterstac"},"all":[{"value":0,"permitted_voting_range":{"min":-1,"max":1},"_account_id":14576,"name":"Petr Malik","email":"pmalik@tesora.com","username":"pmalik"},{"value":0,"permitted_voting_range":{"min":-1,"max":1},"_account_id":3,"name":"Jenkins","username":"jenkins"},{"value":0,"permitted_voting_range":{"min":-1,"max":1},"_account_id":21668,"name":"Ali Asgar Adil","email":"aadil@tesora.com","username":"aliaadil"},{"value":-1,"date":"2017-01-16 22:24:47.000000000","permitted_voting_range":{"min":-1,"max":1},"_account_id":10215,"name":"Peter Stachowski","email":"peter@tesora.com","username":"peterstac"},{"value":-1,"date":"2017-01-16 18:41:04.000000000","permitted_voting_range":{"min":-1,"max":1},"_account_id":20378,"name":"Trevor McCasland","email":"TM2086@att.com","username":"twm2016"}],"values":{"-2":"Do not merge","-1":"This patch needs further work before it can be merged"," 0":"No score","+1":"Looks good to me, but someone else must approve","+2":"Looks good to me (core reviewer)"},"description":"","value":-1,"default_value":0,"optional":true},"Workflow":{"all":[{"_account_id":14576,"name":"Petr Malik","email":"pmalik@tesora.com","username":"pmalik"},{"_account_id":3,"name":"Jenkins","username":"jenkins"},{"value":0,"permitted_voting_range":{"min":-1,"max":0},"_account_id":21668,"name":"Ali Asgar Adil","email":"aadil@tesora.com","username":"aliaadil"},{"_account_id":10215,"name":"Peter Stachowski","email":"peter@tesora.com","username":"peterstac"},{"_account_id":20378,"name":"Trevor McCasland","email":"TM2086@att.com","username":"twm2016"}],"values":{"-1":"Work in progress"," 0":"Ready for reviews","+1":"Approved"},"description":"","default_value":0,"optional":true},"Backport-Candidate":{"all":[{"_account_id":14576,"name":"Petr Malik","email":"pmalik@tesora.com","username":"pmalik"},{"_account_id":3,"name":"Jenkins","username":"jenkins"},{"_account_id":21668,"name":"Ali Asgar Adil","email":"aadil@tesora.com","username":"aliaadil"},{"_account_id":10215,"name":"Peter Stachowski","email":"peter@tesora.com","username":"peterstac"},{"_account_id":20378,"name":"Trevor McCasland","email":"TM2086@att.com","username":"twm2016"}],"values":{"-1":"Not A Backport Candidate"," 0":"Backport Review Needed","+1":"Proposed Backport"},"description":"","default_value":0,"optional":true}},"removable_reviewers":[],"reviewers":{"REVIEWER":[{"_account_id":3,"name":"Jenkins","username":"jenkins"},{"_account_id":10215,"name":"Peter Stachowski","email":"peter@tesora.com","username":"peterstac"},{"_account_id":14576,"name":"Petr Malik","email":"pmalik@tesora.com","username":"pmalik"},{"_account_id":20378,"name":"Trevor McCasland","email":"TM2086@att.com","username":"twm2016"},{"_account_id":21668,"name":"Ali Asgar Adil","email":"aadil@tesora.com","username":"aliaadil"}]},"pending_reviewers":{},"reviewer_updates":[{"updated":"2017-01-13 21:18:05.000000000","updated_by":{"_account_id":3,"name":"Jenkins","username":"jenkins"},"reviewer":{"_account_id":3,"name":"Jenkins","username":"jenkins"},"state":"REVIEWER"},{"updated":"2017-01-16 18:18:09.000000000","updated_by":{"_account_id":20378,"name":"Trevor McCasland","email":"TM2086@att.com","username":"twm2016"},"reviewer":{"_account_id":20378,"name":"Trevor McCasland","email":"TM2086@att.com","username":"twm2016"},"state":"REVIEWER"},{"updated":"2017-01-16 22:24:47.000000000","updated_by":{"_account_id":10215,"name":"Peter Stachowski","email":"peter@tesora.com","username":"peterstac"},"reviewer":{"_account_id":10215,"name":"Peter Stachowski","email":"peter@tesora.com","username":"peterstac"},"state":"REVIEWER"},{"updated":"2017-01-17 19:18:37.000000000","updated_by":{"_account_id":14576,"name":"Petr Malik","email":"pmalik@tesora.com","username":"pmalik"},"reviewer":{"_account_id":14576,"name":"Petr Malik","email":"pmalik@tesora.com","username":"pmalik"},"state":"REVIEWER"}],"messages":[{"id":"b33ecdfef76c28b9983c1e0dbe7e1c51457cd222","author":{"_account_id":21668,"name":"Ali Asgar Adil","email":"aadil@tesora.com","username":"aliaadil"},"date":"2017-01-13 20:10:41.000000000","message":"Uploaded patch set 1.","accounts_in_message":[],"_revision_number":1},{"id":"7c9d5c64b94cb1f526e078ebbb0de85deab7f784","author":{"_account_id":3,"name":"Jenkins","username":"jenkins"},"date":"2017-01-13 21:18:05.000000000","message":"Patch Set 1: Verified+1\n\nBuild succeeded (check pipeline).\n\n- gate-python-troveclient-docs-ubuntu-xenial http://docs-draft.openstack.org/58/420158/1/check/gate-python-troveclient-docs-ubuntu-xenial/99f6bb9//doc/build/html/ : SUCCESS in 5m 39s\n- gate-python-troveclient-pep8-ubuntu-xenial http://logs.openstack.org/58/420158/1/check/gate-python-troveclient-pep8-ubuntu-xenial/2453675/ : SUCCESS in 4m 21s\n- gate-python-troveclient-python27-ubuntu-xenial http://logs.openstack.org/58/420158/1/check/gate-python-troveclient-python27-ubuntu-xenial/fbd37ac/ : SUCCESS in 2m 19s\n- gate-python-troveclient-python35 http://logs.openstack.org/58/420158/1/check/gate-python-troveclient-python35/2d2c8e0/ : SUCCESS in 2m 12s\n- gate-python-troveclient-pypy http://logs.openstack.org/58/420158/1/check/gate-python-troveclient-pypy/99b84e7/ : FAILURE in 5m 19s (non-voting)\n- gate-tempest-dsvm-neutron-src-python-troveclient-ubuntu-xenial http://logs.openstack.org/58/420158/1/check/gate-tempest-dsvm-neutron-src-python-troveclient-ubuntu-xenial/12e1775/ : SUCCESS in 1h 04m 48s\n- gate-trove-functional-dsvm-mysql-ubuntu-xenial http://logs.openstack.org/58/420158/1/check/gate-trove-functional-dsvm-mysql-ubuntu-xenial/44d923c/ : SUCCESS in 56m 25s","accounts_in_message":[],"_revision_number":1},{"id":"c94af8c0f8d0b257c257f5b716f862e1b7d385e8","author":{"_account_id":20378,"name":"Trevor McCasland","email":"TM2086@att.com","username":"twm2016"},"date":"2017-01-16 18:18:09.000000000","message":"Patch Set 1:\n\nIs policy not enough? https://github.com/openstack/trove/blob/master/etc/trove/policy.json#L16 \n\nWhen I try to use reset-status as the demo I get this response:\n\n\u003e ubuntu@controller:~/devstack$ trove reset-status myinst\nERROR: Policy doesn\u0027t allow instance:reset_status to be performed. (HTTP 403)","accounts_in_message":[],"_revision_number":1},{"id":"f85cc9057fa71797d82488350cac6b3a966a935a","author":{"_account_id":20378,"name":"Trevor McCasland","email":"TM2086@att.com","username":"twm2016"},"date":"2017-01-16 18:41:04.000000000","message":"Patch Set 1: Code-Review-1\n\n(1 comment)\n\nOh I see what you\u0027re doing now... you should fix the commit message that is what led me to my comment earlier. I made a suggestion inline.\n\nI tested it out and it works as advertised in the commit message but.. it would be a good idea to make a unit test to make sure we don\u0027t remove your change by mistake. \n\nSo for example, a good unit test should verify that reset-status was NOT called during a force-delete operation because right now (without this patch) that\u0027s the current behavior.","accounts_in_message":[],"_revision_number":1},{"id":"9a4b836a6eeb76c0022016402d15d06bd0774175","author":{"_account_id":21668,"name":"Ali Asgar Adil","email":"aadil@tesora.com","username":"aliaadil"},"date":"2017-01-16 19:08:51.000000000","message":"Patch Set 1:\n\nThe current behavior allows anyone, admin and non-admin user, to perform a force-delete and reset-status command. \n\nThis patch will limit the reset-status command only to an Admin. Force-delete can still be used by an admin and non-admin user. The force-delete function will still call the reset-status function except it will pass a flag indicating the function to use the policy for force-delete rather than reset-status.","accounts_in_message":[],"_revision_number":1},{"id":"e28fb224daa83a4bb478896d5edcf48ab6114280","author":{"_account_id":10215,"name":"Peter Stachowski","email":"peter@tesora.com","username":"peterstac"},"date":"2017-01-16 22:24:47.000000000","message":"Patch Set 1: Code-Review-1\n\nHmmm, I think we may be going around this the wrong way.  By controlling access based on a flag, that opens a hole where someone can hit the python or REST API directly and be able to run reset_status even if the policy restricted them.  We may have to have the server command for \u0027force-delete\u0027 call \u0027reset-status\u0027 instead of having the CLI do it.","accounts_in_message":[],"_revision_number":1},{"id":"ba01acb1d0b93ccec387748c327576001cfcb617","author":{"_account_id":20378,"name":"Trevor McCasland","email":"TM2086@att.com","username":"twm2016"},"date":"2017-01-16 22:42:32.000000000","message":"Patch Set 1:\n\nShould there be a bug filed for this? It sounds like incorrect policies are being used but I can\u0027t reproduce the bug..","accounts_in_message":[],"_revision_number":1},{"id":"2776ba2838f8a05172ea1f2ac020e8966d9e4926","author":{"_account_id":14576,"name":"Petr Malik","email":"pmalik@tesora.com","username":"pmalik"},"date":"2017-01-17 19:18:37.000000000","message":"Patch Set 1:\n\nI tend to agree with Peter. There should probably be a separate API for force-delete :/","accounts_in_message":[],"_revision_number":1},{"id":"13d62a4bcb28e0128b99452404437cd0897c9988","author":{"_account_id":14576,"name":"Petr Malik","email":"pmalik@tesora.com","username":"pmalik"},"date":"2017-01-17 19:23:35.000000000","message":"Patch Set 1:\n\n\u003e Should there be a bug filed for this? It sounds like incorrect\n \u003e policies are being used but I can\u0027t reproduce the bug..\n\nI think the policies are correct. The issue is that reset-status can be performed only by admin users (because itcan cause systems like clusters to get into a bad undefined state). But we still want the normal users be able to delete force them (which is reset-status followed by normal delete). The problem is that we currently do not have force-delete API call (which would normally have a separate policy rule).","accounts_in_message":[],"_revision_number":1},{"id":"de40c3bcc1a30a65419db1a50c3b53941af6d4e3","author":{"_account_id":9664,"name":"amrith","email":"amrith.kumar@gmail.com","username":"amrith"},"date":"2017-04-26 12:41:51.000000000","message":"Abandoned\n\ninactivity over 3 months, and review comments","accounts_in_message":[],"_revision_number":1}],"current_revision_number":1,"current_revision":"29493eb37d5fb4b78501b5ecd201bee2b31ae1f2","revisions":{"29493eb37d5fb4b78501b5ecd201bee2b31ae1f2":{"kind":"REWORK","_number":1,"created":"2017-01-13 20:10:41.000000000","uploader":{"_account_id":21668,"name":"Ali Asgar Adil","email":"aadil@tesora.com","username":"aliaadil"},"ref":"refs/changes/58/420158/1","fetch":{"anonymous http":{"url":"https://review.opendev.org/openstack/python-troveclient","ref":"refs/changes/58/420158/1","commands":{"Checkout":"git fetch https://review.opendev.org/openstack/python-troveclient refs/changes/58/420158/1 \u0026\u0026 git checkout FETCH_HEAD","Cherry Pick":"git fetch https://review.opendev.org/openstack/python-troveclient refs/changes/58/420158/1 \u0026\u0026 git cherry-pick FETCH_HEAD","Format Patch":"git fetch https://review.opendev.org/openstack/python-troveclient refs/changes/58/420158/1 \u0026\u0026 git format-patch -1 --stdout FETCH_HEAD","Pull":"git pull https://review.opendev.org/openstack/python-troveclient refs/changes/58/420158/1"}}},"commit":{"parents":[{"commit":"043be0871a7b9c4286ebad4dffa15543eba7cc8a","subject":"Merge \"Show team and repo badges on README\"","web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/python-troveclient/commit/043be0871a7b9c4286ebad4dffa15543eba7cc8a"}]}],"author":{"name":"Ali Asgar Adil","email":"aadil@tesora.com","date":"2016-11-07 15:32:41.000000000","tz":0},"committer":{"name":"Ali Adil","email":"aadil@tesora.com","date":"2017-01-13 20:10:41.000000000","tz":0},"subject":"Restrict reset-status command to admin","message":"Restrict reset-status command to admin\n\nThe reset status command should only be used by an Admin as\nresetting the state of an instance/cluster can be dangerous.\nAny user should still be able to force delete an instance/cluster.\n\nSince, force delete calls the reset status command and then the\ndelete command it is necessary to pass a flag indicating that\nthe reset status is being performed for a force delete and the\npolicy should allow it. If reset status command is being called\nfor a force delete the body will be appended to indicate it.\n\nChange-Id: Ide36a3ae3e5e8596737227c43f1229b887aba524\n","web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/python-troveclient/commit/29493eb37d5fb4b78501b5ecd201bee2b31ae1f2"}],"resolve_conflicts_web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/python-troveclient/commit/29493eb37d5fb4b78501b5ecd201bee2b31ae1f2"}]},"branch":"refs/heads/master"}},"requirements":[],"submit_records":[],"submit_requirements":[]}
