424 Commits

Author SHA1 Message Date
Ruby Loo
578f01678c Follow-up to fix for power action failure
This is a follow-up patch to the patch so that the power status
is not retried if a power action fails:
ee5d4942a1c33736ffe05ec01619142be400c2f4

It addresses the comments as well as adds more clarification
and updates the documentation to refer to the new
[ipmi]command_retry_timeout config option.

Change-Id: Ib21544da260565ae399e2d07b32af9bd8b810280
Related-Bug: #1692895
2017-07-13 10:19:27 -04:00
Jenkins
85d59b2672 Merge "Make IP address of socat console configurable" 2017-07-08 23:57:20 +00:00
wangkf
3901e0b921 Make IP address of socat console configurable
When ironic supports VLAN, the management network is usually not
the same as provision network, where TFTP server resides.

This patch adds a new configuration for socat address, namely
[console]/socat_address, and defaults to $my_ip for backward
compatibility.

Change-Id: I329a1707c74dc187d890231376e8ddf9eb36390b
Closes-Bug: #1691344
2017-07-07 13:14:03 +08:00
Jenkins
53c8010b32 Merge "Add REST API for volume connector and volume target operation" 2017-07-04 22:33:03 +00:00
Jenkins
009bf999d5 Merge "Follow-up for bugfix 1694645 patch" 2017-07-03 20:42:57 +00:00
Jenkins
cdd13b405c Merge "Adds clean step 'restore_irmc_bios_config' to iRMC drivers" 2017-07-03 18:11:37 +00:00
Jenkins
cb30c11268 Merge "Add ldlinux.c32 to boot ISO for virtual media" 2017-07-03 16:52:16 +00:00
Julia Kreger
3e649a74b9 Follow-up for bugfix 1694645 patch
This change addresses review feedback from change
I55229f0ab37e657b7668dd4fe402fe6b5a6cda40 in the release
note, as well as the parameter text. Accordingly, the sample
configuration has been updated.

Change-Id: Ieea574f1bcc9b6c663aeb8d89475c1dd8cf6964d
2017-07-03 15:05:46 +00:00
Satoru Moriya
c380e05dbf Add REST API for volume connector and volume target operation
This patch introduces following REST API endpoints to get/set volume
connector and volume target in Ironic.

- GET /v1/volume
- GET /v1/nodes/<node_uuid or name>/volume
- {GET, POST} /v1/volume/connectors
- {GET, PATCH, DELETE} /v1/volume/connectors/<volume_connector_uuid>
- GET /v1/nodes/<node_uuid or name>/volume/connectors
- {GET, POST} /v1/volume/targets
- {GET, PATCH, DELETE} /v1/volume/targets/<volume_target_uuid>
- GET /v1/nodes/<node_uuid or name>/volume/targets

This also adds CRUD notifications for volume connector and volume
target.

Co-Authored-By: Tomoki Sekiyama <tomoki.sekiyama.qu@hitachi.com>
Co-Authored-By: David Lenwell <dlenwell@gmail.com>
Co-Authored-By: Hironori Shiina <shiina.hironori@jp.fujitsu.com>
Change-Id: I328a698f2109841e1e122e17fea4b345c4179161
Partial-Bug: 1526231
2017-07-03 15:51:59 +09:00
Jenkins
1229ff4586 Merge "Don't retry power status if power action fails" 2017-06-29 13:54:44 +00:00
Dao Cong Tien
e7664a161d Adds clean step 'restore_irmc_bios_config' to iRMC drivers
- Adds new boot interface 'irmc-pxe'. Deprecates 'pxe' boot interface
from using with hardware type 'irmc'.

- Adds functions backup_bios_config and restore_bios_config to iRMC
management interface for implementing the BIOS BACKUP/RESTORE
mechanism supporting iRMC S4 hardware. The function backup_bios_config()
will be called automatically before deploying.

- Adds clean step restore_irmc_bios_config to restore BIOS config
for a node during automatic cleaning.

Change-Id: I04aa5bc2f5e287e048d0b52fee123e53ae2eaa99
Partial-Bug: #1639688
2017-06-29 10:06:20 +00:00
Julian Edwards
ee5d4942a1 Don't retry power status if power action fails
The old code blindly required power status even if the power action
failed. Now, it will retry the power action only when it detects a
retryable failure, and will only poll for power status if the power
action is successful. This patch also moves the logic for handling
waiting for power status into the conductor so that the logic is
standardised between drivers.

Change-Id: Ib48056e05d359848386ac057b58921f40b7bdd60
Co-Authored-By: Sam Betts <sam@code-smash.net>
Related-Bug: #1675529
Closes-Bug: #1692895
2017-06-27 12:10:47 +01:00
Dmitry Tantsur
cb7cdd3534 Fetch Glance endpoint from Keystone if it's not provided in the configuration
This is needed to fix the CI broken by glance switching to running
under wsgi, and thus breaking our assumption that glance is accessible
by host:port only.

