We are using oslo.log now, but some of the modules still use logging.
We should use oslo.log to keep consistency, besides, oslo.log can
provide fine wrapper for OpenStack projects.
Change-Id: Ibe57e503b88b39e284a9e4b11a1886cd4e8d4ccf
The ISCSIError class defines a class-level message attribute with
value: "Error starting iSCSI target". This attribute is further
processed in RESTError.__init__ method, the ISCSIError super-class, to
create an Exception message concatenating self.message with provided
details argument. However, the ISCISError.__init__ method provides a
details attribute prefixed with the same text to the super(ISCSIError,
self).__init__ method. As a result, the text appears twice:
"ISCSIError: Error starting iSCSI target: Error starting iSCSI target:
ISCSI daemon didn't initialize. Failed with exit code 107. stdout: .
stderr: tgtadm: failed to send request hdr to tgt daemon, Transport
endpoint is not connected"
The patch purpose is to remove the details prefix to avoid duplicate
text in the exception text while honouring ISCSIError.message.
Change-Id: I9e1434ae17da5112527a841ac069ed2285566cca
The intention of the iscsi extension _wait_for_iscsi_daemon function
is to wait till the tgtd process boots completely before running any
iscsi commands through the tgtadm command line utility. The tgtd
process utilises a unix socket for communication with the user and the
_wait_for_iscsi_daemon function asserts the tgtd process status based
on the socket presence. The socket name/path to use is not specified
by iscsi extension configuration but rather falls-back to a
(system-wide) default value[1]. Since tgtd version 1.0.60, this path
changed from /var/run/tgtd.ipc_abstract_namespace to
/var/run/tgtd/socket[2] and now causes a false-negative while waiting
for the tgtd process to boot[3].
This patch follows implementation suggestion from the bug report[3] to
avoid relying on the socket presence but rather to check the tgtd
status by trying to communicate through the tgtadm tool.
[1] https://github.com/openstack/ironic-python-agent/blob/
5bbb9ded082f2cfde5e8877e9f33294eb93a5fb7/
ironic_python_agent/extensions/iscsi.py#L47 [2]
https://github.com/fujita/tgt/commit/
d1aa4dcfd691c9409dbad5db49ce6754ce9c1b5a
[3] https://bugs.launchpad.net/ironic-python-agent/+bug/1505923
Closes-Bug: #1505923
Change-Id: If3284e0b441fe6c2da507640c08a4bbefd9dad2b
This patch adds a missing param docstring into the normalize function
in util.py.
Change-Id: I91ecc0970fc386163657ab521d8cdd898694a426
Partial-bug: 1367915
Previous some of these methods were not well documented. Hopefully they
now are.
Change-Id: If73987a2dd234b71a1c2af9b764becc34aee4496
Partial-bug: 1367915
By disabling pip cache, we're able to reduce the size of generated
docker image by 10%. The resulting ramdisk size goes from 229MB to
218MB.
It is possible to decrease the size even further by combining all the
RUN instructions into one but it doesn't provide a substantial gain and
it harms readability.
Change-Id: Ie23636fe709ab7c1bcf4d6c51299c173a5b642ac
This is a follow-up patch for commit
3af9ab36bf
The review requested that a LOG.debug() message be added.
Change-Id: I36fbd4269c948812f4bee66d0130150afd0c0279
The requirements.txt is for the runtime dependencies,
the oslotest is test time dependency so it belongs to the
test-requirements.txt.
Change-Id: I5ab6d65d62fe3d43d7a5980b75b2258615be4dd9
This patch updates the _install_grub2 function in image.py
so that we use 'mount -t sysfs' instead of bind mounting
the hosts /sys into the chroot.
This resolves issues which can occur with unmounting
the chroot mounts where 'target is busy' errors
may occur when you are debugging things with a serial
console.
Change-Id: I5c9a6546d048cbf54695329d9744fda55127bd30
Closes-bug: #1503385
This fixes a ValueError exception that would occur if
log debug was enabled in IPA.
Change-Id: Id95f291dd77d69e7d4dd4f945c6c151db7a0646b
Closes-bug: #1503354
Update the pre-versioning version number to the next value that can
include new features to tell pbr that the version in setup.cfg and the
recent 1.0.0 tag do not conflict.
Change-Id: I1c9c8e4b8a821fb3a2727a49d6f0f45e43d41218
This adds additional functional tests for the commands API.
It also restructures the current functional test to run in
sequence as a monolithic test to preserve IPA state and test
order between test runs. The time to wait for IPA to start
was increased due to an intermittent race condition that
occurs with the larger test suite.
Partial-Bug: 1492036
Change-Id: Iff9b41fb531d34225d702b9bfd39826e3c7195ad
Bring ironic-python-agent in line with the other ironic projects.
Stop ignoring all E12* errors except E129
Stop ignoring E711
Change-Id: Icb9bc198473d1b5e807c20869eb2af7f4d7ac360
This is a port of downstream inspector ramdisk plugins we found helpful.
* logs - sends journald logs with inspection data.
* extra-hardware - uses hardware-detect utility to collect bigger
hardware inventory and to run benchmarks.
Change-Id: If05402606c45185d618279eef46e68c51209f82b
This uses the doc8 style checker to check that document files
conform to certain requirements, as documented at
https://pypi.python.org/pypi/doc8.
The README was modified because it had several lines that were
were longer than 79 characters, and some links were fixed.
Change-Id: Ia21b680ec227357ada58326fea104696561475d5
This patches updates the get_clean_steps() method to make the
erase_devices step abortable. Erasing devices is something that can be
cancelled without damaging the machine.
When a clean step is aborted the provision state of the Ironic node
will go to CLEANFAIL state. The operator can then do what is needed to
fix the problem (i.e network booting issues) and restart the cleaning
later on.
Partial-Bug: #1455825
Change-Id: Ic181ac3712810c6f6925e8b627ee79e77ecf4d83
Put the columns to retrieve from lsblk into a list so that future
modifications to columns will require fewer code changes.
Also add a 'block_type' parameter which defaults to 'disk'. To make the
function more flexible if callers wanted a different block type.
Update and add unit tests
Change-Id: If06460e13a5b56dc8d6efca9ff5b58ac6ba1f357