604 Commits

Author SHA1 Message Date
Dmitry Tantsur
7a0f8698a1 devstack: save iPXE httpd logs
Change-Id: I3ad5ee77a2e2e8613316b1e935256d5ba0394420
2019-09-04 13:16:12 +02:00
Zuul
3c9f2a834e Merge "Adding file uri support for ipa image location" 2019-08-29 01:14:45 +00:00
Michael Davies
b560bade60 Adding file uri support for ipa image location
Allow ipa kernel/disk images to be specified via file:// designator
so they can be locally hosted in addition to being available over
http.

Change-Id: If3e32f30a7df27113721e15bff9ecaae16bfe8d4
2019-08-27 15:33:29 +09:30
Julia Kreger
dd02a21633 Adjust placement query for reserved nodes
Minor timing changes in an attempt to:
a) Make the logs less noisy
b) Wait a little bit longer for placement
   records to be updated.

Change-Id: I4f64a2f5ab2d1696f244f083d5dc387c75cc1175
2019-08-26 16:56:50 -04:00
nishagbkar
a96f926c24 Adds dhcp-all-interfaces element
Changes the value of IRONIC_DIB_RAMDISK_OPTIONS to
'centos7 dhcp-all-interfaces' from 'ubuntu' to resolve
the issue in passing the ironic-python-agent-buildimage-dib
test.
Based on the comments of https://review.opendev.org/#/c/676239/

Change-Id: I92f44370cbd10c192c26cceb1589990f74985e92
Task: 36375
Story: 2005114
2019-08-25 23:00:32 +05:30
Zuul
e518bebe03 Merge "Support power state change callbacks to nova using ksa_adapter" 2019-08-24 02:20:13 +00:00
Zuul
cfc13b826f Merge "Remove ironic command bash completion" 2019-08-20 21:45:04 +00:00
Zuul
a447a10b12 Merge "Move to unsafe caching" 2019-08-20 11:23:35 +00:00
Zuul
4321f9c07b Merge "devstack: Fix libvirtd/libvirt-bin detection" 2019-08-19 23:15:39 +00:00
Julia Kreger
4b5d254741 Remove ironic command bash completion
The ironic command has bene long deprecated and
we are finally removing it from python-ironicclient.

In order to remove it, we need to remove this reference
to the ironic.bash_completion file which is no longer
present nor necessary.

Change-Id: If2cae16ce7c24258ee720a6b8ac6e9bcdd2589aa
2019-08-19 07:43:08 -04:00
Eric Fried
c6b5ebf35f devstack: Fix libvirtd/libvirt-bin detection
Attempting to devstack on bionic failed with:

Failed to restart libvirt-bin.service: Unit libvirt-bin.service not found.

devstack/lib/ironic was trying to figure out whether our libvirtd
service is called libvirtd or libvirt-bin based on:
- Are we on ubuntu?
- Does /etc/init.d/libvirtd not exist?

 if is_ubuntu && [ ! -f /etc/init.d/libvirtd ]; then
     libvirt_service_name="libvirt-bin"

But on this bionic, for whatever reason, my libvirtd is at
/usr/sbin/libvirtd.

However, `type libvirtd` succeeds in either case.

So this commit broadens the second part of that check accordingly.

Note, FWIW, that devstack's lib/nova_plugins/functions-libvirt checks
this way:

 # Only Xenial is left with libvirt-bin.  Everywhere else is libvirtd
 if is_ubuntu && [ ${DISTRO} == "xenial" ]; then
     LIBVIRT_DAEMON=libvirt-bin
 else
     LIBVIRT_DAEMON=libvirtd
 fi

Change-Id: I94a86a96d5732db60c12399fcaf666f960461e3e
2019-08-16 15:11:04 -05:00
Julia Kreger
afa611c4e5 Move to unsafe caching
Currently we use writeback caching for disks
on our test vms, however that honors syncs and
IO could become blocked/locked if the sync has
not completed with the double virtualization that
occurs in CI.

