This change passes the agent object into extensions, such that
they may call agent methods as needed. It also causes async
commands to force a heartbeat immediately after completing the
command. This allows Ironic to get a heartbeat and continue
work as quickly as possible, while also allowing deployers to
configure Ironic (agent) to heartbeat less often.
Change-Id: Ib3c3a43dfd0ed4ed51b7d52ac099f01181ca822f
poll() does not rely on absolute time.
This fixes an issue where the system clock may be changed, and
the heartbeat thread would stop heartbeating.
This also gives us flexibility to force a heartbeat in a later
change.
Change-Id: Ifde7b53f59788addc43a5dac95c7b6519d87e834
Closes-Bug: 1355375
This commit adds the '-E' option for all the sudo commands
in build script of agent which causes it to preserve environment
variables.
Change-Id: Ic3fbc4ee8189cc82ef99359bf61eef33dae40a5a
Closes-Bug: 1371418
This script adds support to build iso image from the given
kernel and ramdisk
Change-Id: I15dd8b8663af15b4194299986792ad8e6487508b
Implements: blueprint ilo-virtualmedia-ipa
PyPy has been failing locally for a month or two. On Ubuntu 14.04:
"No module named _bsddb", on 12.04: "Not a .py file:
/data/dev/work/ironic-python-agent/.tox/pypy/build/setuptools/
setuptools/cli-32.exe"
PyPy isn't enabled as a job in the gate yet (even non-voting). Until
we sort the gate out and fix the above errors, we should remove it
from the default tox runlist.
Change-Id: I34c0a72edebc296b79c6058e64ffb98f60979bcb
sync_command and async_command in ironic_python_agent/extensions/base.py
are implemented so that they change decorated method signature,
which is really bad practice. Example:
@sync_command
def orig_method(self, **kw):
...
sync_command decorator returns lambda which has one additional
argument 'command_name'
def sync_command(func):
def decorated(self, command_name, **kw):
...
func(self, **kw)
...
return decorated
Additional parameter 'command_name' is moved from decorated function to
decorator signature in both decorators. Every call of decorated functions
is fixed, BaseAgentExtension.execute is updated to not send this extra
argument. BaseAgentExtension.__init__ automatically generates command_map
from decorated methods.
Change-Id: Iff0f495bc8d9c731892feb0f4759a7f10ee76328
Closes-Bug: 1314148
This commit fixes an exception that was not properly raised, and
also makes the exception more relevant.
This also fixes an outstanding bug where, if the agent
was not associated with a node, get_node_uuid() would fail in an
unexpected manner.
Change-Id: Ifca474a73dd50b5fd2242e5b7e938a5db04f27a8
I updated the URL to point to the correct path to the uploaded IPA
ramdisk, as well as adding a note about running IPA inside Virtual
Media.
Change-Id: Ib4f3da5ea9fd0172e9d4ff018fd5a2890ddb978b
Two changes, first is that we now upload individual files instead of a
tarball of both. The other is a catch from Jim to properly use building.
Change-Id: Icfaccb190d066feee5f30aed83c1b830fbe9cd89
Co-Authored-By: Jim Rollenhagen <jim@jimrollenhagen.com>
This commit adds support for booting IPA from virtual
media cdrom. When IPA is booted over virtual media cdrom,
the parameters to the IPA are passed in a text file within
the virtual media floppy.
Change-Id: Ia04585416aada85022af73fb2b945bd3895606f0
Closes-Bug: #1358723
This change allows the image build script to support the existing
jobs that build images for distribution, as well as future jobs that
build the image within devstack for testing.
Change-Id: I6cae0ce336fde872678fafe6ba2b31af465944a1
Python 2.7 is being removed, somehow, despite python3 being specified.
This should fix the issue and make the container usable again.
Change-Id: Ida8aa7e527f8230cc893adf9192003340fc0dbf5
Bump IPA container to use trusty. This gives us a newer version of pip
which is required to install newer requirements that are packaged as
wheels.
Only other change to dockerfile is to ensure python 3 is
removed, in order to avoid raising the size of the container. After this
patch, the agent image goes up in size 3M, which is managable.
Change-Id: I11f39fadb87d42dd15885e6afc63df2c927ce771
Two reasons:
1) Use a build that is marked stable
2) Fixes an issue where boot hangs for minutes on updating CA
things, which enables much faster deploy times.
Change-Id: Ic7fca96f0dfe87065e2df5feaf2c29efc662a0e1
While auditing our dependencies in antipiation of DIB elements being
created, I found these dependencies not being explicitly installed by
docker. We should explicitly install them even if we expect them to
exist in the base image.
Change-Id: I38ec7167ae24b9abbda08cbbbdd55205612b7288
The previous implementation of list_block_devices used blockdev,
which would list partitions, software RAID and other devices as block devices.
By switching to lsblk, the agent can filter down to only physical block
devices, which is all the agent cares about for any of its operations.
This change adds two new fields to the BlockDevice class: model, a string of
the block devices reported model, and rotational, a boolean representing a
spinning disk (True) or a solid state disk (False). This data can be useful
for vendor hardware managers.
Change-Id: I385c3bb378c2c49385bca14a1d7efa074933becf
Closes-Bug: 1344351
Finding an IPv4 address to advertise fails and crashes if the
interface exists but has no valid IPs. This can be fixed by
adding KeyError to the exceptions caught.
Change-Id: I60204427ec5201696d02c5c26f4b43a00d794413
Closes-Bug: #1342448
http://coreos.com/docs/cluster-management/setup/cloudinit-cloud-config/
describes how to use coreos-cloudinit to configure a node. Migrate to
using this instead of a single BASH script (which is deprecated).
This also means we need the latest version of CoreOS, so I've updated
coreos-oem-inject.py to pull from the most recent copies, and this
includes moving to the amd64-usr builds.
Change-Id: I620b8fec1bfc5d58b560434d17b4f617734fadb8
When building, `make` ends up calling `docker`, which needs to be
done via sudo. This runs make with sudo.
Change-Id: I49558dff3a00e1795d3fe0489a2ff183f00e6183
This changes the email in setup.cfg from an internal Rackspace
email to the openstack-dev list, and the author to OpenStack.
Change-Id: Iebd652c157ba639c72898b7554a23fe9bed77c22
We now do builds of the IPA CoreOS ramdisk in the post script. (Ref:
openstack-infra/config/tree/modules/openstack_project/files/
jenkins_job_builder/config/ironic-python-agent-jobs.yaml)
We should store the build script for this in the local repo so we can
modify it as needed without needing commits to openstack-infra/config.
Change-Id: I92655c0552179613c23b129d1e2dce2ef1643391
Because IPA now detects what IP to advertise, specifying this in the PXE
config should no longer be a recommended default.
Change-Id: I3a854fd07cd7987425288b61fd6eeac925db0bff
This:
- includes a link to new gate-built images
- updates the kernel command line options (none needed in newer
images)
Change-Id: I79e9a0ab7de1dc61dd035bebf81c87136e4c3202
These comments were left in write_image.sh from the 'teeth-agent' days
when these were split into two scripts. I moved the comment into the
correct script and clarified what it means.
Change-Id: Iccdcd925be5c94d993d8125534264f496de4594f
This cleanup command was invalid. Not removing the apt lists adds a few
unneeded megabytes to the agent image.
Change-Id: I55ad4434d20a8984ea4cf5866360fd2622d811f4