When using virtual media, restarting ironic-python-agent
leads to errors like 'File exists'. This is because
we use static directory (/vmedia_mnt) as mount path
and we don't remove it. It's better to use mkdtemp to create
a temporary directory for mounting virtual media
device.
Change-Id: Ibb4c3d3a2024cf51ef198bd396fb9e86ad72a320
When parameters are passed to agent through virtual
media, the device might be connected only for a short
while (dur to swift temp-url expiration, ironic removing
the floppy image, etc). This change will enable agent
to cache the parameters and use it for any time later on.
After caching, the agent parameters need not be re-read
from /proc/cmdline or from the virtual media device.
Implements: blueprint ipa-as-default-ramdisk
Change-Id: Ia8c7020c91c987ec884c5640421f0583dbf1c3d9
This patch add support for root device hints on IPA. Instead of picking
the first disk >= 4G, if the hints are specified IPA will look at it
to decide which device it should pick for the deployment. The initial
patch supports the following hints: Size, model, WWN, serial, vendor.
Implements: blueprint ipa-as-default-ramdisk
Implements: blueprint root-device-hints
Change-Id: I2b00b3fb3b61001033750dd8951f9353d6f2e361
This commit changes agent deploy ramdisk to find out
the virtual media device by using labels instead of
looking at the model of block device. This helps in
finding out the device irrespective of the hardware.
Corresponding Ironic change is
If5b78d9af7048f2631d050ee5ce01ab7a67e2354.
Closes-Bug: 1429340
Change-Id: Ib6cc226dc4fb341d913f707737493c31a3f77152
The function _get_agent_params() parse the parameters passed to the agent
via kernel cmdline or vmedia. Other parts of the code needs to access
these parameters as well, so this patch is moving _get_agent_params()
and the related functions to a common place (utils.py).
Change-Id: I860f84d1d13511fff56d4aa56358ee597a9760d5
Update openstack/common files and use oslo.utils, oslo.concurrency
instead of modules from oslo-incubator.
Additionally, sort and set requirements.txt to correct versions in
openstack/requirements in order to ensure pep8 passes.
Change-Id: I15f88a31a4c889bba27cd0cd1c7fc481c0c0b51e
Adding new methods to utils won't work as the circular import appears
between errors.py and utils.py.
Introduce ExecuteCommandMixin and use it for IronicPythonAgent and
FlowExtension (in future patch).
Also add tests for its.
Change-Id: Id95b31349292a7967d2ee66ec82c1662d8e5de94
1) Added a py33 environment to tox
2) Updated tests to mock the correctly named builtins.open based on
python version
3) Other minor compatibility fixes
Tests for Python 3.3 will not pass due to this bug:
https://github.com/eventlet/eventlet/issues/83 among possibly others in
eventlet.
Change-Id: Ie4b512a926fa690ee77a71a89851c871ea1f6be0
This patch moves _split_command from IronicPythoAgent class to
utils module. Also fixes import looping.
Change-Id: Ibf2b0b3885286b9ad78db64cf9e195de4ad627ad
It is needed to run OS commands. It uses
oslo processutils. It is just a copy of the
same method in openstack/ironic except
using rootwrap was removed.
Change-Id: I2efede22b1fa25febe91879c0fefcdfc7f3d1dd5