Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
lava
lava
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 119
    • Issues 119
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
    • Iterations
  • Merge Requests 33
    • Merge Requests 33
  • Requirements
    • Requirements
    • List
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Operations
    • Operations
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • CI/CD
    • Code Review
    • Insights
    • Issue
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • lava
  • lavalava
  • Merge Requests
  • !1325

Open
Created Sep 24, 2020 by Larry Shen@atlineContributor
  • Report abuse
Report abuse

Add ser_ctl to open close serial.

  • Overview 0
  • Commits 1
  • Pipelines 1
  • Changes 6

This to follow the PR: !1324


The last scenario for us to use docker-test-shell is:

E.g. We use uuu to burn the device, or use other flash/boot method to start the device for us, then these actions will open the serial port for us.

YES, some team need the serial output automatically print to job output, so we had the !1324 fix.

But some team will need full access serial port by their own script in docker-test-shell, e.g. our python uboot test. Leave the log in lava feedback connection just make them not easy to check log, and also leave useless pexpect process there to waste system resource, although they could use ser2net multiple-connection.

Meanwhile, there are some situation which not so easy to distinguish docker-test-shell namespace with other action which open the serial connection. For this scenario, feedback connection clear won't help.


So, for these situations, the thought here is:

Just let lava open the serial when needed, e.g. when boot action running. But before docker-test-shell starts, close the serial, let docker-test-shell control.

As any action may open the serial connection, so this MR use a separate ser-net action here to give full control to job writer to decide when to close/open serial port.


Sample job will like next:

actions:
- any_boot_action_open_serial

# close serial when you want to close it
- boot:
    method: ser_ctl
    timeout:
      seconds: 60

- test:
    docker:
      image: xxx

# open serial when you need it
- boot:
    method: ser_ctl
    action: open
    timeout:
      seconds: 60

- test:
    docker:
      image: xxx

A more common explanation maybe next:

  • boot1 -> ser_ctl -> docker
  • boot2 -> ser_ctl -> docker
  • boot1 -> ser_ctl -> lxc
  • boot2 -> ser_ctl -> lxc

Let ser_ctl act as a switch here.

Please have a look to see if it's ok? Thanks.

Edited Sep 24, 2020 by Larry Shen
Assignee
Assign to
Reviewer
Request review from
None
Milestone
None
Assign milestone
Time tracking
Source branch: ser_ctl