Commit Graph

156 Commits

Author SHA1 Message Date
Julia Kreger fff80086d6 Change policy to enforce only new policy
Change's inspector's default policy to align with the 2023.2
release goal.

Depends-On: https://review.opendev.org/c/openstack/ironic/+/902009
Change-Id: Iaa271bd13e3a62c4a3b35b6e6b556984f7b1d09c
2024-01-26 01:01:11 +00:00
Sławek Kapłoński dac7f02d0a Remove lib/neutron-legacy leftovers
In [1] we finally got rid of the unfinished lib/neutron module and kept
only lib/neutron-legacy. It's renamed to lib/neutron now and it's the
only neutron related module in Devstack.
So this patch removes leftovers related to the old lib/neutron-legacy.

[1] https://review.opendev.org/c/openstack/devstack/+/865014

Change-Id: I698d87eba1fd92abfc4f631dc6109004d8bc827e
2022-12-20 11:19:31 +01:00
Julia Kreger c70e9711e8 CI: Make inspector configuration UEFI aware
Also adds root=/dev/ram0 for the ramdisk initialization which seems
to be required with the switch to UEFI.

Depends-On: https://review.opendev.org/c/openstack/ironic/+/812167
Change-Id: I77aedafb121f9b8b009a424da11c82acca2216cd
2021-10-01 15:58:19 -07:00
Julia Kreger 2c2dfe986e Add rbac scope enforcement handling to devstack plugin
Adds explicit handling of scope enforcement setting by putting
the appropriate settings in place, and handling the appropriate
configuration to communicate back with ironic based upon supplied
environment variables.

Change-Id: Ia27b26990e52b5b4ffb49b2fee3bdcca41dd75a9
2021-06-30 10:41:29 -07:00
Zuul 8d06567a6e Merge "Add upgrade check, and json2yaml policy handling" 2021-02-17 14:36:57 +00:00
Moisés Guimarães de Medeiros 86b974b75c Fix memcached host address.
Since pymemcache 3.4.0, localhost will first translate to ipv6 ([::1])
if possible instead of ipv4 (127.0.0.1). Since memcached is running in
the ipv4 interface, we need to point tooz to the right endpoint.

Depends-On: https://review.opendev.org/c/openstack/requirements/+/772684
Signed-off-by: Moisés Guimarães de Medeiros <moguimar@redhat.com>
Change-Id: Iddf558cd598e41ffead11e164ce2fb1720d15f34
2021-01-28 16:44:08 +01:00
Julia Kreger 901c816b23 Add upgrade check, and json2yaml policy handling
Adds the ironic-inspector-status command as well with the
requried upgrade check.

Mostly based upon https://review.opendev.org/#/c/763262/
which is based upon https://review.opendev.org/#/c/748059/

Note: Also had to update the version of eventlet because
existing minimum requirement was seemingly incompatible with
prior versions and would prevent lower constraints testing
to proceed due to issues with ``os`` being patched by eventlet.

Change-Id: I1f479f834f1d79e9eeb591c58a52b6ab80c24534
2021-01-04 13:56:28 -08:00
Dmitry Tantsur 6a8d46b33b Listen on :: by default
On most target systems it will make it available on both V4 and V6.

Change-Id: Ie918bc8572ff7f0ce2712cbb248e8ee9bf4c3d20
2020-08-07 12:17:57 +02:00
Dmitry Tantsur 47315f9d07 devstack: Use uwsgi binary from path; temporary disable grenade
The previous uwsgi invocation assumed that the uwsgi binary is in the
same directory as the project binaries are installed into (probably
/usr/bin).  That may not be correct -- for example if using a packaged
uwsgi on Fedora the binary will live in /usr/sbin/uwsgi (not /usr/bin
where the project files from pip are).

Switch the invocation to just find it in the path.

Additionally, grenade is disabled, otherwise we cannot land this change
without fixing stable branches first.

Depends-On: https://review.opendev.org/#/c/731159/
Change-Id: I66d0554dc6d0ec6ef019b5310cd887a5415c2e03
2020-06-15 14:45:08 +02:00
Zuul c0318e9575 Merge "Update local.conf example file." 2020-05-08 15:02:10 +00:00
Riccardo Pittau a02fcd1e75 Add variable to set inspection timeout in tempest tests
Inspection can sometimes take longer based on multiple factors.
This patch adds a variable to control the node inspection timeout.

Change-Id: Iefac618d73ccba3b58baefdc6b993758622b8811
2020-05-06 15:45:30 +02:00
Zygimantas Matonis 8211ab469b Update local.conf example file.
This commit takes example local.conf from docs.openstack.org/ironic
and adds settings needed to run ironic-inpector.

