Skip to content

Commit

Permalink
Allow to use podman's default settings for driver
Browse files Browse the repository at this point in the history
  • Loading branch information
boehmseb committed Aug 21, 2023
1 parent 5f61a2b commit b05d4d0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
11 changes: 6 additions & 5 deletions benchbuild/environments/adapters/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def path_longer_than_50_chars(path: str) -> bool:
def wrapped_cmd(*args: str) -> BaseCommand:
root = CFG['container']['root']
runroot = CFG['container']['runroot']
storage_driver = CFG['container']['storage_driver']
storage_driver = CFG['container']['storage_driver'].value
storage_opts = CFG['container']['storage_opts'].value

if path_longer_than_50_chars(str(root)):
Expand All @@ -62,10 +62,11 @@ def wrapped_cmd(*args: str) -> BaseCommand:
'%s - %s', runroot.__to_env_var__(), __MSG_SHORTER_PATH_REQUIRED
)

opts = [
'--root', root, '--runroot', runroot,
'--storage-driver', storage_driver,
]
opts = ['--root', root, '--runroot', runroot]

if storage_driver:
opts.append('--storage-driver')
opts.append(storage_driver)

if storage_opts is None:
# ignore options set in 'storage.conf'
Expand Down
3 changes: 2 additions & 1 deletion benchbuild/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -383,8 +383,9 @@
"desc": "Path to benchbuild's source directory"
},
"storage_driver": {
"default": "vfs",
"default": None,
"desc": "Storage driver for containers."
"If 'null' use podman's default."
},
"storage_opts": {
"default": [],
Expand Down

0 comments on commit b05d4d0

Please sign in to comment.