Skip to content
This repository was archived by the owner on Sep 7, 2020. It is now read-only.

Feature/ppm 331 tcpdump outside#1591

Draft
odkq wants to merge 12 commits intomasterfrom
feature/PPM-331-tcpdump-outside
Draft

Feature/ppm 331 tcpdump outside#1591
odkq wants to merge 12 commits intomasterfrom
feature/PPM-331-tcpdump-outside

Conversation

@odkq
Copy link
Collaborator

@odkq odkq commented Aug 10, 2020

This uses a pre-existing bridge created before running docker-compose to:

Run all dumpcap captures, as child processes of dctest.py
Stablish a simple rpc between tests/sniffer.py and the outside dctest.py to run the tests with the expected filenames for output

odkq and others added 10 commits August 6, 2020 17:17
Use directly the hostname instead of querying for the ip

Signed-off-by: pablo <pablo@odkq.com>
Entrypoint calls the json for "in compose" tests

Signed-off-by: pablo <pablo@odkq.com>
Dockerfile to create boardfarm docker image and docker-compose.yml with
the configuration for boardfarm, controller and extender

Signed-off-by: pablo <pablo@odkq.com>
It wraps docker-compose tests

- Verifies versions of docker and docker-compose
- Creates and launches boardfarm image with the correct environment
  variables
- Cleans images after building
- Returns value from boardfarm process inside the image

Signed-off-by: pablo <pablo@odkq.com>
Signed-off-by: pablo <pablo@odkq.com>
Signed-off-by: pablo <pablo@odkq.com>
Signed-off-by: pablo <pablo@odkq.com>
The status are failing in CI.

The name of the container was hardcoded by mistake, use docker_name
instead.

Signed-off-by: Raphaël Mélotte <raphael.melotte@mind.be>
Signed-off-by: odkq <pablo@odkq.com>
Signed-off-by: Raphaël Mélotte <raphael.melotte@mind.be>
Changes to allow 'remote execution' of dumpcap from the host bridge when
the test does the capture.

docker-compose.yml: Use pre-existing docker network

dctest.py: Create bridge beforehand and launch a thread that listens on
<bridge ip>:9997 for the parameters to start dumpcap. Once received,
instance the Sniffer() class from tests/sniffer.py to launch dumpcap,
not on the internal bridge created by the prplmesh entrypoint, but on
the docker bridge

tests/sniffer.py: Use the command_client() function from dctest.py
(importing it) to send the data in Sniffer.start() when remote execution
is requested

Signed-off-by: pablo <pablo@odkq.com>
@odkq odkq self-assigned this Aug 10, 2020
odkq added 2 commits August 10, 2020 16:58
This will finish orderly the dumpcap process in dctest.py when stop() is called from
the test.

Also, many aesthetic changes to pass PEP-8

Signed-off-by: pablo <pablo@odkq.com>
In case it was dangling out from an earlier failed test

Signed-off-by: pablo <pablo@odkq.com>
networks:
default:
external:
name: dctest-network
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a quick note while I'm passing by: this needs to use the unique ID of the job as well (so CI_PIPELINE_ID does the trick in CI. Locally using the username is enough for most people).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants