619 Commits

Author SHA1 Message Date
Mark Goddard
02fff930fb Expose ports' physical network attribute in API
In change Ib22753aa6ae0fedce7fb9ecf63f135fda0185c5b the port data model
was updated to include a physical_network field, but this was not
exposed to the user by the REST API. This change exposes the
physical_network field in the REST API.

The port CRUD notification object has been updated to include the
physical_network field.

The API reference and user guide have been updated to include
information about the ports' physical network field.

The API microversion has been bumped to 1.34. During a rolling upgrade
from Ocata when the API service is pinned, the port physical network
field is hidden from API responses, and API requests including the field
are rejected.

Change-Id: I7023a1d6618608c867c31396fa677d3016ca493e
Partial-Bug: #1666009
2017-07-19 17:29:20 +01:00
Jenkins
f641463cfb Merge "Improve graceful shutdown of conductor process" 2017-07-18 20:44:28 +00:00
Jenkins
44c18969de Merge "remove explicit directions for release notes on current branch" 2017-07-18 18:58:29 +00:00
Jenkins
a1cbfa5be0 Merge "Follow-up to fix for power action failure" 2017-07-15 18:04:06 +00:00
Jenkins
7a0632dd59 Merge "Using non-persistent boot in PXE interface" 2017-07-14 13:19:16 +00:00
Jenkins
03a59abb28 Merge "Force InnoDB engine on interfaces table" 2017-07-14 02:37:34 +00:00
Fellype Cavalcante
c7091fb8e2 Using non-persistent boot in PXE interface
Non-persistent boot device change is not being used in places
where it should be during cleaning and deployment phases,
due to the default behavior of PXE interface forcing a
persistent change when using legacy function
deploy_utils.try_set_boot_device.
For some drivers, e.g. OneView, a persistent change is far more
costly than a non-persistent one, so this fix can bring
performance improvements.

Change-Id: I213e9c6173ee9c7c6c31064afcfae07764af0f7b
Closes-Bug: 1701721
Co-Authored-By: Stenio Araujo <steniaraujo@lsd.ufcg.edu.br>
2017-07-13 13:23:57 -03:00
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
b1400a73ad Merge "[reno] Clarify fix for inspect validation failures" 2017-07-11 07:23:06 +00:00
Jenkins
aab609159f Merge "Add storage interface field to node-related notifications" 2017-07-11 06:09:34 +00:00
Jenkins
13383b0409 Merge "Enable cinder storage interface for generic hardware" 2017-07-11 05:34:13 +00:00
Ruby Loo
0085339b16 [reno] Clarify fix for inspect validation failures
This updates the reno for 3bda561e318e0172d6209f1580340ed9a04a161d
to clarify what was being fixed (returning HTTP 400 instead of
HTTP 500).

Change-Id: I412b650a22af3fdbaa92771c66eb37f3c07b7243
Related-Bug: #1686457
2017-07-10 10:44:57 -04:00
Jenkins
0656229b48 Merge "Raise HTTP 400 rather than 500 error" 2017-07-09 07:35:37 +00:00
Jenkins
85d59b2672 Merge "Make IP address of socat console configurable" 2017-07-08 23:57:20 +00:00
Michael Tupitsyn
1a0c7091a6 Force InnoDB engine on interfaces table
If the system is set to use MyISAM engine as default, during upgrade
a new conductor_hardware_interfaces table will be created with MyISAM
engine. This will cause a mix of InnoDB and MyISAM tables in single
database, and obsolete a foreign key to conductors table.

This bug in particular fails test_models_sync unit test, when it is
executed on a system, where MyISAM is set as default option for local
MySQL server.

Change-Id: Ic47426b1a12eda5728e9971a27ad3767c0245d50
Closes-Bug: 1702158
2017-07-07 10:08:51 -07:00
Hironori Shiina
961f046a4a Add storage interface field to node-related notifications
This patch adds storage_interface field to node-related notification
objects.