In theory, we don't need to worry about the
buffer cache behavior for our test VMs.

Overall, it appears that there is a performance
gain of about 10-15% with making this change because
we're not honoring syncs to not lock-up IO.

Change-Id: Ib09dd7fd41c6b1cbc0e2b707bfc9e4ff8dfa6fad
2019-08-16 14:56:32 +00:00
Julia Kreger
e9fa1e31ff Install sushy if redfish is a hardware type
Change-Id: I2b8750835f87d49e5b51c156f18a5c12d6d9884a
2019-08-15 12:07:57 -04:00
Zuul
4564aa9f19 Merge "Add Redfish Virtual Media Boot support" 2019-08-15 03:30:02 +00:00
Zuul
95a140a54c Merge "Enable testing software RAID in the standalone job" 2019-08-14 17:14:15 +00:00
Ilya Etingof
9fab96fc37 Add Redfish Virtual Media Boot support
This patch introduces standard Redfish virtual media boot
support to ironic.

The patch implements basic boot interface features along with
devstack plugin support for virtual media boot. Functionally,
redfish boot interface supports the same set of features as PXE.

Unlike other virtual media boot implementations (e.g. iLo), this
patch does not require user-built deploy/rescue/boot ISO images
for virtual media boot. Instead, ironic will build necessary images
out of common kernel/ramdisk pair (though user needs to provide
ESP image).

Story: 1526753
Task: 10389
Co-Authored-By: Shivanand Tendulker <stendulker@gmail.com>
Change-Id: I0db0a64c5ccf260f5a0695dbe994af1e11f71517
2019-08-14 14:19:03 +02:00
Surya Seetharaman
d693d4c06c Support power state change callbacks to nova using ksa_adapter
Add power state change callbacks of an instance to nova by
performing API requests. Whenever there is a change in the
power state of a physical instance (example a "power on"
or "power off" IPMI command is issued or the periodic
``_sync_power_states`` task detects a change in power state)
ironic will create and send a ``power-update`` external event
to nova using which nova will update the power state of the
instance in its database. By conveying the power state changes
to nova, ironic becomes the source of truth thus preventing
nova from forcing wrong power states on the instance during
the nova-ironic periodic sync. It also adds the possibility of
bringing up/down a physical instance through the ironic API
even if it was put down/up through the nova API.

Note that ironic only sends requests to nova if the target
power state is either "power on" or "power off". Other error
states will be ignored. In cases where the power state change
is originally coming from nova, the event will still be
created and sent to nova and on the nova side it will be a
no-op with a debug log saying the node is already powering on/off.

NOTE: Although an exclusive lock (task_manager.upgrade_lock()
method) is used when calling the nova API to send events,
there can still be a race condition if the nova-ironic power sync
happens to happen a nano-second before the power state change
event is received from ironic in which case the nova state will
be forced on the node.

Credit for introducing ksa adapter: Eric Fried <openstack@fried.cc>
Depends-On: https://review.opendev.org/#/c/645611/
Part of blueprint nova-support-instance-power-update
Story: 2004969
Task: 29424

Change-Id: I6d105524e1645d9a40dfeae2850c33cf2d110826
2019-08-12 19:29:57 +02:00
Zuul
007c7babb9 Merge "devstack: allow creating more than one volume for a VM" 2019-08-09 17:48:08 +00:00
Zuul
f8bd138a14 Merge "Uses IPA-B to build in addition to CoreOS" 2019-08-09 12:22:53 +00:00
Nisha Brahmankar
d62c3f4fa5 Uses IPA-B to build in addition to CoreOS
Depends-On: https://review.opendev.org/#/c/669213/
Task: 30073
Story: 2005114

Change-Id: I39f33f748c6c25ff1f4a543beb59231ea8b7f30f
2019-08-08 19:58:36 +05:30
Dmitry Tantsur
2f7de3264c Enable testing software RAID in the standalone job
Change-Id: Id5cc1854492df230e6657bc8450c49a52f21ac16
Depends-On: https://review.opendev.org/#/c/675064/
2019-08-07 14:11:04 +02:00
Dmitry Tantsur
c7bd03cf68 devstack: allow creating more than one volume for a VM
This is needed to easily test software RAID.

