Attention is currently required from: Hoernchen, laforge, osmith.

Hello Hoernchen, Jenkins Builder, laforge, osmith,

I'd like you to reexamine a change. Please visit

    https://gerrit.osmocom.org/c/docker-playground/+/36836?usp=email

to look at the new patch set (#2).


Change subject: ttcn3-docker-run.sh: Fix dumpcap failing to access /data inside 
docker
......................................................................

ttcn3-docker-run.sh: Fix dumpcap failing to access /data inside docker

In docker, the /data dir is mapped to $VOL_BASE_DIR, which is created by
docker-playground.git jenkins-common.sh, hence as the user running
jenkins.sh in the host system.
As a result, when the dir is mapped to /data, inside the container it
will have the UID:GID of the outter user, not the one inside docker.

Before this patch, if a ttcn3 container was started in jenkins.sh with
--cap-add=NET_ADMIN, then osmo-ttcn3-hacks.git/ttcn3-tcpdump-start.sh
would select dumpcap instead of tcpdump, to attempt to record a pcap
file to /data/$testcase.pcap.
Due to some unknown way of dropping privileges done by dumpcap though,
it was unable to open the /data/$testcase.pcap due to /data being owned
to another user (tcpdump doesn't have this problem).

This patch fixes the above scenario by making sure /data is chowned to
the user running stuff inside docker. This is already kinda expected
since there's a fix_perms() script in jenkins-common.sh reverting files
created during the test so that they can be accessible by outter user
once everything is finished.

Change-Id: I1229a91cdbb1aa73fd94f1bf7e26f34086f06b25
---
M common/ttcn3-docker-run.sh
1 file changed, 32 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/docker-playground 
refs/changes/36/36836/2
--
To view, visit https://gerrit.osmocom.org/c/docker-playground/+/36836?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-Change-Id: I1229a91cdbb1aa73fd94f1bf7e26f34086f06b25
Gerrit-Change-Number: 36836
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pes...@sysmocom.de>
Gerrit-Reviewer: Hoernchen <ew...@sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <lafo...@osmocom.org>
Gerrit-Reviewer: osmith <osm...@sysmocom.de>
Gerrit-Attention: osmith <osm...@sysmocom.de>
Gerrit-Attention: Hoernchen <ew...@sysmocom.de>
Gerrit-Attention: laforge <lafo...@osmocom.org>
Gerrit-MessageType: newpatchset

Reply via email to