Change-Id: I1d67075a2c29d24d6321fd9989fbe4ee9f8f513c
Partial-Bug: #1559691
2017-07-07 12:12:32 +00:00
Hironori Shiina
b90f7a15fb Enable cinder storage interface for generic hardware
This patch enables cinder storage interface for generic hardware. It
also adds storage_interface field to node resource and driver resource
in API and bumps API version to 1.33 so that storage interface can be
set and shown via API.

Change-Id: I2c74f386291e588a25612f73de08e8367795acff
Partial-Bug: #1559691
2017-07-07 12:11:03 +00:00
Galyna Zholtkevych
3bda561e31 Raise HTTP 400 rather than 500 error
Currently conductor method inspecting hardware
raises HardwareInspectionFailure with 500 Internal Error
if driver.power.validate fail (e.g. , ``driver_info`` is
not provided or some fields are missing).

Since this is an apparent client error, an HTTP error code
400-Bad request is more appropriate.
The validation method actually raises this needed error
and catching this is not needed anymore.

Change-Id: I080dedeac7ce33135fde8c53494e618ccf07c941
Closes-Bug: #1686457
2017-07-07 13:12:45 +03: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
Yuriy Zveryanskyy
b720359c06 Improve graceful shutdown of conductor process
If conductor is being stopped it is trying to wait of completion of
all periodical tasks which are already in the running state. If there
are many nodes assigned to the conductor this may take a long time,
and oslo service library can kill thread by timeout. This patch adds
code
that stops iterations over nodes in periodical tasks if conductor
is being stopped. These changes reduce probability to get locked
nodes after shutdown and time of shutdown.

Closes-Bug: #1701495
Change-Id: If6ea48d01132817a6f47560d3f6ee1756ebfab39
2017-07-05 11:59:57 +03:00
Jenkins
cd3729ed31 Merge "switch from oslosphinx to openstackdocstheme" 2017-07-05 01:39:35 +00:00
Jenkins
53c8010b32 Merge "Add REST API for volume connector and volume target operation" 2017-07-04 22:33:03 +00:00
Sam Betts
31ac1b72f2 switch from oslosphinx to openstackdocstheme
Change-Id: I2f1f8f76b6ec732a770707a259dc72a2f576e46c
2017-07-04 15:32:27 +01: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
Dmitry Tantsur
0bf2a4e884 Make redfish power interface wait for the power state change
Currently it's not consistent with other power interfaces.

Change-Id: I82dd74278121857f5bd810878961aa6fb50e53ff
Related-Bug: #1526477
2017-06-29 16:47:08 +02: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
Jenkins
72c7fc603c Merge "Fix VIF list for noop network interface" 2017-06-27 20:26:48 +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
Mark Goddard
181005106b Fix VIF list for noop network interface
Creating a node with the noop network interface, then listing the node's
VIFs, e.g. via openstack baremetal node vif list <node>, ironic
previously returned a 500 internal server error. This change fixes the
issue by returning an empty list instead of None from the vif_list
method.

This change also adds unit tests to cover the noop network interface as
it previously had none.

Change-Id: I327c961f094528d46a78c26610d198ebc2a4f370
Closes-Bug: #1700497
2017-06-27 10:45:01 +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
Jenkins
ae9fafacbc Merge "Wait until iDRAC is ready before out-of-band cleaning" 2017-06-16 10:11:32 +00:00
Christopher Dearborn
35f222c55d Wait until iDRAC is ready before out-of-band cleaning
When out-of-band cleaning is initiated, the node is PXE booted and the
ramdisk is loaded.  After in-band cleaning completes, the node is
rebooted.  At that point, the iDRAC automatically creates and runs an
"Export Configuration" job.  Out-of-band cleaning then starts: either
RAID configuration creation or deletion.  If the export job has not
finished by the time the RAID deletion or creation job is attempted to
be created, then the RAID job creation fails.

