A Python agent for provisioning and deprovisioning Bare Metal servers.
Go to file
Julia Kreger 33c96d0066 Add timeout operations to try and prevent hang on read()
Socket read operations can be blocking and may not timeout as
expected when thinking of timeouts at the beginning of a
socket request. This can occur when streaming file contents
down to the agent and there is a hard connectivity break.

In other words, we could be in a situation like:

- read(fd, len) - Gets data
- Select returns context to the program, we do things with data.
** hard connectivity break for next 90 seconds**
-  read(fd, len) - We drain the in-memory buffer side of the socket.
-  Select returns context, we do things with our remaining data
** Server retransmits **
** Server times out due to no ack **
** Server closes socket and issues a FIN,RST packet to the client **
** Connectivity restored, Client never got FIN,RST **
** Client socket still waiting for more data **
- read(fd, len) - No data returned
- Select returns, yet we have no data to act on as the buffer is
  empty OR the buffered data doesn't meet our requried read len value.
  tl;dr noop
- read(fd, len) <-- We continue to try and read until the socket is
                    recognized as dead, which could be a long time.

NOTE: The above read()s are python's read() on an contents being
      streamed. Lower level reads exist, but brains will hurt
      if we try to cover the dynamics at that level.

As such, we need to keep an eye on when the last time we
received a packet, and treat that as if we have timed out
or not. Requests periodically yeilds back even when no data
has been received, in order to allow the caller to wall
clock the progress/status and take appropriate action.

When we exceed the timeout time value with our wall clock,
we will fail the download.

Change-Id: I7214fc9dbd903789c9e39ee809f05454aeb5a240
(cherry picked from commit c5b97eb781)
2020-06-29 15:46:06 -07:00
doc/source [doc] How to pause the IPA for debugging 2020-02-28 11:03:25 +01:00
imagebuild Remove imagebuild/common, it's not longer used by IPA-builder 2019-10-16 14:14:13 +02:00
ironic_python_agent Add timeout operations to try and prevent hang on read() 2020-06-29 15:46:06 -07:00
releasenotes Add timeout operations to try and prevent hang on read() 2020-06-29 15:46:06 -07:00
tools Adds bandit template and exclude some of tests 2019-06-20 14:39:36 +08:00
zuul.d CI: raise DIB jobs memory to 3 GiB 2020-05-15 12:06:25 +00:00
.gitignore Remove the configuration sample file 2019-12-02 12:11:58 +01:00
.gitreview Update .gitreview for stable/ussuri 2020-04-27 14:25:42 +00:00
.stestr.conf Migrate to stestr as unit tests runner 2017-09-26 09:23:53 -07:00
.travis.yml Preparing for OpenStack testing environment 2014-03-11 12:50:12 -07:00
CONTRIBUTING.rst Change launchpad to StoryBoard 2018-03-28 14:15:29 +00:00
LICENSE add license file 2013-09-17 13:41:59 -07:00
README.rst Replace git.openstack.org URLs with opendev.org URLs 2019-04-25 09:23:11 +08:00
bindep.txt Don't try to put a bootloader in place when bootable 2019-11-01 13:58:55 +00:00
lower-constraints.txt Upgrade flake8-import-order version to 0.17.1 2020-04-21 16:07:39 +02:00
plugin-requirements.txt Update hardware to 0.24,0 2020-01-15 12:44:31 +01:00
proxy.sh Add support for proxy servers during image build 2016-02-04 14:27:49 -08:00
requirements.txt Allow specifying target devices for software RAID 2020-03-17 13:03:24 +01:00
setup.cfg Merge "Add an ability to run in-band deploy steps" 2020-04-09 09:31:49 +00:00
setup.py Cleanup py27 support 2020-04-05 10:46:10 +02:00
test-requirements.txt Upgrade flake8-import-order version to 0.17.1 2020-04-21 16:07:39 +02:00
tox.ini Update TOX_CONSTRAINTS_FILE for stable/ussuri 2020-04-27 14:25:44 +00:00

README.rst

Ironic Python Agent

Team and repository tags

image

Overview

An agent for controlling and deploying Ironic controlled baremetal nodes.

The ironic-python-agent works with the agent driver in Ironic to provision the node. Starting with ironic-python-agent running on a ramdisk on the unprovisioned node, Ironic makes API calls to ironic-python-agent to provision the machine. This allows for greater control and flexibility of the entire deployment process.

The ironic-python-agent may also be used with the original Ironic pxe drivers as of the Kilo OpenStack release.

Building the IPA deployment ramdisk

For more information see the Image Builder section of the Ironic Python Agent developer guide.

Using IPA with devstack

This is covered in the Deploying Ironic with DevStack section of the Ironic dev-quickstart guide.

Project Resources

Project status, features, and bugs are tracked on StoryBoard:

https://storyboard.openstack.org/#!/project/947

Developer documentation can be found here:

https://docs.openstack.org/ironic-python-agent/latest/

Release notes for the project are available at:

https://docs.openstack.org/releasenotes/ironic-python-agent/

Source code repository for the project is located at:

https://opendev.org/openstack/ironic-python-agent/

IRC channel:

#openstack-ironic

To contribute, start here: Openstack: How to contribute.