Commit Graph

880 Commits

Author SHA1 Message Date
59630d4f7b Updated from global requirements
Change-Id: I8a161220b1619fb0fe6b0b4f66e9978f8339bc1f
2015-11-11 17:19:36 +00:00
2bce5f6065 Merge "Use oslo.log instead of original logging" 2015-11-02 17:44:19 +00:00
ec2cd617fb Merge "Updated from global requirements" 2015-11-02 17:44:15 +00:00
96e21042d8 Merge "Replace deprecated LOG.warn with LOG.warning" 2015-11-02 17:23:39 +00:00
9e75ba5460 Use oslo.log instead of original logging
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
2015-10-24 03:22:36 -06:00
037e3916da Updated from global requirements
Change-Id: I161201084a7d72b9a589e39d7255c876c29d24ed
2015-10-24 00:23:33 +00:00
5a962e4ac7 Merge "Use system random where applicable" 2015-10-23 00:07:32 +00:00
64bdf16b68 Merge "Refactor backoff looping call" 2015-10-23 00:07:12 +00:00
5fe02c0609 Merge "avoid duplicate text in ISCSIError message" 2015-10-22 19:36:15 +00:00
18d5d6aba3 Replace deprecated LOG.warn with LOG.warning
Change-Id: Ib3d566f6e608ee453659e15cabcf8e9332aedc52
Closes-Bug: #1508442
2015-10-22 14:42:57 +08:00
e51ccbe7c3 avoid duplicate text in ISCSIError message
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
2015-10-20 08:10:56 +02:00
fb920f41ed determine tgtd ready status through tgtadm
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
2015-10-20 04:52:59 +02:00
f042be51f4 Updated from global requirements
Change-Id: Ide13ef25690be8f5e0d340ceed7e3ed51c1edbf3
2015-10-19 23:28:11 +00:00
1aeef4dc0d Updated from global requirements
Change-Id: If92670ace5174aa65e1d9f8d66adb093715e3aae
2015-10-16 22:21:46 +00:00
90b4d15b41 Merge "Make calling arguments easier to understand" 2015-10-16 15:46:57 +00:00
f013333949 Add param docstring into the normalize func
This patch adds a missing param docstring into the normalize function
in util.py.

Change-Id: I91ecc0970fc386163657ab521d8cdd898694a426
Partial-bug: 1367915
2015-10-14 11:20:39 +09:00
06d34ae5d7 Make calling arguments easier to understand
Use keyword= when doing the call so easier for reader of code to know
what all the arguments are.

Change-Id: I4d781b533b15c6855a3d8ad95bb17bf9d153f1eb
2015-10-13 13:26:18 -07:00
b6c2eb6ca6 Merge "Ensure all methods in utils.py have docstrings" 2015-10-13 16:13:05 +00:00
ef57379342 Merge "Add LOG.debug() if requested device type not found" 2015-10-12 08:54:00 +00:00
e9ed54681a Merge "Reduce size of CoreOS ramdisk" 2015-10-10 01:20:04 +00:00
5e2735bb53 Merge "Babel is not a direct dependency" 2015-10-10 00:35:40 +00:00
6131b2e405 Ensure all methods in utils.py have docstrings
Previous some of these methods were not well documented. Hopefully they
now are.

Change-Id: If73987a2dd234b71a1c2af9b764becc34aee4496
Partial-bug: 1367915
2015-10-09 16:22:06 -07:00
7823240572 Updated from global requirements
Change-Id: I912baeaa10a758fa19fd4a462729775f95508602
2015-10-09 12:19:54 +00:00
0ef1ac37cc Merge "Move oslotest to test-requirements" 2015-10-09 08:26:39 +00:00
e7ca7c8635 Merge "Update gitignore" 2015-10-09 00:04:24 +00:00
4a248f3ea0 Merge "Use mount -t sysfs to avoid host /sys dependencies" 2015-10-08 09:54:43 +00:00
af20875e87 Update gitignore
Add files generated during CoreOS ramdisk build to gitignore.

Change-Id: Ia31004a5672e8926efe91c3a4fc591ff6a7159d7
2015-10-08 15:06:19 +09:00
5f7bc48707 Reduce size of CoreOS ramdisk
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
2015-10-08 14:58:23 +09:00
deb50ac5a8 Add LOG.debug() if requested device type not found
This is a follow-up patch for commit
3af9ab36bf

The review requested that a LOG.debug() message be added.

Change-Id: I36fbd4269c948812f4bee66d0130150afd0c0279
2015-10-07 17:07:23 -07:00
2c0ebdea09 Merge "Adds more functional tests for commands" 2015-10-07 09:23:18 +00:00
d538f5e478 Babel is not a direct dependency
The project does not uses Babel directly,
so it should not enumerate it as direct dependency.

Change-Id: I0e9721fdc5541d022adab62af1037f1b0b532901
2015-10-07 10:50:52 +02:00
27048ef3a2 Move oslotest to test-requirements
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
2015-10-07 09:48:52 +02:00
ebd7b076a5 Use mount -t sysfs to avoid host /sys dependencies
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
2015-10-07 03:29:18 +00:00
0414c014d9 Merge "Update the launchpad link for IPA" 2015-10-07 02:42:09 +00:00
aa908205c6 Merge "Refactor list_all_block_devices & add block_type param" 2015-10-07 02:42:07 +00:00
703fd45766 Merge "Updated from global requirements" 2015-10-07 00:47:15 +00:00
9eb329ca0e Update the launchpad link for IPA
We use now use http://launchpad.net/ironic-python-agent.

Change-Id: Id055bc460919f0b81a75fa10b4ff1160a8d2e19d
2015-10-07 00:31:18 +00:00
9efc1c1682 Updated from global requirements
Change-Id: I77006ab5622880c95e27f94e8a1462a7d74e4d21
2015-10-06 22:53:54 +00:00
5bbb9ded08 Fix log formatting error in iscsi.py
This fixes a ValueError exception that would occur if
log debug was enabled in IPA.

Change-Id: Id95f291dd77d69e7d4dd4f945c6c151db7a0646b
Closes-bug: #1503354
2015-10-06 22:47:54 +00:00
e7de4bba45 Open mitaka development
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
2015-10-06 17:40:26 +00:00
4a7b954d14 Adds more functional tests for commands
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
2015-10-06 15:36:27 +00:00
dcbba2b121 Enforce all flake8 rules except E129
Bring ironic-python-agent in line with the other ironic projects.

Stop ignoring all E12* errors except E129
Stop ignoring E711

Change-Id: Icb9bc198473d1b5e807c20869eb2af7f4d7ac360
2015-10-02 10:01:00 -07:00
0144e79df5 Updated from global requirements
Change-Id: Ia5982574312b48a9e96a9deaaec163dcf75e637f
1.0.0
2015-10-02 01:55:46 +00:00
b751f4debf Merge "Add "logs" and "extra-hardware" inspection collectors" 2015-10-02 00:23:06 +00:00
9d6b0864e3 Add "logs" and "extra-hardware" inspection collectors
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
2015-10-01 18:25:30 +02:00
e74cd66a4b Use doc8 style checker
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
2015-10-01 14:20:58 +00:00
378197caee Merge "Make the erase_devices clean step abortable" 2015-09-26 22:25:17 +00:00
cd70f514d6 Make the erase_devices clean step abortable
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
2015-09-26 19:01:26 +00:00
3af9ab36bf Refactor list_all_block_devices & add block_type param
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
2015-09-24 15:31:13 -07:00
7dba81f200 Merge "Fixes config drive creation failure in UEFI boot mode" 2015-09-24 04:42:48 +00:00