This patch causes RAID configuration creation and deletion to wait
until the iDRAC declares itself to be ready before proceeding with
out-of-band cleaning.  This ensures that the export job has completed
before creating another job.

Change-Id: I79faba2206b86288ae636c46468a8b2dc321f979
Closes-Bug: 1691808
Depends-On: I929deada3dda7b09a6f29033fff89d9b0382aef8
2017-06-15 10:06:40 -04:00
Mark Goddard
9e3f412186 Move port object creation to conductor
Previously, the API service created port objects without hitting the
conductor. This change moves port creation to the conductor service,
adding a create_port method.

Currently this just performs the port object creation but in a future
change this will be used to validate the physical network assignment of
ports in a portgroup when a port is created, ensuring that all ports in
the group have the same physical network.

The conductor RPC API version has been bumped to 1.41.

Change-Id: I7501bf9fedc668629d5b627475bb54fef5c6bf20
Partial-Bug: #1666009
2017-06-12 14:47:32 +01: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
Pavlo Shchelokovskyy
4f9035c24f Remove legacy auth loading
remove support for specifying client auth in keystone_authtoken config section.
This was deprecated about a year ago and now can safely be removed.

Also, fill the [cinder] section with auth options in devstack.

Change-Id: I0c45d12d80eff45e643af29cded178644071c9fe
2017-06-06 10:20:54 +00:00
Jenkins
b53fa02740 Merge "Add guru meditation report support" 2017-05-30 15:34:10 +00:00
Madhuri Kumari
7366479a94 Add guru meditation report support
Oslo_reports enables OpenStack projects to dump
Guru Meditation Reports with useful debugging
information to files or stderr. For example,
what threads are running, what config parameters
are in effect, and more.

Change-Id: Ib435f9e933009d52841dd8876d425a093731fe7e
Closes-bug: #1526423
2017-05-30 08:12:07 +00:00
Julia Kreger
bd5b1a72e0 Deprecate elilo support
The elilo project has been orphaned and dropped from
the majority of linux distributions. Effectively, it has
already been deprecated by the larger ecosystem, and removal
from ironic only seems appropriate as time goes on.

Partial-Bug: #1691454
Change-Id: I725dc11978f6a641ffdbe3146527d67fe126debe
2017-05-29 11:47:54 -04:00
Doug Hellmann
f91dc65978 remove explicit directions for release notes on current branch
Remove the earliest-version directions and let reno determine which
notes to include.

Change-Id: Ic7f58834fb75bd930d2cff29453019438b79f5f2
Related-Bug: #1682147
Depends-On: I58326c9e30349d2d7c473558b9aa2e8f7294c652
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2017-05-24 15:43:37 -04:00
Jenkins
bd7143f529 Merge "Add ipmitool vendor interface to the ipmi hardware type" 2017-05-20 20:15:01 +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
Jenkins
9fc3a376ca Merge "Check if sort key is allowed in API version" 2017-05-17 13:30:25 +00:00
Ruby Loo
db0c42a955 Check if sort key is allowed in API version
This checks the sort key, to make sure the specified field
is allowed/available in the specified API microversion.
If it is not allowed, a 406 HTTP status is returned.

This affects requests to get lists of nodes, port groups,
and ports.

Change-Id: Id5fb44b8b7fe989514dbae4b60cef4a34d47e52b
Closes-Bug: #1659419
2017-05-16 15:29:59 +00:00
Ruby Loo
950548a38d Update reno for new ilo hardware type
This updates the release note for the new 'ilo' hardware type
to mention that it also supports 'iscsi' deploy interface.

The separate release note about ilo supporting iscsi deploy interface
is removed.

This is all going into the same release, and it is confusing to have
two separate release notes about the ilo hardware type.

Change-Id: I4087d7f805dc7710b554c102f428b92cead1ebf9
Related-Bug: #1689274
2017-05-10 18:59:00 -04:00