New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 828683 link

Starred by 1 user

Issue metadata

Status: Untriaged
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: 2019-07-09
OS: Chrome
Pri: 3
Type: Bug



Sign in to add a comment

Servod can pick multiple ports under duplicate SN?

Project Member Reported by haoweiw@google.com, Apr 4 2018

Issue description

There is no algorithm to prevent one Servo to use multiple ports.

This is highly possible caused by faulty config file created. Means two/more servo_config files are duplicated. 

/var/lib/servod # cat config_9998 config_9997 
BOARD=guado
SERIAL=C1612060707
BOARD=guado
SERIAL=C1612060707

This is also leading AFE attributes duplication.  

18833 pts/0    Ssl+   0:01 /usr/bin/python2.7 /usr/lib/python-exec/python2.7/servod --host 0.0.0.0 --board guado --serialname C1612060707 --port 9998
18857 pts/0    S+     0:00 /usr/bin/python2.7 /usr/lib/python-exec/python2.7/servod --host 0.0.0.0 --board guado --serialname C1612060707 --port 9998
18858 pts/0    S+     0:00 /usr/bin/python2.7 /usr/lib/python-exec/python2.7/servod --host 0.0.0.0 --board guado --serialname C1612060707 --port 9998
18904 pts/8    Ssl+   0:03 /usr/bin/python2.7 /usr/lib/python-exec/python2.7/servod --host 0.0.0.0 --board guado --serialname C1612060707 --port 9997
18924 pts/8    S+     0:00 /usr/bin/python2.7 /usr/lib/python-exec/python2.7/servod --host 0.0.0.0 --board guado --serialname C1612060707 --port 9997
18925 pts/8    S+     0:00 /usr/bin/python2.7 /usr/lib/python-exec/python2.7/servod --host 0.0.0.0 --board guado --serialname C1612060707 --port 9997
18932 pts/18   S+     0:00 grep --colour=auto servod

We need to have a methodology to prevent this effort. 
 
Can you include more details on how to repro this? I don't understand this bug from just what is written. The command you depict, what device are you running that on?
servod shouldn't be trying to protect against this, the deployment script (which I believe is starting point for all of this) is where prevention should come in.
Cc: jrbarnette@chromium.org
Re#2 I think deployment script has no control of port assignments. We should add some feature to prevent this. 

Re#1. I ran this from my local testing environment. You can repro this by picking a labstation in the labs. 

1. Create duplicate servo config file under /var/lib/servod
2. start servod -p on both ports.
The port assignment happens in the deployment script: https://cs.corp.google.com/chromeos_public/src/third_party/autotest/files/site_utils/deployment/install.py?rcl=76721b5581a24f1173e23dfe8714241f3a7ee159&l=747

As for the repro steps, I think what we're looking for is a setup of labstation/duts and running deployment on those instead of manually creating duplicate servo configs on the labstation.
The other possibility is pre-assign the port. Take a look the deployment template (both odd and even row)

https://docs.google.com/spreadsheets/d/1Ym_9Rx_qD-8q3cHRArJ5_7HGuZMKv4IzxVzTrF5PXGo/edit?usp=sharing
Re #4, I will try to reproduce this. I guess it could cause by a bad deployment originally, and re-deployment. So one free port first assigned and locked, then another port assigned to the same Servo from re-deployment. 
Labels: Pri-3
NextAction: 2019-07-09
Downgrading P2s that haven't been modified in more than 6 months, which have no component or owner.

Comment 8 by osh...@chromium.org, Jan 18 (4 days ago)

Components: Infra>ChromeOS>Test

Sign in to add a comment