Bug 990021

Summary: unable to start resource with "pcs resource enable <resource>"
Product: Red Hat Enterprise Linux 6 Reporter: michal novacek <mnovacek>
Component: pcsAssignee: Chris Feist <cfeist>
Status: CLOSED ERRATA QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.5CC: cluster-maint, jharriga, rsteiger
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
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 11:52:20 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 990025    

Description michal novacek 2013-07-30 09:21:45 UTC
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 21:39:50 UTC
[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 11:52:20 UTC
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