Change-Id: Id1f4f1140526e27a1072181973a9ff695560c97b
2020-05-04 18:44:30 +00:00
Riccardo Pittau 216de6692b Add variable to set discovery timeout in tempest tests
Discovery can take longer based on which image we use for testing.
This patch adds a variable to control the discovery timeout.

Change-Id: I5654d4bf5131ab4c900f9dfd77358c5f8100b38a
2020-04-16 18:35:51 +02:00
Riccardo Pittau c28a4d0285 Install pymemcache explicitly
The pymemcache package is needed by ironic-inspector-api process
when running in non-standalone mode.
Since devstack doesn't install test-requirements anymore, we need
to force installation in the devstack plugin before the inspector
processes start.

Change-Id: Iff0de5eb99db4a3dcb0d5ff09b908484f9532492
2020-03-31 15:02:29 +02:00
Julia Kreger 0ce61c253b Change CoreOS to Centos for IPA
Swaps the URLs so we can eventually feel safe in removing
the CoreOS IPA images from tarballs.openstack.org.

Change-Id: I99425ab20d34019b327ac8887b382cfea74f779c
2020-02-18 13:17:18 -08:00
Dmitry Tantsur d1ab0a6b71 Create a job with boot and networking managed by ironic
The devstack plugin is updated to skip configuring PXE environment
if managed mode is requested, so that only ironic's PXE environment
is usable.

Change-Id: Ib7b83210a02b727d94dfa15bde43e7fee2e51531
Story: #1528920
Task: #37254
2019-12-02 12:08:19 +01:00
Kaifeng Wang 8e18d22b15 Remove calling enable_python3_package in devstack
The function was not used and was kept for backwards compatibility
in devstack [1].

[1] https://opendev.org/openstack/devstack/src/branch/master/inc/python#L143

Change-Id: Iddca055e07ba4a8bb9847871dffcb128f2c50c4f
2019-10-08 10:59:55 +08:00
Zuul 3ac52841cd Merge "Update non-standalone job to use uwsgi" 2019-09-09 08:33:04 +00:00
Zuul 514c1b536a Merge "Adds job to run inspector in non-standalone mode" 2019-09-09 08:33:00 +00:00
Michael Davies e0f659dc34 Add processing_hooks support in devstack
Allow ironic-inspector devstack to specify processing_hooks
in configuration, so as to be able to support non-default
hooks such as 'extra_hardware'.

Change-Id: I16c50d45eab2415854105117641bc7d9aca4dd22
2019-09-03 12:11:56 +09:30
Kaifeng Wang 551fb98fe8 Update non-standalone job to use uwsgi
Move ironic-inspector API under apache+uwsgi for the non-standalone job.

Story: 2001842
Task: 30376

Change-Id: I27291003b18beda0a9ddb79d38f615df9e8499ac
2019-08-31 10:01:59 +08:00
Kaifeng Wang 9b92204ef1 Adds job to run inspector in non-standalone mode
The job uses memcached for coordination backend, etcd3gw still has issue
on retrieving members.

Story: 2001842
Task: 30376

Change-Id: I76c359d6835e435968cbfb1a3f4318e73f0203ec
2019-08-22 11:27:45 +08:00
Zuul bd2c386cd7 Merge "Expose baremetal-introspection endpoint via mdns" 2019-05-29 10:19:51 +00:00
Dmitry Tantsur 258d7388a4 Expose baremetal-introspection endpoint via mdns
This change adds an option to publish the endpoint via mDNS on start
up and clean it up on tear down.

Story: #2005393
Task: #30384
Change-Id: Ia9407cb065979aac6761d3e4122d3884e45b559d
2019-05-22 13:58:55 +02:00
Dmitry Tantsur fc8a326915 devstack: check if swift is enabled when deciding on the data backend
Change-Id: I4aef05b3d3dd5defa36abdadc0802f1601a4f876
2019-05-21 12:43:19 +02:00
Dongcan Ye b8d1bda4c6 Add storing introspection data in database option
Ironic-inspector database is a default config for
our devstack deploy. Sometimes we won't to use Swift,
and directly use database for store data.

This patch adds a variable for introspection
store_data.

Depends-On: https://review.opendev.org/#/c/658238/
Change-Id: I6a8888b778f517bee49705ee74463ae39b2b9163
2019-05-10 02:49:23 +00:00
Dmitry Tantsur ada6b106c5 Pass reset_interfaces when updating a driver from the rules
Otherwise updating a driver requires listing all interfaces with their
new values. This patch is designed to be backportable, so it has
a fall-back to the previous behavior if the required API version and/or
ironicclient versions are not available.

Story: #2005148
Task: #29854
Depends-On: https://review.openstack.org/#/c/643264/
Change-Id: I115b92b9d7bcdbb1c03f0d259dbba6efd2baec2a
2019-03-14 11:02:40 +01:00
Julia Kreger e582e13c75 Add ironic API url to inspector IPA config
Pass the URL for the ironic API so features like fast-track
can be tested.

Story: #2004965

Change-Id: I96c47215ffe94a33d3a85e27e0b43236768dcacf
2019-02-25 06:34:31 -08:00
Julia Kreger 98f96ead29 Allow processing power_off to be defined
In testing discovery or more advanced workflows in CI
that incorporate with inspector, it is generally useful
to enable the post processing power setting to be updated.

Change-Id: Iece696e91edd78f42bde21738442d0b27ea3dafa
2019-02-13 14:48:09 -08:00
Kaifeng Wang a228912827 Wrap rpc server into oslo.service
This patch is part of work splitting inspector api and worker.
The rpc server is wrapped into oslo.service, and launched from
api process.

Now api and worker belongs to separate thread, functional tests
use the fake messaging driver, while devstack jobs use rabbitmq.

Change-Id: Ie03d16f9d115c3561723463dea6a57d2a763bcc6
Story: #2001842
Task: #23109
2018-10-23 09:17:42 +08:00
Kaifeng Wang 4f2f4d8f70 Test swift python3 support
Change-Id: I22766ea3f96c2b0911e1fa3219fab5411fa2b5fc
2018-10-11 09:59:29 +08:00
Zuul 361fb091a5 Merge "Change the default discovery driver to fake-hardware" 2018-04-30 19:09:12 +00:00
Dmitry Tantsur 66f318b339 Change the default discovery driver to fake-hardware
The fake classic driver will be removed this release.

Depends-On: Ia0e95cbc1bb4dbd32793705b876ab8b474b753ad
Change-Id: I85f2a2a3ed1ca689c639c60e86853c821e808105
2018-04-30 14:36:34 +00:00
Lenny Verkhovsky 697a2c1c25 Enable custom IRONIC_INSPECTOR_EXTRA_KERNEL_CMDLINE
In some cases we would like to add additional
params to kernel command line during inspection.
For instance to collect lldp info by adding
ipa-collect-lldp=1 to kernel command line.

Define IRONIC_INSPECTOR_EXTRA_KERNEL_CMDLINE in local.conf
when installing ironic-inspector with devstack

Change-Id: I935d03983ff9f92162b00363bae767262e73aa82
2018-03-28 07:39:08 +00:00
Dmitry Tantsur faf9d3508b Switch documentation to hardware types
The devstack example configuration is synchronized with
https://docs.openstack.org/ironic/latest/contributor/dev-quickstart.html

Also remove setting IRONIC_VM_LOGS_DIR from the example local.conf,
as it does not work, at least not on CentOS.

Change-Id: Ife51165742a8b762e84d5ac7ad807480669bfedb
2018-03-16 17:11:05 +01:00
Dmitry Tantsur 5cb04f5fb8 devstack: enable "fake" inspection implementation
It is now required due to https://review.openstack.org/550811

Depends-On: I705ec9d03d33623bd908e1a48f428062041b5d89
Change-Id: Ic1818f4f03de396550e99afc47da2be0212b47fa
2018-03-16 17:10:31 +01:00
Jim Rollenhagen 5c54c0938e Remove sample policy and config files
Now we have docs, lets point people there rather than attempting to
maintain a copy in tree.

Also update the devstack plugin to build ironic.conf from scratch rather
than from the sample.

Change-Id: Id65a4f803832fefe467d59147c39d2dea604ed3c
2018-02-06 10:36:12 -08:00
Dmitry Tantsur 314a6d37bc Switch the CI to hardware types
The granade job is left intact, as it requires IRONIC_ENABLED_INSPECT_INTERFACES
devstack configuration, which was introduced in Queens.

Change-Id: I0742a0c06a7ecf6ca03673f18f37fdb7ee003aa2
Depends-On: Ib0297f8936bba9449a02fb1a878981ab55687ef9
2018-01-27 09:44:29 +01:00
Pavlo Shchelokovskyy 918775cb01 Add keystoneauth adapters
Inspector sets API urls for ironic and swift from the config.
The better way would be to discovery them from the keystone
catalog.

Supporting this requires to register keystoneauth adapter
options to all config sections for service clients auth.
swiftclient still does not support adapter session client, so
pass all options from adapter explicitly.

New options were added 'service_type`, `service_name`, `region_name`
`endpoint_override`, `interfaces`.

Related-Bug: #1699547
Change-Id: I2e7ec02fdeeea21ef43136ddeabc98d499a8ba7f
Co-Authored-By: Anton Arefiev <aarefiev@mirantis.com>
2018-01-16 18:06:10 +00:00
Zuul d5f91618f4 Merge "Make discovery use dnsmasq dhcp filter" 2017-12-14 20:00:59 +00:00
Zuul f68cbba928 Merge "fix dvsm config deprecations" 2017-12-14 20:00:58 +00:00
Dmitry Tantsur b81c142824 devstack: set [service_available]ironic-inspector = True
Depends-On: Ic1d9fbdb1505662ef499229f700dffb719993a90
Change-Id: I78fead573222465d8e5dd9e172697d9d1f4634f9
2017-12-14 11:37:21 +01:00
dparalen a2e170e1ab Make discovery use dnsmasq dhcp filter
plugin.sh now recognizes additional dnsmasq pxe filter configuration
options:

  IRONIC_INSPECTOR_DHCP_HOSTSDIR
  IRONIC_INSPECTOR_DNSMASQ_START_COMMAND
  IRONIC_INSPECTOR_DNSMASQ_STOP_COMMAND

and configures both the inspector and dnsmasq accordingly.

The playbooks/legacy/ironic-inspector-tempest-dsvm-discovery/run.yaml now
executes with dnsmasq pxe filter driver.

The inspector_iniset function was updated to be able to set option values
consisting of multiple words.

Change-Id: Ib0879e0045e28ae778d2de6c1b5cd23f5fafda17
2017-12-13 14:12:02 +01:00
dparalen bea2df1b3f fix dvsm config deprecations
The [firewall] group was deprecated but our devstack still uses it.  This
patch replaces the IRONIC_INSPECTOR_MANAGE_FIREWALL=True/False variable
with an IRONIC_INSPECTOR_DHCP_FILTER variable with a default of 'iptables'
and sets the [pxe_filter]driver config value. The
IRONIC_INSPECTOR_INTERFACE is now set in the [iptables] config section.

Change-Id: Icf6fe6c6a98ab815edefe3c0e1ec3ce9a064bf2e
2017-12-13 14:10:47 +01:00
ankit 63c91ba562 Add py35 gate for ironic-inspector
This patch adds py35 gate for ironic-inspector and
also adds support for inspection in python3 environment
by rolling out configuration of swift in inspector.

Change-Id: I83429a1ba79208245f6c6e1f8b4eb8a16f014868
2017-11-27 05:10:08 +00:00
Vu Cong Tuan 02f38aa16f Remove SCREEN_LOGDIR from devstack
SCREEN_LOGDIR has already been deprecated [1]
[1] https://review.openstack.org/#/c/499186

Change-Id: I7b87a52b8d573d384e8c30b5122122609d60a1fc
2017-10-06 08:38:15 +07:00
Dmitry Tantsur 208b66dadf Remove ensure_logs_exist check during upgrade
We now run services under systemd, and this check is not necessary in
this case. Follow-up to commit ee538d1e7c1a92cb8412713e03cdfbcdacad7fab
to grenade.

Change-Id: I6371b7a244c1aebfba5cb46a595a7bf43a4ee454
Depends-On: I0d6d3e9e60785bb9b6a10c8c7a07867a5b2a5e6e
2017-08-18 11:28:46 +00:00
chenxing c28dd315bf Update the documentation link for doc migration
Change-Id: Ie3d175b4d910f49f8a54812926131448ff1ab4d5
2017-08-03 14:29:06 +00:00
Ramamani Yeleswarapu 74e27b9bf3 [Devstack] cleanup upgrade settings
We now enable plugin and services in project-config.
Drop those duplications from devstack/upgrade/settings.

Reference commit: 0204bd9ef4a09c791983bc1334fd32d09615ab63

Change-Id: Ie24f97eb3dfc8355845e864aebbd5184e900da30
Closes-Bug: #1672448
2017-06-30 10:47:22 -07:00
Ramamani Yeleswarapu 69157e5554 grenade: Only 'enable_plugin ironic-inspector' if not already in conf
To support multi-node grenade jobs we need to move enabling of the
ironic-inspector devstack plugin out of the ironic-inspector grenade
settings file devstack/upgrade/settings. But if we add enabling of the
ironic-inspector devstack plugin to project-config it will cause the gate
to break as the plugin will be enabled twice.

This patch is similar to the change done in ironic for the same purpose.

This checks to see if the ironic-inspector devstack plugin has already been
enabled:
  * If it has already been enabled it will not enable it again.
  * If it has not yet been enabled it will enable it.

This will allow us to update project-config to enable the ironic-inspector
devstack plugin and not break the gate.

After all the changes have landed we will propose a follow-up patch to
remove all this additonal logic and the enabling of the ironic-inspector
devstack plugin.

Change-Id: Id1a5de9a8aefe751b63c1a6a9f2c942fe4c957b1
Closes-Bug: #1672448
2017-06-14 13:49:00 -07:00