Commit Graph

152 Commits (c1a8606095d4021c0f484d2bfa86fc15602503eb)

Author SHA1 Message Date
Jenkins 59c4960417 Merge "Switch to Futurist library for asynchronous execution and periodic tasks" 7 years ago
Dmitry Tantsur 3429e3824c Switch to Futurist library for asynchronous execution and periodic tasks
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
7 years ago
Shivanand Tendulker 38201d9f2a Fixes automated cleaning failure in iLO drivers
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
7 years ago
Jenkins e6571e1a7e Merge "Cache agent clean steps on node" 7 years ago
Jenkins 4d9815f357 Merge "Add hardware inspection module for iRMC driver" 7 years ago
Naohiro Tamura 37590a8633 Add hardware inspection module for iRMC driver
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
7 years ago
Ruby Loo 74f6661404 Cache agent clean steps on node
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>
7 years ago
Jenkins 15ec41070e Merge "Agent vendor handles manual cleaning" 7 years ago
Jenkins 5a1c117ab6 Merge "Log warning if ipmi_username/ipmi_password missing" 7 years ago
Ruby Loo 1f82783a9e Agent vendor handles manual cleaning
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
7 years ago
Jenkins a444ee3564 Merge "Add proxy related parameters to agent driver" 7 years ago
Vladyslav Drok 0ed100d6f4 Add proxy related parameters to agent driver
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
7 years ago
John L. Villalovos 025d1941bc Log warning if ipmi_username/ipmi_password missing
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
7 years ago
Jenkins d54c1535ca Merge "DRAC: cleanup after switch to python-dracclient" 7 years ago
Jenkins eef666695e Merge "Fix spawn error hook in "continue_node_clean" RPC method" 7 years ago
Lucas Alvares Gomes 0edba8a86c Extend root device hints to support device name
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
7 years ago
Yuriy Zveryanskyy 8c8704e23a Fix spawn error hook in "continue_node_clean" RPC method
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
7 years ago
Jenkins 454c96156d Merge "Add choices option to several options" 7 years ago
Imre Farkas 47be8011c6 DRAC: cleanup after switch to python-dracclient
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
7 years ago
Jenkins 22402e4586 Merge "DRAC: switch to python-dracclient on vendor-passthru" 7 years ago
Imre Farkas 51a73e11c2 DRAC: switch to python-dracclient on vendor-passthru
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
7 years ago
vmud213 91906c5928 Fix issues with uefi-ipxe booting
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
7 years ago
Lin Tan 1a4d589e28 Add choices option to several options
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
8 years ago
Jenkins 7265582506 Merge "Use assertTrue/False instead of assertEqual(T/F)" 8 years ago
Yatin Kumbhare a23b9b7fbd Use assertTrue/False instead of assertEqual(T/F)
The usage of assertEqual(True/False, ***) should be changed
to a meaningful format of assertTrue/False(***).

Change-Id: I7ec7fdb53d9141c25a16b78a5149dc0d2909c366
Closes-Bug: #1512207
8 years ago
Jenkins 69c33f7ed5 Merge "Use ironic-lib's util methods" 8 years ago
Jenkins e4a9eda382 Merge "Follow-up on refactor DRAC management interface" 8 years ago
Imre Farkas 72f64cce2b Follow-up on refactor DRAC management interface
This is a follow-up on "DRAC: switch to python-dracclient on management
interface" with change-id: I297514d14ad71289f21e390ac60c2d2a89850f15.

Change-Id: I2e1ae8f712ab30ea438cbf68651dd50a8323d19d
8 years ago
Jenkins 71dc9bd905 Merge "DRAC: switch to python-dracclient on management interface" 8 years ago
Ruby Loo b7d4147182 Use ironic-lib's util methods
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
8 years ago
Jenkins 930dee6242 Merge "Add console feature to ssh driver" 8 years ago
Lucas Alvares Gomes 2a5005d946 Add UEFI support for iPXE
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
8 years ago
Zhenguo Niu dc080b598b Add console feature to ssh driver
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
8 years ago
Jenkins d489d28d87 Merge "Refactor disk partitioner code from ironic and use ironic-lib." 8 years ago
Jenkins 6e2963e015 Merge "DRAC: switch to python-dracclient on power interface" 8 years ago
Jenkins 3b9bc189f2 Merge "Simplifies exception message assurance for oneview.common tests" 8 years ago
Imre Farkas 759db321c9 DRAC: switch to python-dracclient on management interface
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
8 years ago
Imre Farkas 0ced09b832 DRAC: switch to python-dracclient on power interface
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
8 years ago
Jenkins 3732114d5c Merge "Validate arguments to clean_step() decorator" 8 years ago
Shuquan Huang c7e2b04c23 Replace assertEqual(None, *) with assertIsNone in tests
Replace assertEqual(None, *) with assertIsNone in tests to have
more clear messages in case of failure.

Change-Id: I4c4834191a33fd5a9a094c4f616eadc482317248
Closes-bug: #1280522
8 years ago
Jenkins fe3a7ce2f4 Merge "Fix iPXE template for whole disk image" 8 years ago
Lucas Alvares Gomes 952d5c5a06 Fix iPXE template for whole disk image
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
8 years ago
Faizan Barmawer 7c138f01a0 Refactor disk partitioner code from ironic and use ironic-lib.
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
8 years ago
Sinval Vieira a59934f580 Simplifies exception message assurance for oneview.common tests
This change was suggested on another patch, the idea is to
make exception message assurance with RaisesRegexp.

Change-Id: Idd7c34428398f1c746ee4ffa6b83d28f87ad5bc7
8 years ago
Jenkins 7b13f3b0a6 Merge "Adding oneview.common tests for some method not well tested" 8 years ago
Sinval Vieira 55c246af85 Adding oneview.common tests for some method not well tested
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
8 years ago
Chris Krelle b9b6068689 Add port option support for ipmitool
This adds support for ipmitools port (-p) option allowing operators
to run ipmi on non-default ports.

Change-Id: I9203c2db01cc46a183901c454e98426b4583ce08
closes-bug: #1523577
8 years ago
Jenkins e1b163f8fc Merge "Replace HTTP 'magic numbers' with constants" 8 years ago
John L. Villalovos ec2a3285d8 Replace HTTP 'magic numbers' with constants
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
8 years ago
Yuriy Zveryanskyy d82fe7928a Fix awake AMT unit test
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
8 years ago