EQL ssh output parsing can loop until timeout on bad input

Bug #1378394 reported by Sean McGinnis
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Undecided
Sean McGinnis
Juno
Fix Released
Undecided
Eric Harney

Bug Description

The current CLI output parser assumes command output will end with the system name prompt, i.e. "MY_ARRAY>". If there is a problem with the string passed to the CLI it may print an error message and prepopulate the failed command to be edited interactively.

Since the parsing will loop until it sees a string ending with the command prompt it will loop until the command execution timeout of the driver kicks in. We recognize the error condition so we don't waste time looping and can return the actual error message rather than a "Command timed out" message that doesn't give any detail as to what the problem was.

Changed in cinder:
assignee: nobody → Sean McGinnis (sean-mcginnis)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (master)

Fix proposed to branch: master
Review: https://review.openstack.org/126600

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (master)

Reviewed: https://review.openstack.org/126600
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=ce8b5a3e6e687148cebfa3b160c779269ab73b8c
Submitter: Jenkins
Branch: master

commit ce8b5a3e6e687148cebfa3b160c779269ab73b8c
Author: Sean McGinnis <email address hidden>
Date: Tue Oct 7 10:29:26 2014 -0500

    Fix eqlx CLI output parsing on bad input

    The eqlx driver would identify CLI command completion
    by looking for the system name prompt at the end of
    the output ("ARRAY_NAME>"). In some cases where there
    is bad input the array will print an error, then
    prepopulate the command again so it can be edited,
    resulting in the output:

    "ARRAY_NAME> [bad command]"

    The array name prompt only gets printed on command
    completion, so the fix is to look for the prompt
    anywhere in the CLI output.

    Change-Id: I063a203c9746689ca8a42a97725b059f782e3812
    Closes-Bug: 1378394

Changed in cinder:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in cinder:
milestone: none → kilo-1
status: Fix Committed → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (stable/juno)

Fix proposed to branch: stable/juno
Review: https://review.openstack.org/147957

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (stable/juno)

Reviewed: https://review.openstack.org/147957
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=58f763318ab2bb6aeb64c6fc1d75020be6555677
Submitter: Jenkins
Branch: stable/juno

commit 58f763318ab2bb6aeb64c6fc1d75020be6555677
Author: Sean McGinnis <email address hidden>
Date: Tue Oct 7 10:29:26 2014 -0500

    Fix eqlx CLI output parsing on bad input

    The eqlx driver would identify CLI command completion
    by looking for the system name prompt at the end of
    the output ("ARRAY_NAME>"). In some cases where there
    is bad input the array will print an error, then
    prepopulate the command again so it can be edited,
    resulting in the output:

    "ARRAY_NAME> [bad command]"

    The array name prompt only gets printed on command
    completion, so the fix is to look for the prompt
    anywhere in the CLI output.

    Change-Id: I063a203c9746689ca8a42a97725b059f782e3812
    Closes-Bug: 1378394
    (cherry picked from commit ce8b5a3e6e687148cebfa3b160c779269ab73b8c)

tags: added: in-stable-juno
Thierry Carrez (ttx)
Changed in cinder:
milestone: kilo-1 → 2015.1.0
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.