Change-Id: Ia1bc81db97c6d5d1f79c4e1cfea1ab29fd988c3f
2019-08-07 09:13:56 +02:00
Dmitry Tantsur
f06240f7dd Allow configuring global deploy and rescue kernel/ramdisk
The devstack plugin was updated to configure basic ops before
ironic starts, so that we can put links to deploy images
in the ironic.conf.

Change-Id: I305fc3712b1ac0cf2fe64569729e236c7b614bb4
Story: #2006175
Task: #35699
2019-08-06 15:31:19 +02:00
Zuul
9ac0f19950 Merge "Use HTTPProxyToWSGI middleware from oslo" 2019-08-05 11:41:13 +00:00
Pavlo Shchelokovskyy
5e8c966a40 Use HTTPProxyToWSGI middleware from oslo
currently it is impossible to use ironic-api for both internal and
public api at the same time when both of those are using (ssl
terminating) proxies as there's only one config option to override the
resource url's in responses ([api]public_endpoint).

This patch adds the http_proxy_to_wsgi middleware from oslo.middleware
to the ironic API service, which, with properly configured proxies,
makes the choice of correct URL automatic, and thus makes such scenario
possible.

As this middleware may potentially not properly handle some
endpoint URL schemas, leave the api.public_endpoint option as a backup,
but it will be ignored when proxy headers parsing is enabled.

Change-Id: I3ce6b0726b479c2835f8777957b2cb12d8098aec
Story: #2006303
Task: #36019
2019-08-02 12:29:37 +00:00
Dmitry Tantsur
363e50cab8 Enable testing adoption in the CI
Change-Id: Id175e0573b9ff76fd1b6c2e57af774e943ae1476
Depends-On: https://review.opendev.org/672286
2019-07-25 10:10:18 +02:00
Zuul
0abc6a54cd Merge "Revert "Add logic to determine Ironic node is HW or not into configure_ironic_dirs"" 2019-07-20 12:20:31 +00:00
Julia Kreger
fb664d5188 Revert "Add logic to determine Ironic node is HW or not into configure_ironic_dirs"
This is due to a failure in the logic where the UEFI
firmware objects are copied along with the ipxe loader.

tl;dr we need to have two separate if statements.

This reverts commit 0913c948423ed6c8ba147cf4e2a5a4de6945ec96.

Change-Id: Iaf78462a8b4abf4ad9c294c8575c67f5ade40a40
2019-07-19 22:09:48 +00:00
michaeltchapman
1fcd7a477d Don't install ubuntu efi debs on cent
Recently shim and grub-efi-amd64-signed were moved from
debs to be installed by lib/ironic, which causes errors
since the latter does not exist for rpm based distros.

Change-Id: I87c5268bdd23c4978201b4b7cb2e4a4770190828
2019-07-11 23:18:28 +10:00
Zuul
a32e9a319d Merge "Add logic to determine Ironic node is HW or not into install_ironic" 2019-07-09 16:01:01 +00:00
Vanou Ishii
d2967b41a3 Add logic to determine Ironic node is HW or not into install_ironic
Trying to deploy OpenStack environment consisting of ironic nova
hypervisor & hardware Ironic node (not VM Ironic node) with devstack
got failed. When trying this, followings are set in devstack local.conf
file; "VIRT_DRIVER=ironic", "IRONIC_BOOT_MODE=uefi' and
"IRONIC_IS_HARDWARE=true".

Failure is due to three bugs in script in "devstack" & "Ironic":
 (1) function configure_nova_hypervisor in
     devstack/lib/nova_plugins/hypervisor-ironic,
 (2) function install_ironic in ironic/devstack/lib/ironic and
 (3) function configure_ironic_dirs in ironic/devstack/lib/ironic.

