This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 990021 - unable to start resource with "pcs resource enable <resource>"
unable to start resource with "pcs resource enable <resource>"
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: pcs (Show other bugs)
6.5
Unspecified Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: Chris Feist
:
Depends On:
Blocks: 990025
  Show dependency treegraph
 
Reported: 2013-07-30 05:21 EDT by michal novacek
Modified: 2013-11-21 06:52 EST (History)
3 users (show)

See Also:
Fixed In Version: pcs-0.9.64-1.el6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-11-21 06:52:20 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description michal novacek 2013-07-30 05:21:45 EDT
Description of problem:
pcs resource enable <resource> does not work -- shows python error.

Version-Release number of selected component (if applicable):
pcs-0.9.60-1.el6.noarch
rhel-6.5-20130729.n.0

How reproducible: always

Steps to Reproduce:
1. create a resource
2. try to start it with "pcs resource enable <resource>"

Actual results: UnboundLocalError: local variable 'did_start' referenced before
assignment

Expected results: stated resource

Additional info: 
# rpm -q pcs
pcs-0.9.60-1.el6.noarch

# pcs status
Cluster name: 
Last updated: Tue Jul 30 11:16:19 2013
Last change: Tue Jul 30 11:16:11 2013 via crm_resource on virt-030
Stack: cman
Current DC: virt-035 - partition with quorum
Version: 1.1.10-2.el6-368c726
3 Nodes configured
5 Resources configured

Online: [ virt-030 virt-035 virt-037 ]

Full list of resources:

 virt-fencing   (stonith:fence_xvm):    Started virt-030 
 Resource Group: haa-group-0
     ip-0       (ocf::heartbeat:IPaddr2):       Stopped 
     lvm-0      (ocf::redhat:lvm.sh):   Stopped 
     fs-0       (ocf::heartbeat:Filesystem):    Stopped 
     apache-0   (ocf::heartbeat:apache):        Stopped 

# pcs resource enable haa-group-0
Traceback (most recent call last):
  File "/usr/sbin/pcs", line 110, in <module>
    main(sys.argv[1:])
  File "/usr/sbin/pcs", line 92, in main
    resource.resource_cmd(argv)
  File "/usr/lib/python2.6/site-packages/pcs/resource.py", line 125, in resource_cmd
    resource_enable(argv)
  File "/usr/lib/python2.6/site-packages/pcs/resource.py", line 1278, in resource_enable
    if did_start:
UnboundLocalError: local variable 'did_start' referenced before assignment
Comment 4 Chris Feist 2013-08-13 17:39:50 EDT
[root@ask-02 ~]# pcs -f test.xml resource create Test Dummy
[root@ask-02 ~]# pcs -f test.xml resource enable Test
[root@ask-02 ~]# 


No more traceback, and resource is enabled (if it was previously disabled)
Comment 8 errata-xmlrpc 2013-11-21 06:52:20 EST
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2013-1633.html

Note You need to log in before you can comment on or make changes to this bug.