Merge "Bump hacking to 3.0.0"
This commit is contained in:
commit
68a71513f0
@ -237,8 +237,7 @@ class IronicPythonAgent(base.ExecuteCommandMixin):
|
|||||||
# a mid-cluster upgrade case with long-running ramdisks.
|
# a mid-cluster upgrade case with long-running ramdisks.
|
||||||
if (not token and self.agent_token
|
if (not token and self.agent_token
|
||||||
and not self.agent_token_required):
|
and not self.agent_token_required):
|
||||||
# TODO(TheJulia): Rip this out during or after the V
|
# TODO(TheJulia): Rip this out during or after the V cycle.
|
||||||
# cycle.
|
|
||||||
LOG.warning('Agent token for requests are not required '
|
LOG.warning('Agent token for requests are not required '
|
||||||
'by the conductor, yet we received a token. '
|
'by the conductor, yet we received a token. '
|
||||||
'Cluster may be mid-upgrade. Support to '
|
'Cluster may be mid-upgrade. Support to '
|
||||||
|
@ -111,8 +111,8 @@ def _get_partition(device, uuid):
|
|||||||
# device has a partition (which we assume to contain the root fs).
|
# device has a partition (which we assume to contain the root fs).
|
||||||
if hardware.is_md_device(device):
|
if hardware.is_md_device(device):
|
||||||
md_partition = device + 'p1'
|
md_partition = device + 'p1'
|
||||||
if (os.path.exists(md_partition) and
|
if (os.path.exists(md_partition)
|
||||||
stat.S_ISBLK(os.stat(md_partition).st_mode)):
|
and stat.S_ISBLK(os.stat(md_partition).st_mode)):
|
||||||
LOG.debug("Found md device with partition %s",
|
LOG.debug("Found md device with partition %s",
|
||||||
md_partition)
|
md_partition)
|
||||||
return md_partition
|
return md_partition
|
||||||
|
@ -416,12 +416,12 @@ def _validate_image_info(ext, image_info=None, **kwargs):
|
|||||||
os_hash_algo = image_info.get('os_hash_algo')
|
os_hash_algo = image_info.get('os_hash_algo')
|
||||||
os_hash_value = image_info.get('os_hash_value')
|
os_hash_value = image_info.get('os_hash_value')
|
||||||
if os_hash_algo or os_hash_value:
|
if os_hash_algo or os_hash_value:
|
||||||
if (not isinstance(os_hash_algo, str) or
|
if (not isinstance(os_hash_algo, str)
|
||||||
not os_hash_algo):
|
or not os_hash_algo):
|
||||||
raise errors.InvalidCommandParamsError(
|
raise errors.InvalidCommandParamsError(
|
||||||
'Image \'os_hash_algo\' must be a non-empty string.')
|
'Image \'os_hash_algo\' must be a non-empty string.')
|
||||||
if (not isinstance(os_hash_value, str) or
|
if (not isinstance(os_hash_value, str)
|
||||||
not os_hash_value):
|
or not os_hash_value):
|
||||||
raise errors.InvalidCommandParamsError(
|
raise errors.InvalidCommandParamsError(
|
||||||
'Image \'os_hash_value\' must be a non-empty string.')
|
'Image \'os_hash_value\' must be a non-empty string.')
|
||||||
os_hash_checksum_avail = True
|
os_hash_checksum_avail = True
|
||||||
|
@ -339,9 +339,9 @@ def list_all_block_devices(block_type='disk',
|
|||||||
# Other possible type values, which we skip recording:
|
# Other possible type values, which we skip recording:
|
||||||
# lvm, part, rom, loop
|
# lvm, part, rom, loop
|
||||||
if devtype != block_type:
|
if devtype != block_type:
|
||||||
if (devtype is not None and
|
if (devtype is not None
|
||||||
any(x in devtype for x in ['raid', 'md']) and
|
and any(x in devtype for x in ['raid', 'md'])
|
||||||
not ignore_raid):
|
and not ignore_raid):
|
||||||
LOG.debug(
|
LOG.debug(
|
||||||
"TYPE detected to contain 'raid' or 'md', signifying a "
|
"TYPE detected to contain 'raid' or 'md', signifying a "
|
||||||
"RAID volume. Found: {!r}".format(line))
|
"RAID volume. Found: {!r}".format(line))
|
||||||
@ -930,8 +930,8 @@ class GenericHardwareManager(HardwareManager):
|
|||||||
if sys_child['id'] == 'core':
|
if sys_child['id'] == 'core':
|
||||||
for core_child in sys_child['children']:
|
for core_child in sys_child['children']:
|
||||||
if _MEMORY_ID_RE.match(core_child['id']):
|
if _MEMORY_ID_RE.match(core_child['id']):
|
||||||
if (not core_child.get("children") and
|
if (not core_child.get("children")
|
||||||
core_child.get('size')):
|
and core_child.get('size')):
|
||||||
value = ("%(size)s %(units)s" % core_child)
|
value = ("%(size)s %(units)s" % core_child)
|
||||||
physical += int(UNIT_CONVERTER(value).to
|
physical += int(UNIT_CONVERTER(value).to
|
||||||
('MB').magnitude)
|
('MB').magnitude)
|
||||||
@ -1400,7 +1400,7 @@ class GenericHardwareManager(HardwareManager):
|
|||||||
cmd = "ipmitool lan6 print {} {}_addr".format(
|
cmd = "ipmitool lan6 print {} {}_addr".format(
|
||||||
channel, 'dynamic' if dynamic else 'static')
|
channel, 'dynamic' if dynamic else 'static')
|
||||||
try:
|
try:
|
||||||
out, e = utils.execute(cmd, shell=True)
|
out, exc = utils.execute(cmd, shell=True)
|
||||||
except processutils.ProcessExecutionError:
|
except processutils.ProcessExecutionError:
|
||||||
return
|
return
|
||||||
|
|
||||||
@ -1409,9 +1409,9 @@ class GenericHardwareManager(HardwareManager):
|
|||||||
# dynamic_addr and static_addr commands is a valid yaml.
|
# dynamic_addr and static_addr commands is a valid yaml.
|
||||||
try:
|
try:
|
||||||
out = yaml.safe_load(out.strip())
|
out = yaml.safe_load(out.strip())
|
||||||
except yaml.YAMLError as e:
|
except yaml.YAMLError as excpt:
|
||||||
LOG.warning('Cannot process output of "%(cmd)s" '
|
LOG.warning('Cannot process output of "%(cmd)s" '
|
||||||
'command: %(e)s', {'cmd': cmd, 'e': e})
|
'command: %(e)s', {'cmd': cmd, 'e': excpt})
|
||||||
return
|
return
|
||||||
|
|
||||||
for addr_dict in out.values():
|
for addr_dict in out.values():
|
||||||
@ -1446,9 +1446,9 @@ class GenericHardwareManager(HardwareManager):
|
|||||||
except ValueError as exc:
|
except ValueError as exc:
|
||||||
LOG.warning('Invalid IP address %s: %s', address, exc)
|
LOG.warning('Invalid IP address %s: %s', address, exc)
|
||||||
continue
|
continue
|
||||||
except (processutils.ProcessExecutionError, OSError) as e:
|
except (processutils.ProcessExecutionError, OSError) as exc:
|
||||||
# Not error, because it's normal in virtual environment
|
# Not error, because it's normal in virtual environment
|
||||||
LOG.warning("Cannot get BMC v6 address: %s", e)
|
LOG.warning("Cannot get BMC v6 address: %s", exc)
|
||||||
return
|
return
|
||||||
|
|
||||||
return '::/0'
|
return '::/0'
|
||||||
@ -1759,7 +1759,7 @@ class GenericHardwareManager(HardwareManager):
|
|||||||
LOG.debug('Removing partitions on %s', holder_disk)
|
LOG.debug('Removing partitions on %s', holder_disk)
|
||||||
try:
|
try:
|
||||||
utils.execute('wipefs', '-af', holder_disk)
|
utils.execute('wipefs', '-af', holder_disk)
|
||||||
except processutils.ProcessExecutionError as e:
|
except processutils.ProcessExecutionError:
|
||||||
LOG.warning('Failed to remove partitions on %s',
|
LOG.warning('Failed to remove partitions on %s',
|
||||||
holder_disk)
|
holder_disk)
|
||||||
|
|
||||||
|
@ -181,12 +181,12 @@ def _get_vmedia_params():
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
stdout, stderr = execute("umount", vmedia_mount_point)
|
stdout, stderr = execute("umount", vmedia_mount_point)
|
||||||
except processutils.ProcessExecutionError as e:
|
except processutils.ProcessExecutionError:
|
||||||
pass
|
pass
|
||||||
finally:
|
finally:
|
||||||
try:
|
try:
|
||||||
shutil.rmtree(vmedia_mount_point)
|
shutil.rmtree(vmedia_mount_point)
|
||||||
except Exception as e:
|
except Exception:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
return params
|
return params
|
||||||
|
@ -22,7 +22,7 @@ flake8-import-order==0.13
|
|||||||
flake8==2.5.5
|
flake8==2.5.5
|
||||||
future==0.16.0
|
future==0.16.0
|
||||||
greenlet==0.4.13
|
greenlet==0.4.13
|
||||||
hacking==1.0.0
|
hacking==3.0.0
|
||||||
idna==2.6
|
idna==2.6
|
||||||
imagesize==1.0.0
|
imagesize==1.0.0
|
||||||
ironic-lib==2.17.0
|
ironic-lib==2.17.0
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
# The order of packages is significant, because pip processes them in the order
|
# The order of packages is significant, because pip processes them in the order
|
||||||
# of appearance. Changing the order has an impact on the overall integration
|
# of appearance. Changing the order has an impact on the overall integration
|
||||||
# process, which may cause wedges in the gate later.
|
# process, which may cause wedges in the gate later.
|
||||||
hacking>=1.0.0,<1.1.0 # Apache-2.0
|
hacking>=3.0.0,<3.1.0 # Apache-2.0
|
||||||
coverage!=4.4,>=4.0 # Apache-2.0
|
coverage!=4.4,>=4.0 # Apache-2.0
|
||||||
mock>=2.0.0 # BSD
|
mock>=2.0.0 # BSD
|
||||||
testtools>=2.2.0 # MIT
|
testtools>=2.2.0 # MIT
|
||||||
|
Loading…
x
Reference in New Issue
Block a user