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 111
    • Issues 111
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
    • Iterations
  • Merge Requests 29
    • Merge Requests 29
  • Requirements
    • Requirements
    • List
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Security & Compliance
    • Security & Compliance
    • Dependency List
    • License Compliance
  • 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
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • lava
  • lavalava
  • Merge Requests
  • !1325

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

Check out, review, and merge locally

Step 1. Fetch and check out the branch for this merge request

git fetch "https://git.lavasoftware.org/atline/lava.git" "ser_ctl"
git checkout -b "atline/lava-ser_ctl" FETCH_HEAD

Step 2. Review the changes locally

Step 3. Merge the branch and fix any conflicts that come up

git fetch origin
git checkout "master"
git merge --no-ff "atline/lava-ser_ctl"

Step 4. Push the result of the merge to GitLab

git push origin "master"

Note that pushing to GitLab requires write access to this repository.

Tip: You can also checkout merge requests locally by following these guidelines.

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
None
Milestone
None
Assign milestone
Time tracking
Reference: lava/lava!1325
Source branch: ser_ctl