Because "VIRT_DRIVER=ironic" & "IRONIC_IS_HARDWARE=true" is set,
devstack doesn't install libvirt related packages. So, attempt to copy
files/directories to filesystem paths to be created when installing
libvirt related packages gets failed.
When "IRONIC_BOOT_MODE=uefi" is set, bug (2) & (3) occurs. Because
function install_ironic & configure_ironic_dirs tries to configure
libvirt related settings (e.g. modify /etc/libvirt/qemu.conf) and
there is no filesystem path related to libvirt, error occurs.

This commit fixes bug (2) by adding "if" clause to determine Ironic
node is hardware or not and to skip libvirt related operations when
Ironic node is hardware.

Launchpad URL of 1st bug:
   https://bugs.launchpad.net/devstack/+bug/1834985

Change-Id: I73459d3c8c31329f17b609a3704a43738576d33c
Story: 2006174
Task: 35697
2019-07-08 04:51:23 -04:00
Vanou Ishii
0913c94842 Add logic to determine Ironic node is HW or not into configure_ironic_dirs
Trying to deploy OpenStack environment consisting of ironic nova
hypervisor & hardware Ironic node (not VM Ironic node) with devstack
got failed. When trying this, followings are set in devstack local.conf
file; "VIRT_DRIVER=ironic", "IRONIC_BOOT_MODE=uefi' and
"IRONIC_IS_HARDWARE=true".

Failure is due to three bugs in script in "devstack" & "Ironic":
 (1) function configure_nova_hypervisor in
     devstack/lib/nova_plugins/hypervisor-ironic,
 (2) function install_ironic in ironic/devstack/lib/ironic and
 (3) function configure_ironic_dirs in ironic/devstack/lib/ironic.

Because "VIRT_DRIVER=ironic" & "IRONIC_IS_HARDWARE=true" is set,
devstack doesn't install libvirt related packages. So, attempt to copy
files/directories to filesystem paths to be created when installing
libvirt related packages gets failed.
When "IRONIC_BOOT_MODE=uefi" is set, bug (2) & (3) occurs. Because
function install_ironic & configure_ironic_dirs tries to configure
libvirt related settings (e.g. modify /etc/libvirt/qemu.conf) and
there is no filesystem path related to libvirt, error occurs.

This commit fixes bug (3) by adding "if" clause to determine Ironic
node is hardware or not and to skip libvirt related operations when
Ironic node is hardware.

Launchpad URL of 1st bug:
   https://bugs.launchpad.net/devstack/+bug/1834985

Change-Id: I28ab77c063e0ce8da36f1368ac456cd910a9166f
Story: 2006174
Task: 35698
2019-07-08 04:50:35 -04:00
Mike Turek
bc84b7bce6 devstack: Install arch specific debs only when deploying to that arch
Because the shim and grub-efi-amd64-signed packages are specific to
x86_64 [0][1], they should only be installed when deploying to an x86_64 node.
This removes the packages from the debs/ironic file and moves their
installation to lib/ironic, allowing us to install it them based on architecture.

[0] https://packages.ubuntu.com/eoan/shim
[1] https://packages.ubuntu.com/eoan/grub-efi-amd64-signed

Change-Id: I73cab832cf8099c02b3e29df84618c88e5fb5065
2019-07-01 14:59:50 +00:00
Zuul
8361f1f4a7 Merge "Follow-up on UEFI/Grub2 job" 2019-06-21 04:48:34 +00:00
Julia Kreger
5f8cb199d1 Follow-up on UEFI/Grub2 job
Makes some minor requested changes to the
devstack script that were added/changed
in order to support UEFI/GRUB2 booting
in CI.

Change-Id: I6a582cc2970911c9c827309d034e4553a09b66df
2019-06-20 07:32:31 -07:00
Dmitry Tantsur
809653e126 devstack: add missing variables for ironic-python-agent-builder
The ones for ironic-python-agent itself are defined in devstack.
This changes adds similar variables for ironic-python-agent-builder
and migrates the ironic-python-agent ones here to avoid confusion.

