Commit Graph

12 Commits

Author SHA1 Message Date
Pavlo Shchelokovskyy d14cd501d7 Ignore connection errors when getting ironic ports
as a followup to I24b08612c4ffc6aca60ca08f3ff5cc769c7c041d,
this solves the case when connectivity between inspector and ironic is
broken, which can lead to the same FSM being stuck in uninitialized mode
it can't get out of w/o restart.

Change-Id: Ie238a2fca7cc5ef4961c0cb0e639ffbbe69556f7
Story: #2008971
Task: #42611
2022-07-15 15:24:42 +00:00
Vladyslav Drok c3b316677c Do not reset FSM when ironic ports cant be queried
It can cause problems, as if a single sync fails, FSM state will be
reset and not put back to initialized state until inspector restart.

Change-Id: I24b08612c4ffc6aca60ca08f3ff5cc769c7c041d
Story: #2008971
Task: #42611
2021-06-14 17:14:54 +03:00
Harald Jensås 7a067a97a8 pxe filter - option to always block unknown hosts
It is not always desired to open the DHCP server for any host
just because introspection is active. Add an option to ensure
that only nodes being introspected are added to the DHCP servers
allow list.

Also adds ethoib support in the dnsmasq PXE filter.

Also fix a typo in ethoib_interfaces option help text.

Change-Id: I4cd7f4f0a449dcc23897ec9288cb57ec9bd647d7
2020-09-28 12:18:00 +02:00
Harald Jensås a1f8926cd1 Remove non-inclusive language in pxe filter
Replaces the use of black/white-list with deny/allow-list
in the pxe filter.

Change-Id: I84e6343fc13e4c4c02521499632a07e782088057
2020-07-09 12:06:03 +02:00
Riccardo Pittau 3accdfbbc6 Use openstacksdk for ironic module
This patches removes the ironic-client dependency from the
ironic module in favor of openstacksdk.

Increase minimum required version of openstacksdk to use
recent added features.

Change-Id: I31964179835ad454e8205a59f483b419de4fb62d
2020-03-23 14:28:09 +01:00
Dmitry Tantsur 6023270c93 Stop logging the iptables command line
It's already done by processutils (with stdout and stderr as well),
so it only leads to duplicate log records.

Change-Id: Ie9a06c577523cd3dd4c7b74a33642790eb89a8fb
2019-10-18 12:13:54 +02:00
Dongcan Ye dc7e4d26ae pxe_filter: fix get blacklist error
According to [1], the Port address and extra
field in the same level.

Method _get_blacklist should pass port list instead
port.address list for InfiniBand mapping.

[1] https://github.com/openstack/ironic/blob/master/ironic/objects/port.py

Story: 2005729
Task: 31077
Change-Id: Iedc321c840f18fc1aa856b857da2c35318a538ae
2019-05-18 08:38:29 +00:00
Kaifeng Wang f37eb0fc58 Support ip6tables for iptables pxe filter
Adds a configuration option [iptables]ip_version to specify the
desired ip version for the iptables pxe filter, which can be set to
4 or 6. When set to 6, the iptables pxe filter will use ip6tables
command to manage rules for the port 547 which is the port of DHCPv6
server side.

The string type is used to make room for the future, when there is need
to automatically determine ip version from the binding interface.

Change-Id: I7de2be5950a23def3ec6490f2e6dfa3d5c42798a
Story: 1756012
Task: 11411
2018-11-07 09:53:47 +08:00
Kaifeng Wang 1ef55e3603 Replace subprocess with processutils
Trying to fix the dsvm-python3 job.

Depends-On: https://review.openstack.org/608620
Change-Id: Ibdfed9545a26e752ab7aeed2db122a368c3c06fb
2018-10-08 11:45:25 +02:00
Dmitry Tantsur 3237511cc6 Retry port lists on failure in PXE filter periodic sync
These calls are subject to transient network problems, we should
not abort ironic-inspector process in this case. Also due to
bug 1748893 the port listing API can sometimes return HTTP 400.

This change retries port listing 5 times with 1 second break
before aborting the periodic task and thus the process.

This change introduces a dependency on the retrying library,
which is already widely used in OpenStack (including ironic).

Change-Id: I92fd70ca5692ce9f6798eedf9e540d5aa7c6f1af
Closes-Bug: #1748893
2018-02-14 15:10:39 +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
dparalen 7b27585463 Refactoring the firewall
Adopting the PXE filter interface/driver concept

Related-Bug: 1665666
Change-Id: If83db978080b9c4e5d51ba50bbe8ed26e29abe83
2017-10-19 16:38:15 +02:00