104 Commits

Author SHA1 Message Date
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
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
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
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
Jenkins
2addd1bf66 Merge "Connect brbm-inspector and brbm when needed" 2017-05-03 09:59:06 +00:00
vmud213
41fcfe612c Connect brbm-inspector and brbm when needed
Ensure that brbm-inspector is connected to brbm only when
IRONIC_IS_HARDWARE=False and IRONIC_BAREMETAL_BASIC_OPS=True.
Otherwise bridge brbm does not exist and stack.sh exits with
error.

Change-Id: I8c255a0140ec6b33f801d13ca10a2bb19e7469f6
Closes-Bug: #1670595
2017-05-02 11:21:14 +00:00
Dmitry Tantsur
90c7e48eb4 [devstack] fix working with USE_SYSTEMD=True
* Use absolute path for dnsmasq, as systemd rejects relative and implicit paths
* Provide "root" user to run_process instead of an explicit sudo
* Use the generic devstack function to setup logging

Change-Id: I4511a60ccb7c374393bdf78a03507ab958bbb9e7
2017-04-27 13:25:20 +02:00
Anton Arefiev
db529f3f3f Don't set MTU for inspector veth iface on hardware
We don't create brbm-inspector veth interface in case hardware env,
so setting MTU on non-existing interface fails.

Change-Id: I126277f655b7dc33f43e4c0e4e1730da2013efd2
Closes-Bug: #1680246
2017-04-06 10:49:51 +03:00
Vasyl Saienko
328acd4d0a [Devstack]: pick correct MTU for br-inspector veth
This patch pick correct MTU for veth pair created by inspector to avoid
errors when packets are dropped.

Change-Id: Ie1036ca75c9561393f4efc2478d0a2c9cba9e089
2017-04-04 14:29:54 +00:00
dparalen
ae882c5b02 Use IRONIC_VM_NETWORK_BRIDGE
devstack/plugin.sh hardwires brbm as the VM bridge.
Referencing ironic plugin VM variable makes more sense.

Change-Id: I89fe2050bc4fd166fc8e0b649daa195091364ba2
Closes-Bug: 1641019
2017-02-19 14:14:21 +01:00
Jenkins
f9915931b2 Merge "Ensure devstack does not try to delete a physical NIC" 2017-02-10 14:16:07 +00:00
Sam Betts
5d0c7394e0 Ensure devstack does not try to delete a physical NIC
Part of ironic-inspector devstack plugins cleanup proceedure is to try
to delete the ironic-inspector network interface if it isn't the ovs
bridge. This means that if you configure devstack to point at a real
network interface it'll try to delete it and fail breaking devstack.

Change-Id: I4f18edcf86278cce787a5f33f3d9f2444d738f2c
2017-02-10 11:05:21 +00:00
Jenkins
805dbca194 Merge "Deprecated log_bmc_address option" 2017-02-01 12:00:12 +00:00
Jenkins
97b33e75a9 Merge "[devstack] Stop installing jq, we're not using it in tests any more" 2017-01-31 12:48:22 +00:00
Jenkins
b3e0884eaa Merge "Devstack: don't rely on Ironic local vars" 2017-01-26 17:47:07 +00:00