The options glance_host, glance_port and glance_protocol were
deprecated.  Standalone deployments should use glance_api_servers
instead.

Also removes two unused utility functions.

Change-Id: I54dc04ab084aeb7208c9dd9940c6434c029bf41c
Partial-Bug: #1699542
2017-06-23 16:42:40 +02:00
Grzegorz Grasza
ebfc4fe4c4 Add version column
This extends versioned objects and uses the object's
convert_to_version() to perform conversions between different
versions of the object. This conversion is only done at the
"boundaries" of the api and conductor services. That is, when
reading/writing to the database and when serializing/deserializing
(for RPC). Internally, the services deal with the latest versions
of the objects.

Version column is introduced to make sure reading the DB object
versions happens transparently for the developer. An exception
is raised in case of a version compatibility error.

The version column is null at first and will be filled with the
appropriate versions by a data migration script in a following patch.

Change-Id: I34629a5cbab7ff3f246ea19c0cb766badc7061db
Partial-Bug: #1526283
Co-Authored-By: Ruby Loo <ruby.loo@intel.com>
2017-06-06 15:34:37 -04:00
Hironori Shiina
dd264ac909 Add ldlinux.c32 to boot ISO for virtual media
To create a boot ISO for netboot with virtual media boot, ldlinux.c32
is required for syslinux 5.00 or later. This patch copies ldlinux.c32
in building ISO from general paths by default. A new configuration
parameter [DEFAULT]/ldlinux_c32 is added for another distribution
or feature changes.

Change-Id: I55229f0ab37e657b7668dd4fe402fe6b5a6cda40
Closes-Bug: #1694645
2017-06-06 23:56:17 +09:00
Madhuri Kumari
d115373ff5 Add a note for specifying octal value of permission
In commit[1], we allowed to specify permission to be applied to
TFTP directories using ``[pxe]/dir_permission``. This configuration
is an integer value. This patch adds a note stating that this value
should be an octal number.

[1] 0f7a85e1ecd7b3e7bdbc297f47a498139ed40107

Change-Id: Iba8d88bd6faba600d6b66d27f1700dae8dd29eee
2017-06-06 13:59:30 +05:30
Ruby Loo
85baa495d0 Fix description for [cinder] action_retries option
This fixes a few grammatical issues with the description for
the [cinder] action-retries configuration option.

The ironic.conf.sample file is updated to reflect this change
as well as a couple of other changes from imported packages.

Change-Id: If010d57a518c60b951a20e45c6a6fa3b6f240c76
2017-05-29 12:10:56 -04:00
Pavlo Shchelokovskyy
13d91bd7b4 Use cfg.URIOpt for URLs with required schemes
instead of specifying URL config options as StrOpt + regex enforcing
the string starting with 'http://' or 'https://'.

URIOpt is already available in minimal version of oslo.config that is
required by ironic.

Change-Id: I47089e215f730b3990004a66e0f35262a5f9d9bd
2017-05-24 11:08:52 +00:00
Michael Turek
b23a176a73 Add Cinder storage driver
A cinder interface driver that can be called in order to signal
cinder to attach and detach volumes.

Authored-By: Julia Kreger <juliaashleykreger@gmail.com>
Co-Authored-By: Joanna Taryma <joanna.taryma@intel.com>
Co-Authored-By: Mike Turek <mjturek@linux.vnet.ibm.com>
Change-Id: I3d6bb126ef34b30f316ed5a10fd13a3106d1400b
Partial-Bug: #1559691
2017-05-22 12:12:22 +00:00
Jenkins
bd7143f529 Merge "Add ipmitool vendor interface to the ipmi hardware type" 2017-05-20 20:15:01 +00:00
Jenkins
fda94477d4 Merge "Fix directories permission for tftpboot" 2017-05-20 12:21:08 +00:00
Dmitry Tantsur
f428de5f55 Add ipmitool vendor interface to the ipmi hardware type
For some reason it was missing.

Change-Id: Ic86e452d033eec112cc3930b6857f07e0ef7720c
Closes-Bug: #1691504
2017-05-19 13:30:43 +02:00
Madhuri Kumari
0f7a85e1ec Fix directories permission for tftpboot
Currently method "_ensure_config_dirs_exist" creates tftpboot/<uuid>
dir with wrong permission. This is due to the system umask setting
which overrides the default permission of 0777 to 0755 or 0750. When
the permission is 0750, BM can't get deploy_kernel and ramdisk from
tftpserver. This may happen only when tftp process is launched from
other user than root and as result can't read files created by Ironic.

