mtce daemon_get_file_str returns first word not full string

Bug #1896669 reported by Eric MacDonald
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
StarlingX
Fix Released
Low
Eric MacDonald

Bug Description

The common daemon_get_file_str returns the first word of the first line not the entire first line of the specified file as was intended.

Want to use this function in another update but don`t want this to be tied to that update.

Severity:
--------
Minor since the only place its used has only a single word in the file.

Steps to Reproduce:
------------------
Call function with filename parameter referring to a file containing a space delimited sentence in the first line.

Expected Behavior
------------------
returns string with the full first line

Actual Behavior
----------------
Returns only the first word in the line

Reproducibility
---------------
100%

System Configuration
--------------------
Any

Branch/Pull Time/Commit
-----------------------
All

Last Pass
---------
Not tested

Timestamp/Logs
--------------
Not applicable

Test Activity
-------------
Developer

Workaround
----------
None

Tags: stx.metal
Changed in starlingx:
assignee: nobody → Eric MacDonald (rocksolidmtce)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to metal (master)

Fix proposed to branch: master
Review: https://review.opendev.org/753481

Changed in starlingx:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to metal (master)

Reviewed: https://review.opendev.org/753481
Committed: https://git.openstack.org/cgit/starlingx/metal/commit/?id=126cdfa36911d52995ee6fff7fbafdc52d8ae1d8
Submitter: Zuul
Branch: master

commit 126cdfa36911d52995ee6fff7fbafdc52d8ae1d8
Author: Eric MacDonald <email address hidden>
Date: Tue Sep 22 18:19:24 2020 -0400

    Make daemon_get_file_str return first line in specified file

    The current implementation will return only the first
    group of characters up to the first space from the first
    line of the specified file.

    This function was intended to return the entire first line.

    Change-Id: Ic34361c32aeff564f4645070279cdb53d5b87626
    Closes-Bug: 1896669
    Signed-off-by: Eric MacDonald <email address hidden>

Changed in starlingx:
status: In Progress → Fix Released
Ghada Khalil (gkhalil)
tags: added: stx.metal
Changed in starlingx:
importance: Undecided → Low
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.