Add comment to kickstart stating how LAT hook syntax errors are rendered

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

Bug Description

Brief Description
-----------------
The Linux Assembly Tool parses a kickstart file containing various hook segments that are syntactically delineated with statements that start with '%'. The example below shows the start and end syntax of a hook block.

%post --interpreter=/bin/bash

<kickstart bash code goes here>

%end

If LAT detects a hook block syntax error it fails the install and renders it as a Permission error.

This Jira calls for 2 kickstart comments to be added saying
1. How hook syntax errors are rendered with a permission error.
2. the kickstart must end with a Line Feed after the last %end directive

Severity
--------
Minor: code comment only

Steps to Reproduce
------------------
Install a system after removing the LF from the end of the file.

Expected Behavior
------------------
install succeeds

Actual Behavior
----------------
install fails

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

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

Branch/Pull Time/Commit
-----------------------
N/A issue does not exist in master branch. Just need comments added to code.

Last Pass
---------
N/A

Timestamp/Logs
--------------
Run post install nochroot script /tmp/lat/lat_post_nochroot_script/10_script
+ IMAGE_ROOTFS=/sysroot/ostree/1
+ /tmp/lat/lat_post_nochroot_script/10_script
./lat-installer.sh: line 539: /tmp/lat/lat_post_nochroot_script/10_script: Permission denied
Run Kickstart Post Install Script failed in /sysroot/ostree/1

[ 349.536291] sysrq: Resetting

Test Activity
-------------
N/A

Workaround
----------
N/A

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/c/starlingx/metal/+/922027

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/c/starlingx/metal/+/922027
Committed: https://opendev.org/starlingx/metal/commit/f0da76d820b1892a8cab01dc4ab897ab7c3f7694
Submitter: "Zuul (22348)"
Branch: master

commit f0da76d820b1892a8cab01dc4ab897ab7c3f7694
Author: Eric MacDonald <email address hidden>
Date: Fri Jun 14 11:20:44 2024 -0400

    Add LAT hook segment syntax error rendering code comment to kickstarts

    The Linux Assembly Tool parses a kickstart file containing various
    hook segments that are syntactically delineated with statements that
    start with '%'.

    The example below shows the start and end syntax of a hook block.

    %post --interpreter=/bin/bash

    <kickstart bash code goes here>

    %end

    If LAT detects a hook block syntax error it fails the install and
    renders it as a Permission denied like this:

    ./lat-installer.sh: line 539:
    /tmp/lat/lat_post_nochroot_script/10_script: Permission denied

    This update adds a comment to the kickstart file header explaining
    how LAT renders hook syntax errors as file permission denied and
    a comment at the end of the kickstart warning not to remove the
    Line Feed at the end of the kickstart files.

    Test Plan:

    PASS: Verify spelling and format of added code comments.
    PASS: Verify kickstart.cfg has a Line Feed at the end of the last
          kickstart.cfg and miniboot.cfg files. They were already there.

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

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