image_uploader: use buildah instead of podman to manipulate images

Use "buildah" CLI instead of "podman" to manipulate the container images
when uploading the images.
Buildah vendoring seems to have more recent versions of the dependencies
which would avoid some lock issues during the image upload tasks.

Change-Id: I61b30c7c935a1530d78a93704e8528af7b6ebe7d
This commit is contained in:
Emilien Macchi 2019-04-08 16:31:49 -04:00
parent 313d715a8f
commit 3300af4827
2 changed files with 3 additions and 3 deletions

View File

@ -1234,7 +1234,7 @@ class PythonImageUploader(BaseImageUploader):
cls._assert_scheme(source_url, 'docker')
pull_source = source_url.netloc + source_url.path
LOG.info('Pulling %s' % pull_source)
cmd = ['podman', 'pull']
cmd = ['buildah', 'pull']
if source_url.netloc in [cls.insecure_registries,
cls.no_verify_registries]:
@ -1545,7 +1545,7 @@ class PythonImageUploader(BaseImageUploader):
if image_url.scheme != 'containers-storage':
raise ImageUploaderException('Delete not implemented for %s' %
image_url.geturl())
cmd = ['podman', 'rmi', image_url.path]
cmd = ['buildah', 'rmi', image_url.path]
LOG.info('Running %s' % ' '.join(cmd))
env = os.environ.copy()
process = subprocess.Popen(cmd, env=env, stdout=subprocess.PIPE,

View File

@ -1920,7 +1920,7 @@ class TestPythonImageUploader(base.TestCase):
self.uploader._delete(url)
)
mock_popen.assert_called_once_with([
'podman',
'buildah',
'rmi',
'/t/nova-api:latest'],
env={}, stdout=-1,