node.py fails to set some parameters

Bug #1009645 reported by YAMAMOTO Hirotaka
20
This bug affects 3 people
Affects Status Importance Assigned to Milestone
rtslib (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Ubuntu Version: Ubuntu 12.04 LTS
Package: python-rtslib
Package Version: 2.1-2

Hi,

I found set_parameter method in rtslib.node.CFSNode class writes a trailing white space character after parameter value, which causes runtime errors for some parameters.

Examples are "InitialR2T" and "ImmediateData" parameters for rtslib.target.TPG objects.

tpg = rtslib.target.TPG(target, 1)
tpg.set_parameter('InitialR2T', 'No')

Expected:
success.

What happened:
rtslib.utils.RTSLibError: Cannot set parameter InitialR2T: Invalid argument

Removing a trailing white space fixes this bug, see attached patch.

description: updated
Revision history for this message
YAMAMOTO Hirotaka (ymmt2005) wrote :

This bug affects targetcli package as well as it depends on this library.

Revision history for this message
Peter Petrakis (peter-petrakis) wrote :

Copied patch from description body and formed attachment. Now lp scripting will see that a potential fix is attached to this bug.

Revision history for this message
Peter Petrakis (peter-petrakis) wrote :
description: updated
Changed in rtslib (Ubuntu):
status: New → Confirmed
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "fwrite_remove_trailing_space.patch" of this bug report has been identified as being a patch. The ubuntu-reviewers team has been subscribed to the bug report so that they can review the patch. In the event that this is in fact not a patch you can resolve this situation by removing the tag 'patch' from the bug report and editing the attachment so that it is not flagged as a patch. Additionally, if you are member of the ubuntu-reviewers team please also unsubscribe the team from this bug report.

[This is an automated message performed by a Launchpad user owned by Brian Murray. Please contact him regarding any issues with the action taken in this bug report.]

tags: added: patch
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.