Bug 1342584

Summary: fence_apc: Connection timed out
Product: Red Hat Enterprise Linux 7 Reporter: Nate Straz <nstraz>
Component: fence-agentsAssignee: Oyvind Albrigtsen <oalbrigt>
Status: CLOSED ERRATA QA Contact: cluster-qe <cluster-qe>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.2CC: cluster-maint, mjuricek
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: fence-agents-4.0.11-39.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-11-04 04:50:09 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:
Attachments:
Description Flags
Patch against master none

Description Nate Straz 2016-06-03 15:15:46 UTC
Description of problem:

Sometimes when getting the status of a power outlet using the fence_apc fencing agent, the command will fail with "Connection timed out."

Turning on verbose shows:

^M------- Outlet Control/Configuration ------------------------------------------

     1- north-console            ON
     2- north-01                 ON
     3- north-02                 ON
     4- north-03                 ON
     5- north-04                 ON
     6- north-05                 OFF
     7- north-06                 OFF
     8- Outlet 8                 ON
     9- north-07                 OFF
    10- north-08                 OFF
    11- north-09                 OFF
    12- north-10                 OFF
    13- north-11                 OFF
    14- north-12                 OFF
    15- north-13                 OFF
    16- Outlet 16                ON
    17- north-14                 OFF
    18- north-16                 OFF
    19- north-15                 OFF
    20- nsew                     ON
    21- north-fc                 ON
    22- north-storage1           ON
^M        Press <ENTER>
Sent: 

Received:  to continue...^M                                    ^M    23- north-storage2           ON
    24- Outlet 24                ON
    25- Master Control/Configuration

     <ESC>- Back, <ENTER>- Refresh, <CTRL-L>- Event Log
>
Sent: 

Sent: ^C
Connection timed out


The ^C to get back to the top menu isn't being seen by the APC at the right time.  The top menu doesn't get displayed and the fence agent sits there waiting until the time out expires.

If I wait for the command prompt after the loop, the fence agent doesn't time out there.


                 if exp_result != 0:
                         break
+        conn.log_expect(options, options["--command-prompt"], int(options["--shell-timeout"]))
         conn.send(chr(03))
         conn.log_expect(options, "- Logout", int(options["--shell-timeout"]))


Version-Release number of selected component (if applicable):
fence-agents-apc-4.0.11-27.el7.x86_64

How reproducible:
Easily


Steps to Reproduce:
1. Turn an outlet on and off in a loop
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Nate Straz 2016-06-03 15:16:31 UTC
Created attachment 1164554 [details]
Patch against master

Comment 5 Nate Straz 2016-06-06 20:27:56 UTC
Either patch works for me.

Comment 9 errata-xmlrpc 2016-11-04 04:50:09 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.

https://rhn.redhat.com/errata/RHBA-2016-2373.html