So this patch tries to fix the issue by explicitly changing the
permissions defined in the config option ``[pxe]/dir_permission``.

Change-Id: I3119ec7ae31bf82f716bf082fa4c3296d6aa3587
Closes-bug: #1655568
2017-05-19 06:51:42 +00:00
Ruby Loo
6729fc62ca Comment the default values in policy.json.sample
This updates etc/ironic/policy.json.sample so that the default
rules/values are commented out (since they don't need to be
specified).

The change was done by oslo-config-generator, the utility that
generates this sample.

Change-Id: I1df564992336862c00e3b7213e230f32cba3d789
2017-05-18 22:38:47 -04:00
Jenkins
091d1ec3b7 Merge "Fix oslo.messaging log level" 2017-05-01 19:55:05 +00:00
Thomas Herve
674ddb0268 Fix oslo.messaging log level
The default log level of oslo.messaging was set on the python package
name, which means it didn't take effect for all logs. This fixes it
adding it on the namespace name as well.

Related-Bug: #1685148
Change-Id: I0263717b9fd4d3c6ee4083c71df9b4b26401a39b
2017-04-28 09:45:45 +02:00
Jenkins
cff257e0bb Merge "Make terminal timeout value configurable" 2017-04-25 19:53:35 +00:00
Dao Cong Tien
7bc49c7416 Make terminal timeout value configurable
Adds configuration parameter ``terminal_timeout``
to section [console] to allow operators to set the timeout
value for the Socat console session.

Change-Id: I9a83a3e2b2d16117df0f9c01b6c8b6c86639696c
Closes-Bug: #1675404
2017-04-24 09:28:00 +07:00
Jenkins
72655e374d Merge "Fix unit tests for oslo.config 4.0" 2017-04-21 00:27:52 +00:00
Jenkins
b0c63477d1 Merge "Make config generator aware of 'default_log_levels' override" 2017-04-18 14:46:57 +00:00
Javier Pena
f64154482f Fix unit tests for oslo.config 4.0
oslo.config 4.0 will check overridden value type by default[1],
which exposes a couple issues in Ironic:

- default_storage_interface is defined as ListOpt, when it should be
  StrOpt.

- test_get_client_with_endpoint_override sets an invalid url for config
  option url, which fails when checked by oslo.config.

[1] https://review.openstack.org/#/c/328692

Change-Id: Id166da73a41c8c46d9f3e239579d0cafb93bf69f
Closes-Bug: #1517839
2017-04-18 15:51:03 +02:00
Jenkins
19ced862a7 Merge "Config drive support for ceph radosgw" 2017-04-17 17:59:06 +00:00
Jenkins
b4cf807ea4 Merge "Common cinder interface additional improvements" 2017-04-14 10:29:34 +00:00
Vladyslav Drok
6196e58270 Make config generator aware of 'default_log_levels' override
The way it is done in this patch is recommended by the oslo.config
documentation in [0], so that the updated default_log_levels value
is correctly reflected in the generated ironic.conf.sample file.
An oslo.config.opts.defaults entry point is added.

[0] https://docs.openstack.org/developer/oslo.config/generator.html

Change-Id: Ic200e8d0d721a6c94bd17068a6e5000db930eefd
2017-04-13 16:51:03 +03:00
Joanna Taryma
3b5aefa0b6 Common cinder interface additional improvements
This is a follow up to 459fe314fa65111d4b1fd4f8210117903a778093

Minor issues in the code and tests are fixed, the release note is added,
configuration options are described as part of not yet exposed feature.

Change-Id: Ib466ee3970dcc1e141ddac38a54544f6a011549e
Partial-Bug: #1559691
2017-04-12 12:47:13 -07:00
Anup Navare
58b34b0b30 Config drive support for ceph radosgw
Currently config drive can be stored in swift with keystone
authentication. This change allows ironic to store the config drive in
ceph radosgw and use radosgw authentication mechanism that is not
currently supported. It uses swift API compatibility for ceph radosgw.

New options:
    [deploy]/configdrive_use_object_store
    [deploy]/object_store_endpoint_type
Deprecations:
    [conductor]/configdrive_use_swift
        Replaced by: [deploy]/configdrive_use_object_store
    [glance]/temp_url_endpoint_type
        Replaced by: [deploy]/object_store_endpoint_type

Change-Id: I9204c718505376cfb73632b0d0f31cea00d5e4d8
Closes-Bug: #1642719
2017-04-12 17:21:50 +00:00
Jenkins
c02404089b Merge "Remove deprecated [ilo]/clean_priority_erase_devices config" 2017-04-05 22:38:19 +00:00
Jenkins
28c48ea68f Merge "Add base cinder common interface" 2017-04-05 16:58:39 +00:00
Joanna Taryma
459fe314fa Add base cinder common interface
Addition of common cinder related code that a storage interface
driver will be able to leverage for interacting with cinder.

