Commit Graph

16 Commits

Author SHA1 Message Date
Martin Hiner 53e8b80ed3 Add container engine option to scripts
This patch add a way to choose container engine inside tool and test
scripts. This is in preparation for Podman introduction but still
leaves Docker as default container engine.

Signed-off-by: Martin Hiner <m.hiner@partner.samsung.com>
Change-Id: I395d2bdb0dfb4b325b6ad197c8893c8a0f768324
2023-04-28 16:16:55 +02:00
Marc 'risson' Schmitt 839ec629bf
tools: use /usr/bin/env bash instead of /bin/bash
Signed-off-by: Marc 'risson' Schmitt <marc.schmitt@risson.space>
Change-Id: I374f7427a4318d00ca474367818117e11789ec13
2021-08-17 14:29:33 +02:00
Mark Goddard b123bf6621 Use become for all docker tasks
Many tasks that use Docker have become specified already, but
not all. This change ensures all tasks that use the following
modules have become:

* kolla_docker
* kolla_ceph_keyring
* kolla_toolbox
* kolla_container_facts

It also adds become for 'command' tasks that use docker CLI.

Change-Id: I4a5ebcedaccb9261dbc958ec67e8077d7980e496
2019-06-06 19:04:58 +01:00
wu.chunyang 4deefe3e92 remove unused library
trivial modify

Change-Id: I27d5b85d2c745fee5ff0643e7771b46faebd23a6
2018-12-12 10:30:20 +00:00
caoyuan 8cb57f54fa Ensure docker running before execute the destroy action
Before cleanup containers and hosts, it should be ensure the
docker serivce running but the destroy action missing it,
this patch to fix it

Change-Id: I85ca806c1fd395daf937b585d466e16fbad4e20c
Closes-Bug: #1741852
2018-01-08 16:35:41 +08:00
Bertrand Lallau f5624b21f9 Fix tools/cleanup-images script error
When cleanup-images is launch without parameters the following error is
triggered:
./cleanup-images: line 72: break: only meaningful in a `for', `while',
or `until' loop

This patch fix it.

Change-Id: Ie8c63420a4e9b0d49a4e6be4172c8f0be912b556
Closes-Bug: #1702496
2017-07-10 13:53:23 +00:00
Eduardo Gonzalez f6f99db4a2 Add cli options to cleanup-images
Allow remove all kolla images
Allow remove specific kolla version images
Allow remove dangling images
Allow remove single images, all images matched

Usage examples:
   * cleanup-images --all
     - Remove all kolla images
   * cleanup-images --image-version 4.0.0
     - Remove all images matching 4.0.0 kolla_version
   * cleanup-images --dangling
     - Remove all dangling images
   * cleanup-images --image nova
     - Remove all nova images
   * cleanup-images --image nova-scheduler
     - Only remove nova-scheduler image

Implements: blueprint add-cleanup-images-cli-options
Change-Id: I997272098879350e13e0ac00762ae3485e618355
2017-04-24 14:53:24 +02:00
Paul Bourke 731f0bb114 Add force flag to cleanup-images
TrivialFix

Change-Id: I83dfca7d0ad38411ac43ca89de439705a8e5aa12
2016-08-17 10:28:38 +00:00
Mauricio Lima e39074421e Add extension to file
TrivialFix

Change-Id: I161526927ae32f2bbfec1ade610f7b712f4c5163
2016-05-06 13:53:50 -04:00
Mauricio Lima 9024564066 Deleting only images from kolla build
Co-Authored-By: Carlos Cesario <carloscesario@gmail.com>
Change-Id: I3e9652e1cac156f822b388d2b9fd910180b4a892
Closes-Bug: #1551933
2016-05-05 12:15:04 -04:00
Steven Dake 77a67deeb6 Rename validate-docker-execute with .sh extension
TrivialFix

Change-Id: I3ad67fd802f7fe3ed7deb88eddebe520ff410a4f
2016-03-08 22:14:09 -07:00
Kai Qiang Wu(Kennan) da68e2eccc Improve scripts with some check before kick rm command
Closes-Bug: #1490387
Change-Id: I4a9476085b9c5b2cae3801e5b1954e85068f4e03
2015-08-31 05:13:59 +00:00
Swapnil Kulkarni 1f0acbd0cd Update scripts to check if docker is usable for $USER
Added new script for checking user permissions on
docker command execution

Change-Id: I3b727590d9a29f416f5b847912b7250c555c2333
Closes-Bug: #1473554
2015-07-14 09:38:49 +00:00
Martin André 6772962c72 Pass cleanup scripts arguments to docker
This allows to maintain the default behavior unchanged while making it
possible to force clean.

Follow-up to https://review.openstack.org/#/c/145921/

Change-Id: Ie5733b22bda9cdd7d08f5c5ecc5a3d94b984a125
2015-01-15 09:27:27 +09:00
Ryan Hallisey ae4cc56c14 Cleanup of images and containers needs a '-f' flag to force shutdown
Change-Id: I0642dcd36fe5af261b8f35744e3e88460a13fc85
2015-01-08 20:15:02 +00:00
Ryan Hallisey d2194febb5 Docker image and process cleaup tool
When running Docker, you can unknowingly use up a lot
of memory.  This tool will make it easier to clean up
Docker.

Change-Id: Icfd780f12b01956093a2933dd484cde1e2d6d5bc
2014-10-17 17:58:42 +00:00