Change-Id: Ic7eef9c8741ec2900401556f4053a4749b652d7c
2019-06-17 12:03:58 +02:00
Zuul
21f8bef807 Merge "Updates ironic for using ironic-python-agent-builder" 2019-06-17 05:59:35 +00:00
Julia Kreger
c59dc1386f Update qemu hook to facilitate Multicast
mdns AND IPv6 Neighbour Discovery Protocol use multicast packets
and the macvtap interface drops these packets by default.

Since there is no way to tell libvirt to make this better,
lets at least use the hook to make the macvtap interface
change such that multicast packets will pass.

With this, iPXE should work... and mdns should be testable in CI.

Change-Id: I397d211675fd7668b8fd19e989d740d6bad2c70e
2019-06-14 14:19:40 -07:00
Nisha Brahmankar
df5ac6d5bc Updates ironic for using ironic-python-agent-builder
Change-Id: Ic7a515eeda59b6611049c39978fda3ccbb162a45
Task: 33746
Story: 2005114
2019-06-13 03:54:43 +05:30
Julia Kreger
55e8d3fde1 Add a pxe/uefi/grub2 CI job
Fixes the grub2 based devstack logic and adds a grub2 CI job
such that the ironic team can safely clean-up some of the PXE
code without fear of breaking the grub2 scenario.

Story: 2003936
Task: 27724
Change-Id: Ieb395bf35e2689741a243c11b56d08a237b200bc
2019-06-05 14:21:13 -07:00
Dmitry Tantsur
6849a43cf6 devstack: configure rabbit outside of API configuration
If enabled, rabbit is required for all ironic services, so it makes
no sense to only configure it when API is enabled. This seems to
break multinode grenade, since `is_service_enabled ir-api` returns
false on the subnode. Try to configure the RPC backend in all cases
when IRONIC_RPC_TRANSPORT is "oslo" (not JSON RPC).

Also move the automated_clean option to the conductor where it belongs.

Change-Id: I6e046c6b6e1e4c0ca7bfd5fb9ce5892c0298fb78
2019-05-27 13:00:25 +02:00
Zuul
ed5c3d940d Merge "Move devstack emulators configs under /etc/ironic" 2019-05-21 23:25:09 +00:00
Zuul
0a3b1968aa Merge "Replace hardcoded "stack" user to $STACK_USER" 2019-05-09 14:53:57 +00:00
Kaifeng Wang
a89e903f7c Replace hardcoded "stack" user to $STACK_USER
Follow up to https://review.opendev.org/#/c/657606 which
fixed vbmcd service.

Change-Id: I7d37cd6191770c7efa6a034e18619f744d9c35e8
2019-05-08 09:27:21 +08:00
michaeltchapman
bace52165f Run vbmcd as stack user in devstack
devstack may be run as some other non-root user, and the service
will fail to start if there is no stack user available.

Change-Id: Ib1cfa6a1b0859a1e2680055ce0394053db1c307e
Signed-off-by: michaeltchapman <woppin@gmail.com>
2019-05-07 23:58:03 +10:00
Zuul
afecd4e710 Merge "Adding enabled_boot_interface attribute in tempest config" 2019-05-06 17:50:30 +00:00
Zuul
00622ae23f Merge "Improve VirtualBMC use in Devstack" 2019-05-06 16:33:25 +00:00
ankit
9d5461506e Adding enabled_boot_interface attribute in tempest config
This patch will adds enabled_boot_interfaces in tempest
config file.

Change-Id: Ib4f767818532c100826fb3562d02e7c100902411
Story: 2005549
Task: 30697
2019-05-02 06:43:04 +00:00
Zuul
191667078d Merge "Replace git.openstack.org URLs with opendev.org URLs" 2019-04-25 09:35:22 +00:00
ZhongShengping
a280696a03 Replace git.openstack.org URLs with opendev.org URLs
Thorough replacement of git.openstack.org URLs with their opendev.org
counterparts.

Change-Id: Ic19e45986e9f650c1deb297f463e679fd268ad97
2019-04-24 16:13:58 +08:00