Co-Authored-By: Joanna Taryma <joanna.taryma@intel.com>
Partial-Bug: #1559691
Change-Id: I4aed895e52fcefb61dd0751e8bc9b39a26706276
2017-04-03 09:37:50 -07:00
Ruby Loo
4f10391494 Updates to RPC and object version pinning
Adds a warning to pin_release_version config to indicate that it
isn't being used yet since the rolling upgrades work isn't complete.

Also includes updates as a followup to
9bc06783ecaff5eef58535904abc12ea15982329, including adding a
release mapping for ironic version 8.0.

Change-Id: I2145f76a6802e8116b9ee2c1e23a88322b1bdeac
2017-04-03 11:40:42 -04:00
Shivanand Tendulker
603ca46047 Remove deprecated [ilo]/clean_priority_erase_devices config
The configuration option [ilo]/clean_priority_erase_devices was
deprecated in the Newton cycle (6.1.0). It is no longer supported.
The option [deploy]/erase_devices_priority should be used instead.

Closes-Bug: #1677449
Change-Id: Ib9110e9bd395d4a87aeb3981073530fb59949a47
2017-03-30 01:59:24 -04:00
Grzegorz Grasza
9bc06783ec Add RPC and object version pinning
To support rolling upgrades, capping of RPC communication and Ironic
objects is required. Old RPC services and objects may still be running
while an upgrade is in progress. This makes sure that these old
services are called and all objects are used in a supported RPC and
objects version.

This patch adds the configuration option "pin_release_version". Setting
this option caps (downgrades) the internal RPC communication to the
specified version to enable communication with older services. When
doing a rolling upgrade from version X to Y, set this to X. It defaults
to using the newest (current) possible RPC behavior and object versions.

Change-Id: Ie2342d4051f85392a8b10d39ebffc287da57bf2b
Partial-Bug: #1526283
Co-Authored-By: Szymon Borkowski <szymon.borkowski@intel.com>
Co-Authored-By: Ruby Loo <ruby.loo@intel.com>
2017-03-24 02:05:02 +00:00
Matt Riedemann
e91f31663c Deprecate support for glance v1
Nova dropped support for glance v1 in Ocata and we're going
to disable glance v1 in CI runs for Pike. The glance v1
API is deprecated so we should start burning it out of the
system in all of the projects.

Closes-Bug: #1670423

Change-Id: I1398f81b28e1b000ee110c159e498b72e3746109
2017-03-13 14:32:51 -04:00
Matt Riedemann
3f1aa22d4b Update ironic.conf.sample
The in-tree sample of ironic.conf is stale, this updates it.

Change-Id: I8c93b98d44a371587231f13e83e9198eaeddf368
2017-03-12 21:23:36 -04:00
Jenkins
96683ea61d Merge "Add support for DBDeadlock handling" 2017-02-28 17:14:55 +00:00
Joanna Taryma
3428cb74f0 Add support for DBDeadlock handling
Wrap all DB write operations with oslo_db decorator to retry on
deadlock. DBDeadlock exception can be raised quite often on Galera
clusters under load.
This also fixes an issue which causes conductor's periodic
tasks to stop executing.

Closes-Bug: #1637210
Closes-Bug: #1639338
Co-Authored-By: Vladyslav Drok <vdrok@mirantis.com>
Co-Authored-By: Joanna Taryma <joanna.taryma@intel.com>
Change-Id: I61db83637adfd98a5394d1f570f3de4302c93497
2017-02-27 13:39:37 -08:00
Pavlo Shchelokovskyy
02ce7246ec Remove most unsupported drivers
In accordance with ironic CI policies, this patch removesi some drivers
that are not tested on upstream or third-party CI
and for which maintainers have not communicated any plans
to have such testing.

This includes:
- virtualbox drivers
- seamicro drivers
- msftocs drivers

Change-Id: Ia3a7d798c877f4628946ee6c56d850b9847e6c3e
Closes-Bug: #1663018
2017-02-09 08:09:03 +00:00
Jenkins
c439caf0f9 Merge "Improve enabled_*_interfaces config help and validation" 2017-02-04 16:05:43 +00:00
Jim Rollenhagen
1f25244bf6 Improve enabled_*_interfaces config help and validation
This adds additional constraints to the help messages for the
enabled_*_interfaces config options. It also checks if they are
empty at conductor startup, and if any are empty, errors out
with a better error message than previously provided.

Change-Id: I97fc318ce00291d5e43b70423930981c2f5a2de0
Partial-Bug: #1524745
2017-02-03 21:26:41 +00:00
Jenkins
fd1445acaa Merge "Make _send_sensors_data concurrent" 2017-02-02 18:45:36 +00:00