12 Commits

Author SHA1 Message Date
Dmitry Tantsur
ac95888059 Drop an explicit requirement of oslo.log
This library is designed for leaf applications (services, CLI). For
libraries it's enough to use the generic logging.

Unit tests needed adjustment since LOG.exception is implemented via
LOG.error internally.

Change-Id: I943e1f07a23e76354966acae5e4594e41dd4822b
2021-08-20 17:13:24 +02:00
Riccardo Pittau
e7a35e41f1 Remove default parameter from execute
The param check_exit_code from the processutils extension execute has
default already at [0]
See:
https://opendev.org/openstack/oslo.concurrency/src/branch/master/oslo_concurrency/processutils.py#L214

Change-Id: Ia0f42bf3de9c074a1212859352b5c5e1abe7eed8
2021-02-25 11:22:01 +01:00
Michael Turek
2b540a00bb Add logic to create PReP partition for ppc64* arch
When booting a partition image localy, ppc64* expects an 8 MiB
partition, with the prep and boot flags set, containing the
bootloader [0]. This patch adds logic to ironic-lib to create
the parition with these flags when the node has a ppc64* arch.

[0] https://www.ibm.com/developerworks/community/wikis/home?lang=en#!/wiki/W51a7ffcf4dfd_4b40_9d82_446ebc23c550/page/PowerLinux%20Boot%20howto

Change-Id: I8f9748dd58146bfb2411c229b02969e0faf18222
Story: #1749057
Task: #22998
2018-07-16 14:26:50 +00:00
Nikolay Fedotov
0d65451cfc Add wait_for_disk to destroy_disk_metadata function
* Move _wait_for_disk_to_become_available function
  from DiskPartitioner class to utils.py
* Call the wait_for_disk_to_become_available during
  the destroy_disk_metadata metadata to ensure that
  nothing is using disk and preventing metadata
  from being destroyed.

Change-Id: I9134b4cfdf15ba9610b4d1f844e64858d69713a5
Closes-Bug: #1739421
2018-01-17 08:45:36 -08:00
John L. Villalovos
2547573407 Remove translation of log messages
Remove translation of log messages. Log messages will no longer be
translated.

Closes-Bug: #1674374
Change-Id: I66791c08e335c5c5dd7b65a8df6e2132192630a2
2017-03-21 12:12:56 -07:00
vmud213
c6d4f0f463 Add support for BIOS local boot for GPT label
Ironic doesn't support local booting of images in BIOS boot mode
when the disk_label is GPT. The current changes creates BIOS Boot
partition when the disk_label is chosen as gpt. The partition size
is a configurable parameter.

Change-Id: Iade60da0316b8f1c0bf8ce4c79931c1105d19cec
Closes-bug: #1563291
2016-05-23 06:14:49 +00:00
Lin Tan
733a40bc5c Explore config options to oslo-config-generator
Add entry points to explore config options.
This could be used for oslo-config-generator.

Partial-Bug: #1564195
Change-Id: Ibf844b903340f834cca5cc4539ddd9cecbeda90a
2016-03-31 02:29:06 +00:00
Naohiro Tamura
9df46cb550 Use standard locale when executing 'parted' command
Not only 'dd' command but also 'parted' makes iscsi deploy fail in
Japanese environment. This patch applies the same fix as 'dd'.

 ironic.drivers.modules.iscsi_deploy [-] Deploy failed for instance
 <uuid>. Error: 'ascii' codec can't decode byte 0xe8 in position 20:
 ordinal not in range(128)

Related-Bug: #1488289
Change-Id: Ie3aedba60a4ed883ab24760947e65b8b3e9fa6b0
2015-10-06 18:03:50 +09:00
Jim Rollenhagen
cf73a8fb7f Move to oslo.i18n
This brings in i18n.py from ironic (as a helper) and switches all i18n
references to use that module.

The _i18n module from oslo-incubator is left, as syncing imageutils
brings it in.

Change-Id: I012ceb7031695407febbb3bbd24622773a2d9d0f
2015-10-01 09:38:29 -07:00
Faizan Barmawer
123414e327 Merge latest disk partitioning code from ironic
There were changes to the disk partitioner code in ironic project to support
local boot, local boot with uefi, uefi support in agent driver, deploy whole
disk, etc. These changes should be merged in ironic-lib before we replace all
disk partitioner code in ironic with ironic-lib.

The ironic changes were part of the following commit SHA.
file: ironic/common/disk_partitioner.py
0f4eba18544469d826b4d2d4b420d83c646af463
8c07c4fda3e6a86a40aa00759652b99acbd73331
4e0a78633996d27e21d899661a6414bbea77a0d7
b7e8a8eb51dcd00ce06c9151ad7c8bca8391210e

file: ironic/drivers/modules/deploy_utils.py
e8eeba4c0d063eac3c283b4af92608c7a6d73e7d
cb2e58207203b210d91dacca3c40d91ed1c45a24
987302450af73940794e53233129e90cd4b950f7
da9ed8d0eb1c5d467b41f61185501c26ea2e4ce5
222c84fff52be8383b26495c37df28cc5a0f98b9
dedb425770a6f91a54e990159843ac201dc2f1a5

Change-Id: I6afdaf6a173c1caa9daccb62cb15b630391f161b
Partially-implements: blueprint partition-image-support-for-agent-driver
2015-08-05 03:50:30 -07:00
Sergey Vilgelm
93e1664321 Switch to oslo.service
oslo.service has graduated, so ironic should consume it.

Change-Id: I93f1698016a30916f162a370728e87e18013c2bb
Partial-Bug: #1466851
2015-06-24 11:19:57 +02:00
Faizan Barmawer
1d78cb7167 Initial commit for ironic-lib 2015-02-26 04:15:08 -08:00