This change switches the conductor to using Futurist library executor and
periodic tasks worker instead of oslo.service periodic tasks. This allows
running periodic tasks in parallel and relying on more standard interfaces
(futures, executors) when dealing with asynchronous execution.
A green thread executor is used instead of using an eventlet green pool
directly. The maximum number of workers is taken from the existing
workers_pool_size configuration option, and no tasks are allowed
to be enqueued to mimic the previous behaviour (might be lifted later).
The periodic tasks worker is using the same executor, and its main loop thread
is also running on it. For this reason minimum value for workers_pool_size
is now 3: periodic task main loop, keep alive thread and at least one thread for
other tasks. A special decorator for driver-periodic tasks is now deprecated,
as the generic decorator can be used there as well.
Closes-Bug: #1526277
Change-Id: I57bf7cebfb6db805b6c521bacfef2993b16ce1ee
Automated cleaning fails for iLO driver if iLO is in System POST
state. iLO does not allow setting of boot device when it is in
System POST state. Node needs to be powered off before initiating
boot for cleaning.
Closes-Bug: 1536730
Change-Id: Icd0f39d718aabdcad56636e662dec788c4e1b427
This module enables iRMC out-of-band hardware inspection for FUJITSU
PRIMERGY bare metal nodes having iRMC S4 and beyond.
Change-Id: I8f406a9beb3fd3c01b15f764211ffd18494464f6
Closes-Bug: #1525108
In order to make getting clean steps a synchronous call, instead of
one that blocks on communication with the agent, the agent clean steps
are cached in the node's driver_internal_info. Any time cleaning is
started, the steps will be fetched from the agent and cached.
This is needed for the 'GET /nodes/<node_ident>/cleaning/steps'
API, which is not yet implemented but see the spec:
(http://specs.openstack.org/openstack/ironic-specs/specs/approved/manual-cleaning.html#get-nodes-node-ident-cleaning-steps)
Change-Id: I26288802d06683fd99138bfea488233c88260a7f
Partial-Bug: #1526290
Co-Authored-By: Josh Gachnang <josh@pcsforeducation.com>
Agent base vendor now supports manual cleaning. In the case of a
clean version mismatch (agent rebooted to a new version after manual
cleaning started), we continue from the current clean step instead
of (in automated cleaning) restarting from the first clean step.
Change-Id: I89726f3b32f96befba9a2e1bee67b2a7cc7eeb57
Partial-Bug: #1526290
This change adds image_http_proxy, image_https_proxy, image_no_proxy
parameters to a node's driver_info for use by the agent driver. If set,
they will be passed to ironic python agent ramdisk and used during
image download.
Also this change updates the unit test
TestAgentVendor.test_continue_deploy_image_source_is_url() as it was was
incorrect.
Partial-bug: #1526222
Change-Id: I7890f761f4adbe768f76831ef5b48b691a70b2d1
Even though an empty ipmi_username and/or ipmi_password is valid, it is
often an error in configuration. Log a warning if either value is
missing.
Add unit tests showing that an unspecified username or an empty string
username are treated the same and will cause no user to be specified.
Add unit tests showing that an unspecified password or an empty string
password are treated the same and will cause a NULL (\0) password to be
used.
Change-Id: I384e210da3216fb9335c4c782d69e606026d4b97
This patch is extending the root device hints to support the device name
as input.
It's important to note that for SATA, SCSI and IDE disk controllers
the name is not recommended to be used because the order in which the
device nodes are added in Linux is arbitrary, resulting in devices like
/dev/sda and /dev/sdb switching around at boot time. The documentation
was updated to inform operators about this problem.
Depends-On: I48d6456c75bbe6ddf16ac6561e5461ca51eb9c37
Change-Id: I564d68ab1c66505195745c34e16e829b45a00a75
Closes-Bug: #1526732
1) utils.cleaning_error_handler() as hook in current code does not
have an exception parameter that task context manager adds.
2) It's not needed to set fail state on "NoFreeConductorWorker"
exception, this is driver specific. IPA driver can obtain a free
worker on the next heartbeat(s).
This patch also adds missing tests for error handlers functions.
Closes-Bug: #1539118
Change-Id: I9081d5b3437e9be6b68fe9c635b38f84637e93df
DRAC specific code from Ironic is moving to its own project, to
python-dracclient project. This patch finishes refactoring code in
Ironic to use the new library.
Change-Id: I6223dbbeb770d773ebdd72277017156cbdb1d035
DRAC specific code from Ironic is moving to its own project, to
python-dracclient project. This patch continues refactoring code in
Ironic to use the new library.
Note that this is a backwards incompatible change. In addition to the
dependency change, return values of the following methods changed in
ironic.drivers.modules.drac.vendor_passthru:
- set_bios_config returns the 'commit_required' key
- commit_bios_config returns the 'job_id' and 'reboot_required' keys
- abandon_bios_config returns nothing
Change-Id: Iaa4cee0dae8980817803ca55cdb53789b4051bc2
Partial-Bug: #1454492
Depends-On: I574696e460f08cececc47a69b5c2b090a6cd44a2
When booting from ipxe in uefi boot mode, once the node boots with deploy
image, ironic is not changing the default menu entry to boot_partition
to boot the instance image during next boot. The current changes fix
the issue. The kernel parameter "initrd=ramdisk" is also added to the ipxe
template which is required for ipxe booting.
Closes-Bug: #1532679
Change-Id: Idf78195d228b4861f85fbcae9a269edd95523ad7
This will help user to avoid wrong configs, and oslo_config exception
ConfigFileValueError will be raised if a wrong value was given in the
config file.
The list of options:
[DEFAULT]/auth_strategy
[glance]/auth_strategy
[glance]/glance_protocol
[neutron]/auth_strategy
[amt]/protocol
[irmc]/remote_image_share_type
[irmc]/port
[irmc]/auth_method
[irmc]/sensor_method
Co-Authored-By: Anton Arefiev <aarefiev@mirantis.com>
Closes-Bug: 1502027
Change-Id: I63cdfbf4eb44c07f7fefa8301e9cda1289654c94
The usage of assertEqual(True/False, ***) should be changed
to a meaningful format of assertTrue/False(***).
Change-Id: I7ec7fdb53d9141c25a16b78a5149dc0d2909c366
Closes-Bug: #1512207
This is a follow-up on "DRAC: switch to python-dracclient on management
interface" with change-id: I297514d14ad71289f21e390ac60c2d2a89850f15.
Change-Id: I2e1ae8f712ab30ea438cbf68651dd50a8323d19d
ironic.common.utils.dd(), mkfs(), unlink_without_raise(),
and is_http_url() methods were moved to ironic-lib. This
removes the copies in ironic and updates the code to use
the methods in ironic-lib.
Change-Id: I09c0a037b7979079cbfe5e33cbfd157ea3f3f79d
This patch adds UEFI support for iPXE, the changes made are:
* Remove conditional preventing iPXE to be configured with UEFI
* Add the boot_mode= kernel parameter to the iPXE template
* Add initrd=deploy_ramdisk kernel parameter to the iPXE template. The
UEFI support in iPXE requires the kernel argument to match what the
initrd expects. For more information see [0]
[0] http://forum.ipxe.org/showthread.php?tid=7589&pid=11843#pid11843
Closes-Bug: #1525989
Change-Id: I6e74bc6332c5aba92ef0de8694fd4259c596cf03
Currently there is no support to get console in dev and
test environments, this patch implements a console driver
ShellinaboxConsole to add ability of console access for
SSH driver using 'virsh console'.
For non-virsh ssh drivers, a 'GET /v1/drivers/properties'
request will return False for the console interface (as
opposed to None) with a 'not supported ...' reason.
Change-Id: I2764e0cb4b5b489762e00cd266212b902acc0746
Closes-Bug: #1526305
DRAC specific code from Ironic is moving to its own project, to
python-dracclient project. This patch continues refactoring code in
Ironic to use the new library.
Change-Id: I297514d14ad71289f21e390ac60c2d2a89850f15
Partial-Bug: #1454492
Closes-Bug: #1474964
Depends-On: I51d712a24948726e7c7c03530cf8fd7953f5f190
DRAC specific code from Ironic is moving to its own project, to
python-dracclient project. This patch starts using the new library.
Change-Id: I68251fc2b5dd169bb22bbbe38fe9eea16c5ac806
Partial-Bug: #1454492
Depends-On: Iab9d9f7e4e25e3d3fdec9b28fe49a7226e68c9ff
Replace assertEqual(None, *) with assertIsNone in tests to have
more clear messages in case of failure.
Change-Id: I4c4834191a33fd5a9a094c4f616eadc482317248
Closes-bug: #1280522
The goto :boot_whole_disk section in the iPXE template is bogus, the
"kernel" command is being used to chain the "chain.c32" file, that
command should be "chain" and the "append" command is not a valid iPXE
command.
This patch replaces those commands with the "sanboot" command from iPXE
which is (among other things) used to chain the boot process to the
local disk.
Closes-Bug: #1524403
Change-Id: I7d2310d94e40b1c9c76957382ab19c0076bf42cd
The disk partitioner related code from ironic/common/disk_partitioner.py
and ironic/drivers/modules/deploy_utils.py is being moved to ironic-lib.
The code in ironic needs to be removed and use ironic-lib to perform
disk related activities.
Change-Id: I7b1b1d8b45b947a7b5715f3c6ab49d84e84b6b90
This change was suggested on another patch, the idea is to
make exception message assurance with RaisesRegexp.
Change-Id: Idd7c34428398f1c746ee4ffa6b83d28f87ad5bc7
This is the first of a patch series to improve OneView driver unit
testing. There are some functions at oneview.common that need more
test cases. This change add test cases to cover specific scenarios
for 'get_oneview_info' and '_verify_node_info' functions.
Change-Id: Id1246bc5366018d642874bfbde23b6b13763f322
This adds support for ipmitools port (-p) option allowing operators
to run ipmi on non-default ports.
Change-Id: I9203c2db01cc46a183901c454e98426b4583ce08
closes-bug: #1523577
Replace HTTP 'magic numbers' (also known as unnamed numerical constants)
with constants provided by the http_client/httplib library.
For example, use 'http_client.OK' instead of '200'
This was done before in commit 107e064ca1c981480f12fad03fdd02d1f4847422
but a few more HTTP numbers have slipped in since that commit.
Change-Id: Ia3db6b0c8ef832290ffde8510a7ebe33adf356c4
If test methods of awake AMT test case executed on the same process
with short time between executions tests fails. This patch adds
reset of AMT_AWAKE_CACHE to setUp() method.
Closes-bug: #1522789
Change-Id: I91c2e60bd2a3a1f97de3a7256e78815ddbbf8087