Skip to content

CERTTF-448 Agent changes to receive logs from Conserver instance#469

Open
val500 wants to merge 26 commits intomainfrom
CERTTF-448-agent-conserver
Open

CERTTF-448 Agent changes to receive logs from Conserver instance#469
val500 wants to merge 26 commits intomainfrom
CERTTF-448-agent-conserver

Conversation

@val500
Copy link
Contributor

@val500 val500 commented Feb 19, 2025

Description

This PR gives the agent the ability to get serial console output from a Conserver server, post it to the Testflinger server, and save it in a artifact. This required several changes:

  1. New field in the agent configuration file for the conserver server IP address
  2. Changes to the CommandRunner class
    • The run function was split up into a couple different functions:
      • create_command_thread: Creates and starts the thread to run the command and stores it as a instance variable
      • monitor_command_output: Checks the stop conditions and posts command output to the handlers
    • run_async function was added
      • Since run blocks the main thread during the duration of the command run, it is unsuitable for continuously streaming output from conserver.
      • This new function creates a new command thread and runs the monitor_command_output function as a separate thread.
    • kill_async function was added
      • This function kills the running process and joins the two running threads
    • Handling of termination signal moved to job.py
      • Since there are two runners now, we need to cleanup both runners on termination signal. The new function in job.py, cleanup_runners, is ran on termination signal now.
  3. Creates new handlers to differentiate between live device output and live serial output.

Resolved issues

Resolves https://warthogs.atlassian.net/browse/CERTTF-448

Documentation

Web service API changes

N/A

Tests

Unit tests were added to test_serial.py

@val500 val500 marked this pull request as draft February 19, 2025 19:41
@val500 val500 force-pushed the CERTTF-448-agent-conserver branch 8 times, most recently from 543d59d to 2072b33 Compare February 25, 2025 23:05
@val500 val500 marked this pull request as ready for review February 25, 2025 23:06
@val500 val500 requested a review from boukeas February 25, 2025 23:07
@val500 val500 force-pushed the CERTTF-448-agent-conserver branch from 2072b33 to e408166 Compare February 26, 2025 21:05
@val500 val500 force-pushed the CERTTF-448-agent-conserver branch 4 times, most recently from 2f7dbdb to 9581ee7 Compare March 14, 2025 15:43
@val500 val500 force-pushed the CERTTF-448-agent-conserver branch from 9581ee7 to cedb5fd Compare May 19, 2025 17:40
@boukeas boukeas removed their request for review October 10, 2025 08:10
@github-actions
Copy link

github-actions bot commented Jan 7, 2026

This PR is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in a week.

@github-actions github-actions bot added the Stale label Jan 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant