Serial console port detach causes tty manifest to run a command with rc=1

Bug #1980984 reported by Iago Filipe
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
StarlingX
Fix Released
Medium
Iago Filipe

Bug Description

Brief Description
tty.pp manifest is supposed to disable/enable the active device console if there is a serial port attached. The command to disable/enable the console should be gracefully executed in the absence of a serial port attached. The current state is leading the full manifest to break due to an rc=1 from the disable/enable active device command.

Severity
Critical

Steps to Reproduce

Physically detach serial port/Disable VM serial port
Reboot host
Expected Behavior
Disabling the serial port doesn't lead to the full manifest breakage

Actual Behavior
Disabling serial port leads to the full manifest breakage

Reproducibility
Reproducible

System Configuration
Multi-node system

+Load info
Load: StarlingX master (debian)
Build date: 2022-07-05 18:03:14

Last Pass
None

Timestamp/Logs

puppet.log:2022-07-07T15:30:02.279 Debug: 2022-07-07 15:30:02 +0000 Executing: 'stty -clocal -F /dev/ttyS0'
puppet.log:2022-07-07T15:30:02.294 Notice: 2022-07-07 15:30:02 +0000 /Stage[main]/Platform::Tty/Exec[Disable (ttyS0) local line]/returns: stty: /dev/ttyS0: Input/output error
Alarms
No alarms

Test Activity
Developer testing

Workaround
None

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to stx-puppet (master)

Fix proposed to branch: master
Review: https://review.opendev.org/c/starlingx/stx-puppet/+/849034

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

Reviewed: https://review.opendev.org/c/starlingx/stx-puppet/+/849034
Committed: https://opendev.org/starlingx/stx-puppet/commit/121cf27651973dbe95ff62c3d07e5dd0b533f705
Submitter: "Zuul (22348)"
Branch: master

commit 121cf27651973dbe95ff62c3d07e5dd0b533f705
Author: Iago Estrela <email address hidden>
Date: Thu Jul 7 16:14:54 2022 -0300

    Gracefully handle serial port detachment in tty manifest

    Gracefully handles rc=1 from enable/disable active device console when
    serial port was detached and also log the output from the command.

    Closes-Bug: 1980984

    Test plan:
    PASS: Reboot system with serial port detached and verify that command
          error was handled gracefully.
    PASS: Successfully change ttys_dcd flag with serial port detached.

    Signed-off-by: Iago Estrela <email address hidden>
    Change-Id: I4678714e77dbbf62bab107215e1605995c84e0fc

Changed in starlingx:
status: In Progress → Fix Released
Ghada Khalil (gkhalil)
Changed in starlingx:
importance: Undecided → Medium
tags: added: stx.7.0 stx.config
Changed in starlingx:
assignee: nobody → Iago Filipe (ifest1)
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.