Currently, the RPCAPI update_port method is mocked, and its return
value set in the unit tests to the expected value - the modified port.
This isn't really exercising all of the port update API handler, which
should be modifying the port object appropriately and passing it to the
RPCAPI update_port method.
This change adds a side effect to the RPCAPI update_port mock which
saves the Port object that it is passed to the DB. This allows us to
avoid fudging the answer and test the code more thoroughly.
The TestPost test case already does this for port creation.
Change-Id: I77860b2a24da659418f93c380db67ff4726257ff
Related-Bug: #1666009
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
Renames the parameter 'remove_unavail_fields' to
'remove_unavailable_fields'.
This is a follow up to 8e7d795db5e614de6a3d8dd19ff26f869c8e9f9a.
Change-Id: I57f7bde85e959f3edeb878089057bfcd26672570
Partial-Bug: #1526283
This patch moves the boot from volume skip logic for the prepare
step of deployment into the boot interface, allowing the template
to get generated before skipping the remainder of the step.
Partial-Bug: #1559691
Change-Id: Icfea16c62a753c77942107af287880f35f28c404
API Version 1.33 introduced fields related to storage interface to
Driver API as well as Node API. This patch adds missing description
for Driver API to REST API Version History documentation.
Change-Id: I2fd0709865adc1d02cf3800aa11497d97ab0b14b
Partial-Bug: #1559691
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>
This contains some changes to conversions of objects during a rolling
upgrade.
This changes objects.base.IronicObject.convert_to_version() to have a new
parameter 'remove_unavail_fields': True (default) to remove fields that are
unavailable in the target version -- for serialization/deserialization
of objects. False to change unavailable fields as appropriate (for DB
interactions). The reason for doing this is to make sure that during
serialization (eg for RPC), that we don't include any object
fields that are not supported.
To make the code a bit more performant, we don't perform object
conversions when the API service is serializing the objects for RPC to
the conductor. This is because the conductor will always be running the
same or a newer release as the API service.
Change-Id: I6f77b24199412e3489dd6f3dcf0f51ed04c5c7c0
Partial-Bug: #1526283
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
This nit was picked up in the review of
I3d13bfacfb5578f570791e3c06e769a9a0140a4c.
Change-Id: I8fc1b7f4c319f306bdd62c9a99497f3a014dabd7
Related-Bug: #1666009
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
The link is broken due to doc-migration, this patch fixes following
broken links:
- the link to tempest plugin
- the link to running tempest part in ironic dev-quickstart
Change-Id: I7b4287ad74795712fb81d3177d950450c0dadf65
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
This patch adds storage_interface field to node-related notification
objects.
Change-Id: I1d67075a2c29d24d6321fd9989fbe4ee9f8f513c
Partial-Bug: #1559691
Neither `ironic-api` nor `ironic-conductor` tools accept
the `-v` option. Although the developer's quickstart guide
has it in the example what makes cut&paste failing.
This quick fix removes the offending option from the doc.
Change-Id: I31e3657f12f7a9cf64697b362cc168333752184c
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
Set power state methods now use BackoffLoopingCall to wait for the
desired power state. It uses random.SystemRandom gauss distribution
to determine the amount of time to wait for the next check. This
change adds a method to mock the result of the pseudo-random sleep
interval generation, so that the value to wait between power state
checks is 1.
Closes-Bug: 1702859
Change-Id: I9270a187fa0f413ba8a8a14f859b0fd65c439b6e
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
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
This patch set nomulitcell flag when starting nova-compute because
multi-cell rabbit setup is not necessary in Grenade. This nomulticell
flag will be introduced with I08d7da843d18b426dda8a8a231039d950a4c0ce5.
Closes-Bug: 1700548
Change-Id: Ib55f6359751052d41b46e31ec8e15f46e33c1193
When attaching virtual interfaces to ironic ports and portgroups, we
need to take account of the physical network assigned to those ports and
portgroups. A neutron virtual interface has a set of physical networks
on which it can be attached which is governed by the segments of its
network (of which there may be more than one).
This change makes the ironic VIF attach API physical network-aware using
the physical network information added to the port object.
When selecting a port or portgroup to attach a virtual interface to, the
following ordered criteria are applied:
* Require ports or portgroups to have a physical network that is
None or one of the VIF's allowed physical networks.
* Prefer ports or portgroups with a physical network field which
is not None.
* Prefer portgroups to ports.
* Prefer ports with PXE enabled.
The change is backwards compatible, as the old behaviour is maintained
when ports have a physical_network field which is None.
Change-Id: I3d13bfacfb5578f570791e3c06e769a9a0140a4c
Partial-Bug: #1666009