Checkbox remote master cost over 5min during Bootstrap after test plan selected

Bug #1805580 reported by Ray Chen
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Next Generation Checkbox (CLI)
Fix Released
Critical
Sylvain Pineau

Bug Description

While using checkbox-cli master to connect slave at first time, after selected test plan, the master cost over 5 min to connected success and continue to tests selection

Step:

1. Run Checkbox-cli slave on DUT
2. Run checkbox-cli master <IP_ADDER>
3. Select test plan on master
4. Master start bootstrap as below

============[ Bootstrap com.canonical.certification::device (1/3) ]=============
==========[ Bootstrap com.canonical.certification::executable (2/3) ]===========
=============[ Bootstrap com.canonical.certification::fwts (3/3) ]==============

and it will cost over 5 min to tests selection(sometime over 10 min)

=========================================
~$ apt-cache policy plainbox checkbox
plainbox:
  Installed: (none)
  Candidate: 0.39.0~ppa~ubuntu16.04.1
  Version table:
     0.39.0~ppa~ubuntu16.04.1 500
        500 http://ppa.launchpad.net/hardware-certification/public/ubuntu xenial/main amd64 Packages
        500 http://ppa.launchpad.net/hardware-certification/public/ubuntu xenial/main i386 Packages
     0.25-1 500
        500 http://archive.ubuntu.com/ubuntu xenial/universe amd64 Packages
        500 http://archive.ubuntu.com/ubuntu xenial/universe i386 Packages
checkbox:
  Installed: (none)
  Candidate: 1.2.4-0ubuntu1
  Version table:
     1.2.4-0ubuntu1 500
        500 http://archive.ubuntu.com/ubuntu xenial/universe amd64 Packages
        500 http://archive.ubuntu.com/ubuntu xenial/universe i386 Packages

Related branches

Ray Chen (ray.chen)
description: updated
Changed in checkbox-ng:
importance: Undecided → High
Changed in checkbox-ng:
status: New → In Progress
assignee: nobody → Maciej Kisielewski (kissiel)
Revision history for this message
Maciej Kisielewski (kissiel) wrote :

This got fixed by a few optimization I and Sylvain did.
Until proven otherwise I consider this to be fixed.

Changed in checkbox-ng:
status: In Progress → Fix Committed
Changed in checkbox-ng:
milestone: none → 1.9.0
assignee: Maciej Kisielewski (kissiel) → Sylvain Pineau (sylvain-pineau)
importance: High → Critical
status: Fix Committed → In Progress
description: updated
information type: Private → Public
Revision history for this message
Sylvain Pineau (sylvain-pineau) wrote :

Reproduced!

Slave is running dev ppa versions of checkbox-ng and p-p-c. I've cloned p-p-tpm2 on the slave and manually `manage.py develop` it.

From master it takes 70s to see the test selection screen (one of the tpm2 test plan):

#############################

[launcher]
app_id = com.canonical.certification:checkbox-test
launcher_version = 1
stock_reports = text, submission_files

[test plan]
unit = com.canonical.certification::tpm2.0_4.1.1-automated
forced = yes

[test selection]
forced = no

#############################

A bit of debug at rpyc level shows a huge traffic coming from the slave with job details inside the data.

In order to benefit from 1. stream compression and 2. no netrefs we absolutely have to prefer very simple data model when sending structures of data to master, in other words, list and strings.

For everything else, do json serialization. Keeping Netrefs (https://rpyc.readthedocs.io/en/latest/docs/theory.html#object-proxying) on all known units costs a lot.

Changed in checkbox-ng:
status: In Progress → Fix Committed
Revision history for this message
Pierre Equoy (pieq) wrote :

Tested using checkbox-snappy 20.15 rev2035 from latest/beta channel and the launcher described in comment 2.

The test plan screen is shown within 2 seconds, and I can execute it without any problem.

-> tested OK!

tags: added: cqa-verfiied
tags: added: cqa-verified
removed: cqa-verfiied
Changed in checkbox-ng:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.