summaryrefslogtreecommitdiff
path: root/start-container-docker.sh
AgeCommit message (Collapse)Author
2021-03-22start-container-docker.sh: Move workaround for dockerhub's limitsMaxim Kuvyrkov
... to dockerfiles.git/tcwg-base/tcwg-host/docker-wrapper . Our workaround to dockerhub's pull limits in start-container-docker.sh works well, but with one exception -- it doesn't properly work when container is started on a remote host, which we do a lot in tcwg-benchmark-* jobs. To solve this we migrate workaround logic to docker wrapper script, and add a new docker command for it -- "maybepull". Change-Id: I131f1adc56052164a76c5dfaf9d07a4d2f24ec43
2021-02-02start-container-docker.sh: Workaround missing arm32v7/ubuntu:focal imageMaxim Kuvyrkov
Change-Id: Ic926732228ed76541632bd02acd6cf0674d28f6c
2021-01-20start-container-docker.sh: Add "lts" and "lts_1" values to --distro parameterMaxim Kuvyrkov
... which will be used in various CI loops to identify latest and latest-1 Ubuntu LTS releases. Presumably we will build and test master branches using latest LTS releases, and build and test stable release branches using LTS-1 releases. Change-Id: I0bd8dd5c8fcf5cac650fc76f8e995d7799c722fb
2021-01-04Docker image pull: And one more fixMaxim Kuvyrkov
... to ignore "docker rmi" failures on used images. Change-Id: I69fd40c45fe5f0b36e4b833097c2ac4e5a57b984
2021-01-03Docker image pull/use: Fix and improveMaxim Kuvyrkov
Change-Id: Ieb39c841151533d7553786f78f80fbb7a62857e2
2021-01-03Reduce "docker pull" requests to dockerhubMaxim Kuvyrkov
We attempt to run all our build using current versions of docker images. Unfortunately, now that dockerhub limits pull requests, we need to be more considerate to when we pull the image or attempt to use the local copy. This is the first stab at the problem. We use stamp files under /home/shared/docker/ to track times of last image pull and last image use. We then run "docker pull" on images that are older than a day to avoid using terribly-outdated local copies. We also switch to deleting images that haven't been used for 3+ days in tcwg-cleanup-stale-containers.sh -- instead of deleting all not-used-at- the-moment images. Change-Id: I3839fe030b30adaee318f7453c6d2e47185f4ffc
2020-10-12start-container-docker.sh: Use main system /homeMaxim Kuvyrkov
... and drop support for host-home docker volume. See https://review.linaro.org/c/ci/dockerfiles/+/36586 for rationale. Change-Id: Ic5f63df7296bc21002fee87ce78c4e1d855167fd
2020-08-31Increase memory allocation for build containersDiana Picus
Building flang needs more than 1GB per core and trying with 2GB per core surpasses the 30000 threshold. Use unlimited instead. Change-Id: Ibe1a06d5e529eaad9ea3b4a9d6c569a1171bed9c
2020-06-09start-container-docker.sh: Assert that the task parameter has an acceptable ↵Christophe Lyon
value This is currently either build, bench or test. Change-Id: I96fa7adad47e0bb8d95668462218fb21d08a2cd7
2020-05-18start-container-docker.sh: Only try to remove containers that existDavid Spickett
The current code is causing docker to print "ERROR <...>", which isn't an error for us and confuses the Jenkins log. Change-Id: I902bfb7ca66d781b23726785852381e41e4a76e4
2020-05-18start-container-docker.sh: Fix cleanup of $WORKSPACE/.lockMaxim Kuvyrkov
At the moment we add cleanup of $WORKSPACE/.lock only to v1 interface due to cat <<EOF CONTAINER_CLEANUP=${CONTAINER_CLEANUP}; <lock_cleanup> EOF not updating /current/ value of CONTAINER_CLEANUP, so <lock_cleanup> doesn't get added to ${prefix}container_cleanup() routine. This patches fixes this and somewhat simplifies the whole cleanup logic. Change-Id: I6b78e835876b6c1353b2a7501e3149c81ebbeefe
2020-04-30start-container-docker.shDavid Spickett
Fix shellcheck warnings. Don't change the usage of DOCKER, as we rely on it splitting on space to get the correct commands. Add shebang and disable unused var warning for generated container.sh script. Change-Id: Ia4617f6eeaec4de507adbcf106f7272d246cc217
2020-04-22Various shellcheck warning fixesDavid Spickett
First round of low hanging fruit from the files with the fewest warnings. Change-Id: I60ad57b5bfb2f0be9bb6506252c820f44d055200
2020-04-17tcwg-benchmark.sh: Minor fixesDavid Spickett
* Dedupe getting hostname for ssh toolchain URLs * Check toolchain type earlier * Error if SSH doesn't respond after reboot (and change the other uses of wait_for_ssh_server to follow the same format) Change-Id: Ib7823e5a83500e0d95912ef0d3ba993051a67533
2020-04-10tcwg-buildfarm.sh, start-container-docker.sh: Update default distro imageMaxim Kuvyrkov
... to Ubuntu Bionic. Change-Id: If70d24e100d53eab95050cd9beb762a3c506a004
2020-04-01Change default to use "master" docker imagesMaxim Kuvyrkov
... instead of "tcwg-tested" due to https://projects.linaro.org/browse/LSS-1153 , which causes tcwg-tested images to not being updated. Change-Id: I2222b87892b029b23eb1baeb28747b148addb345
2019-09-13Run benchmarks inside containersDiana Picus
This creates a new task ('bench') and starts a docker container to run the benchmarks in. It uses the same image as the 'build' task. Switching between aarch64 and aarch32 benchmarking breaks unless force install is requested because we only keep one version of the spec tools on the board. This will be fixed in a subsequent patch to bmk-scripts. Change-Id: Ie98cdf47aa3ed456e6349bac40d88bd7acaa7acd
2019-09-11start-container-docker.sh: Create workspace lock only when ...Christophe Lyon
... bind-mounting $WORKSPACE. Change-Id: I49d9081892e986f4dc437cef39fef337f3054ee6
2019-09-10start-container-docker.sh: Add missing quotesMaxim Kuvyrkov
Change-Id: I14b36d4fa8d01418fe3aa32f0fd592069ade522f
2019-09-10start-container-docker.sh: Make sure containers get all CPUsMaxim Kuvyrkov
Change-Id: Id3d3b323aaf2c0cfa26a7c0687b6feae7d476d88
2019-09-10start-container-docker.sh: Kill container of the previous [aborted] buildMaxim Kuvyrkov
In tcwg_bmk jobs we see a strange failure due to processes of aborted build (timeout) clobbering files of the next build. Specifically, a tcwg_bmk build can timeout waiting for tcwg-benchmark job to finish. In this case jenkins kills top-level processes, but it takes console I/O (I believe) for SIGHUP to propagate down the process tree. The tcwg-benchmark step of aborted build manages to write to artifacts/results_id file, which then can be used by the next build. Wrong data can even be stored in base-artifacts.git, thus clobbering subsequent builds. The solution in this patch adds puts docker container name in $WORKSPACE/.lock, and new builds remove these containers when they exist. We didn't observe this problem in other builds because we tended to wipe workspace clean before every build. We decided to keep workspace contents in round-robin jobs to reduce git clone overhead. Change-Id: Ic529c20a16c44ad357c11a30ebda2d30289887cc
2019-09-02jenkins-helpers.sh: Fix print_bind_mounts()Maxim Kuvyrkov
... by looking at the right filesystem. Change-Id: I42e3a5d942b469e983a84e09fc7a11856b81abde
2019-09-02start-container-docker.sh: Better handle non-home mountsMaxim Kuvyrkov
... by not trying to create directories outside of /home. Change-Id: I466be66f7813af5a4f8a7d4fbbdfa2bc976b564f
2019-08-29start-container-docker.sh: More dry-run friendlyDiana Picus
Add a few more $dryruncmd before commands that would otherwise run even in dry-run mode. Change-Id: Ia539c159ef6d4b99dfe0ae87344b3f3908e59a2e
2019-08-29start-container-docker.sh: Fix container startup on remote targetMaxim Kuvyrkov
Fix conversion of bind-mount paths for remote host-container-enabled targets. At the moment we check whether current machine is host-container-enabled (and convert paths), rather than the target. Change-Id: Iccb48cc9533d9674a00064c55c47751f8e115ffc
2019-08-19start-container-docker.sh: Remove most of ssh tracesChristophe Lyon
Now that we have debugged & fixed the race condition thanks to ssh -S none, we can remove most of ssh traces to make logs easier to read. Change-Id: I4d7e1d1e174edb56ba6446069d4349ab947fd943
2019-08-16start-container-docker.sh: Invoke ssh with "-S none"Christophe Lyon
to avoid race conditions with several builds in parallel. This is likely causing the random ssh errors we have been facing. Change-Id: I28f3bdcedd6a41f60adb19975a65bcbde7cef7b8
2019-08-12start-container-docker.sh: Make ssh verbose in more casesChristophe Lyon
to help catch random errors Change-Id: Ibb32a8b93de85baa8ac342f5d573b1cbcfee26db
2019-08-12start-container-docker.sh: Set pipefail to catch more ssh errorsChristophe Lyon
Change-Id: Id04450f8e896821d8c5596b34a801574f260141d
2019-08-12start-container-docker.sh: Add 'ssh -v' calls to get more debug tracesChristophe Lyon
We still experience random ssh connexion failures, and need more info to debug the problem. Change-Id: I72d49a41985e50624fca3fb49be083267cd33b8b
2019-06-25start-container-docker.sh: Add more debug tracesChristophe Lyon
Change-Id: I360f75bce9da48c349fe80ce028f741e6cf7522b
2019-06-25start-container-docker.sh: Try to get more debug info in case ssh returns ↵Christophe Lyon
with 255 as error code. Change-Id: Iade086ffcc1acb1cbea6aaec47f3191ce771d4cf
2019-06-17start-container-docker.sh: Report ssh error codesChristophe Lyon
We have noticed random errors because ssh seems to fail. Detect such cases and print the error code, to help debug the problem. Change-Id: I05f909410cea30157bd78e79975d6dc0349b59bb
2019-06-12start-container-docker.sh: Try to continue if docker run returns an errorChristophe Lyon
In some cases, docker run returns a session_id, but it seems it returns an error code (or maybe ssh does). Try to continue if a session_id was generated, and print some information to help debug. Change-Id: I8eaa81cafe8b8dc3da5bbedf6537a97537d3c7a3
2019-03-21start-container-docker.sh, jenkins-helpers.sh: Add --ssh_info optionChristophe Lyon
The new boolean --ssh_info option of start-container-docker.sh enables passing ssh_host and ssh_port variables to the command executed in the container via the environment. The remote_exec helper is enhanced to support passing environment variables. Change-Id: Ic068220d52541ada2ea6b4a26f40730788babf9d
2018-11-06start-container-docker.sh: Add ccache volume handlingMaxim Kuvyrkov
... by adding new print_volume_mounts helper. Change-Id: Ifaaf4c2a9f60b74cbf2ee54f28c49e3135b1c1e4
2018-10-08start-container-docker.sh: Print resources usage informationChristophe Lyon
Dump memory and pids usage information at cleanup time. This is useful for debugging and tuning container limits. Change-Id: I9b974cdce3cf5fad0d5da6ee7883a70f46697466
2018-08-10print_memory_limit: Make suitable for high-core-count machinesMaxim Kuvyrkov
Allocate up to 30GB per container on high-core-count machines. This change doesn't affect APMs, TK1s and TX1s much. Change-Id: Ibde348b0f01d0e1d46dafc4e0dee3c5c0a0c4c0c
2018-06-28tcwg-buildfarm.sh: Fix session_name for start-container-docker.Maxim Kuvyrkov
Make sure session_name has only allowed characters. Change-Id: I12820281f758841170f3a9aef5d7ed20e33a214e
2018-06-28start-container-docker: Fix handling of architecture without host/node/labelMaxim Kuvyrkov
Fix docker image architecture detection when no host/node/label option is given -- e.g., when called via docker-run.sh. Change-Id: I1bf08668376c07e5380816a0681aa67f7a856f71
2018-06-26start-container-docker.sh: Use FQDN to ssh to local container.Maxim Kuvyrkov
For VPN'ed machines FQDN ends with .tcwglab, which is exactly what we want. For external machines we have entries in .ssh/config with connection details. Change-Id: I9e53ce8d2ba4fd6c25d760ce890d898f96dbe27a
2018-06-24start-container-*.sh: Rework bind-mount handlingMaxim Kuvyrkov
... to fix problem with starting build containers from host containers. Change-Id: I78176ab0afee5952d212fc33d9a699497533bad2
2018-06-24start-container-docker.sh: Remove workaround.Maxim Kuvyrkov
We no longer need to add .tcwglab to localhost; we've fixed .ssh/config of tcwg-buildslave to use correct ssh settings. Change-Id: Id1d42cd44c7984a34404e285ee2e7110b186b903
2018-06-24start-container-docker.sh: Use file socket for accessing docker daemonMaxim Kuvyrkov
Note that user needs to be in the "docker" group for file socket access to work. We workaround this on packet.net machines by defining a helper "docker" wrapper which does 'sudo /usr/bin/docker "$@"' in "host" container images. Change-Id: Iefb569132dd7fba19f9e070711d3cdba2a4b1fcc
2018-06-24start-docker-container.sh: Add --verbose true/false option.Maxim Kuvyrkov
Change-Id: Iaf7818cf3d73c69a3256b848c359daca27853eba
2018-06-18start-container-docker.sh: Remove unnecessary option.Maxim Kuvyrkov
We now have "--newuser user" option fetch proper ssh keys from home-data/. Change-Id: I771f72e7b0beae1f6a3c0f7ce08c522aeb53cc0b
2018-06-16start-container-docker.sh: Move default distro setting to one place.Maxim Kuvyrkov
Change-Id: I22c27660225d3cb54b71c469eb5e011bfb0dd64c
2018-06-07start-container-docker.sh: Fix dryrun mode.Maxim Kuvyrkov
Change-Id: I88e6d32a0d266eaa41c3c2185a482d40a464f213
2018-06-07start-container-docker.sh: Add --dryrun parameter.Christophe Lyon
This boolean selects whether to actually run commands in the container. If false, we keep the usual behaviour, and if true, the CONTAINER, CONTAINER_RSH and container_exec helpers are modified to only print what they would normally execute. Change-Id: Ia85d528f1f4665c92c6415c053080d4a3c3e018d
2018-06-01*.sh: Switch to *-tcwg-tested docker images.Maxim Kuvyrkov
Change-Id: I0abd9f0c7ec0da98990459cf175eb4e076bdab8d