Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 933460 Details for
Bug 1102115
PCS doesn't provide way to cleanup all resources
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
clean-up_all_git_patch
0001-clean-up-resources.patch (text/plain), 1.92 KB, created by
Michal Cab
on 2014-09-01 14:43:49 UTC
(
hide
)
Description:
clean-up_all_git_patch
Filename:
MIME Type:
Creator:
Michal Cab
Created:
2014-09-01 14:43:49 UTC
Size:
1.92 KB
patch
obsolete
>From 07f763b5e18c99dda01db32438a678a0d185c3e5 Mon Sep 17 00:00:00 2001 >From: Michal Cab <mcab@redhat.com> >Date: Mon, 1 Sep 2014 09:21:51 -0400 >Subject: [PATCH] clean up resources > >--- > pcs/resource.py | 30 +++++++++++++++++++++++++----- > 1 file changed, 25 insertions(+), 5 deletions(-) > >diff --git a/pcs/resource.py b/pcs/resource.py >index b113b71..6129228 100644 >--- a/pcs/resource.py >+++ b/pcs/resource.py >@@ -159,11 +159,11 @@ def resource_cmd(argv): > else: > set_default("rsc_defaults", argv) > elif (sub_cmd == "cleanup"): >- if len(argv) < 1: >- usage.resource() >- sys.exit(1) >- res_id = argv.pop(0) >- resource_cleanup(res_id) >+ if len(argv) == 0: >+ resource_cleanup_all() >+ else: >+ res_id = argv.pop(0) >+ resource_cleanup(res_id) > else: > usage.resource() > sys.exit(1) >@@ -1920,3 +1920,23 @@ def resource_cleanup(res_id): > utils.err("Unable to cleanup resource: %s" % res_id + "\n" + output) > else: > print "Resource: %s successfully cleaned up" % res_id >+ >+def resource_cleanup_all(): >+ (output, retval) = utils.run(["crm_resource", "-C"]) >+ if retval != 0: >+ utils.err("Unexpected error occured. 'crm_resource -C' err_code: %s\n%s" % (retval, output)) >+ return >+ (output, retval) = utils.run(["crm_resource", "-l"]) >+ if retval != 0: >+ utils.err("Unexpected error occured. 'crm_resource -l' err_code: %s\n%s" % (retval, output)) >+ else: >+ output = [o for o in output.split("\n") if o.strip() != ""] >+ for res_id in output: >+ failcount_cleanup(res_id) >+ >+def failcount_cleanup(res_id): >+ (output, retval) = utils.run(["crm_failcount", "-D", "-r", res_id]) >+ if retval != 0: >+ utils.err("Unable to cleanup resource: %s" % res_id + "\n" + output) >+ else: >+ print "Resource: %s successfully cleaned up" % res_id >-- >1.8.3.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 1102115
: 933460 |
937672