Merge "Add the missing argument in CommandError"
This commit is contained in:
commit
a1bb8fe016
@ -1121,10 +1121,12 @@ class DockerDriver(driver.ContainerDriver):
|
||||
(output, err) = utils.execute('df', '-B', '1G',
|
||||
CONF.docker.docker_data_root,
|
||||
run_as_root=True)
|
||||
except exception.CommandError:
|
||||
except exception.CommandError as e:
|
||||
LOG.info('There was a problem while executing df -B 1G %s',
|
||||
CONF.docker.docker_data_root)
|
||||
raise exception.CommandError(cmd='df')
|
||||
raise exception.CommandError(cmd='df',
|
||||
error=six.text_type(e))
|
||||
|
||||
total_disk = int(output.split('\n')[1].split()[1])
|
||||
return int(total_disk * (1 - CONF.compute.reserve_disk_for_image))
|
||||
|
||||
|
@ -15,6 +15,7 @@
|
||||
|
||||
from oslo_concurrency import processutils
|
||||
from oslo_serialization import jsonutils
|
||||
import six
|
||||
|
||||
from zun.common import exception
|
||||
from zun.common import utils
|
||||
@ -85,8 +86,9 @@ class Host(object):
|
||||
columns = line.split()
|
||||
address = columns[0]
|
||||
addresses.append(address)
|
||||
except processutils.ProcessExecutionError:
|
||||
raise exception.CommandError(cmd='lspci')
|
||||
except processutils.ProcessExecutionError as e:
|
||||
raise exception.CommandError(cmd='lspci',
|
||||
error=six.text_type(e))
|
||||
|
||||
pci_info = []
|
||||
for addr in addresses:
|
||||
|
Loading…
x
Reference in New Issue
Block a user