Project

General

Profile

Bug #51920

Return a string with stdout or stderr if a process fails

Added by Eric Turgeon 10 months ago. Updated 5 months ago.

Status:
Done
Priority:
No priority
Assignee:
Brandon Schneider
Category:
Middleware
Target version:
Seen in:
Severity:
New
Reason for Closing:
Reason for Blocked:
Needs QA:
No
Needs Doc:
No
Needs Merging:
No
Needs Automation:
No
Support Suite Ticket:
n/a
Hardware Configuration:
ChangeLog Required:
No

Description

From https://builds.ixsystems.com/jenkins/view/QA%20Tests/view/All/job/FreeNAS%20-%20Incremental%20Build%20-%20QA%20Tests/job/master/589/testReport/api2/jail/Run_Tests___API_2_0___test_13_exec_call/

Error Message

AttributeError: 'list' object has no attribute 'lower'

Stacktrace

def test_13_exec_call():
        if freeze is True:
            pytest.skip(freeze_msg)

        results = POST(
            '/jail/exec/', {
                'jail': JAIL_NAME,
                'command': ['echo "exec successful"']
            }
        )
        assert results.status_code == 200, results.text
>       assert 'exec successful' in results.json().lower(), results.text
E       AttributeError: 'list' object has no attribute 'lower'

api2/jail.py:186: AttributeError

ISO: https://builds.ixsystems.com/jenkins/job/FreeNAS%20-%20Master%20-%20Incremental%20Build/3738/artifact/artifacts/iso/FreeNAS-11.3-MASTER-201810180704-7fc945d05.iso

Associated revisions

Revision c56c0275 (diff)
Added by Brandon Schneider 10 months ago

fix(jail/exec): Return a string with stdout or stderr if a process fails

Ticket: #51920

Revision 059dcf3c (diff)
Added by Brandon Schneider 10 months ago

fix(jail/exec): Return a string with stdout or stderr if a process fails (#1931)

Ticket: #51920

History

#1 Updated by Eric Turgeon 10 months ago

  • Description updated (diff)

#2 Updated by William Grzybowski 10 months ago

Brandon, it seems we are returning a list instead of a string now?

Seems like we should handle that in middleware method to not break the API unless thats strictly necesary.

#3 Updated by Brandon Schneider 10 months ago

  • Status changed from Unscreened to In Progress

#4 Updated by Bug Clerk 10 months ago

  • Status changed from In Progress to Ready for Testing

#5 Updated by Bug Clerk 10 months ago

  • Target version changed from Backlog to 11.3

#6 Updated by Brandon Schneider 10 months ago

  • Needs Merging changed from Yes to No

#7 Updated by Eric Turgeon 10 months ago

  • Status changed from Ready for Testing to Passed Testing
  • Assignee changed from Brandon Schneider to Eric Turgeon
  • Needs QA changed from Yes to No

QA passed on that.

#8 Updated by Dru Lavigne 10 months ago

  • Subject changed from jail/exec API v2 test failed with AttributeError: 'list' object has no attribute 'lower' to Return a string with stdout or stderr if a process fails
  • Status changed from Passed Testing to Done
  • Needs Doc changed from Yes to No

#9 Updated by Dru Lavigne 7 months ago

  • Target version changed from 11.3 to 11.3-BETA1

#10 Updated by Dru Lavigne 6 months ago

  • Assignee changed from Eric Turgeon to Brandon Schneider

#11 Updated by Dru Lavigne 5 months ago

  • Target version changed from 11.3-BETA1 to 11.3-ALPHA1

Also available in: Atom PDF