- use generic test template
- remove autospec in power test as we don't use actual libvirt
module to test. The libvirt-python module is fully mocked.
Change-Id: Ied36a8afb818422c643edca8a2feeec977b53551
If byte encoded strings are passed to the
ovirt SDK. We get the error outlined here:
https://bugzilla.redhat.com/show_bug.cgi?id=1924928
This change leaves the string validation in place,
but passes while raising a warning. Ultimately,
non-encoded strings are provided to ovirt SDK
to prevent the mentioned issue.
Change-Id: I8e62a650ebae974017e17342ec17aa61ba67eed9
Currently a new connection is created for every API call which is
never closed. This results in open connections accumulating over time
due to periodic calls like power state polling, which is further
compounded by the number of ovirt nodes deployed.
This change converts _getvm into a generator based context manager so
that the connection can be closed after every call.
Change-Id: I30f9695c591f72dae21467b0b31f6f67fad7cc8a
Since we've dropped support for Python 2.7, it's time to look at
the bright future that Python 3.x will bring and stop forcing
compatibility with older versions.
This patch removes the six library from requirements, not
looking back.
Change-Id: I41ef2d06dcdfe2fb3fd47fe877149ec9a29e37fb
The enabled_drivers option has been removed since a while, this
patch replace the latest 2 entries in a unit test with
enabled_hardware_types
Change-Id: I8432eb58c44ebbcaccffa801e3bc5b791e37c84b
Fixing a typo in an exception message.
Found during removal of Python 3.5 test in favor of
Python 3.7 in https://review.opendev.org/654641
Change-Id: I23feb09697229de74f6522a0d8cb9ab2a53428ca
The WakeOnLanPower class is designed to POWER_ON using WOL and log
REBOOT/POWER_OFF operations as they require manual intervention.
However the POWER_OFF state was mistakenly omitted from
get_supported_power_states, which results in an error instead of a log entry.
Introspection on tripleo fails as a result of this.
Story: #2005292
Task: #30162
Change-Id: I34ee6da8600d6e6107f00732bf1c34c5b745b333
The classic drivers had management=None, so no management actions
were tried. The hardware types have management=fake, which does not
support local boot. This ends up in a serious feature regression.
The intended behavior is to use static boot management, which is what
the noop management is about, so use it.
Change-Id: Id46e2747facabda922e1544fa59e90fb31a04a62
It is not needed in most cases, but was blindly cargo-culted everywhere.
It will be removed with the switch to hardware types.
Change-Id: I1de6be6ab8b0c210f457fa0c1cd685c42406b888
The PowerInterface methods set_power_state() and reboot() were enhanced
to take a 'timeout' parameter [1].
In the Queens release [2] , the conductor assumes that all PowerInterfaces
can support this timeout parameter. This patch changes the PowerInterfaces
so that they accept a 'timeout' parameter for reboot() and set_power_state().
The PowerInterfaces log a warning if the parameter is specified when it isn't
supported.
[1] f15d5b9a37260b3876f9dadeb030412e6e1053b2
[2] 9e87cebc12102cbb3ae47366836dcd7c3e439828
Change-Id: I0904958f1a7f981204ba41bfbdc0083182c5622e
it is now part of ironic itself, and version in ironic-staging-drivers
conflicts with version in ironic, blocking ironic-conductor from
starting when ironic-staging-drivers is installed.
Change-Id: I917b7399b3249143ba6cf75f61d96a1c64f94e7d
This patch introduces new type of power and management drivers for ovirt vms.
Change-Id: Iebf31db70dfd800d47399c69d7b2255467a87a1d
Closes-Bug: #1564841
this is a followup to Id2bfd1ed552ed566b14f6ac5b222c011ff918bee
while adapting playbooks for Ansible 2.4 compatibility,
this place was missed, and playbooks tried to install grub
to a wrong device.
This patch re-uses the "ironic_root_device" fact set during discovery
as grub install target.
Change-Id: Ibfd885b4702ff86c802a8d184ebb406aae9262b5
some unit tests for ansible deploy interface were using
dumb monkeypatch instead of proper mocking.
Change-Id: I317e1b8e9f0ec4cb792ee09ce592cbd83f956b75
Apparently only checking that pyudev is importable is not enough,
as it can fail later if udev itself is not available on the system
Also bring the (empty) default between these two to be empty dict,
and fix logging invocations in WWN fact collecting module.
Change-Id: I137990280e90c9ca2687b38d98f6c5343e26e8d0
- fix callback plugin (add a new public methdod)
- ansible_devices fact now contains many more devices
(at least with tinyipa ramdisk and virtual HW),
so by default we now attempt to use only devices that
have non-empty 'host' attribute, and thus are
real block devices on some controller
(not memory-mapped files, loop devices etc)
+ during provisioning, the default target for image
when root device hints are absent will be the first such device
+ during cleaning, only such devices will be attempted to
be cleaned
Change-Id: Id2bfd1ed552ed566b14f6ac5b222c011ff918bee
Closes-Bug: #1718361
this patch deprecates classic drivers defined by ironic_staging_drivers
package in favor of hardware types.
A proper warning is shown on classic drivers init.
DevStack plugin no longer enables any classic driver from staging
drivers, and only hardware types are tested.
Change-Id: Ic53b71c94287804f3c66f5e9a6249f605c234211
This patch adds a number of configration options and playbook variables
that govern SSL validation and authentication when accessing the image
store to download the image and configdrive from the deploy ramdisk.
Most of them are not yet used in the default set of playbooks provided
with the driver
(for example some of them require yet unreleased Ansible 2.4),
however they can be used by custom playbooks, for example to upload
and enable those custom CA bundle and cert files to the ramdisk at
deploy time.
This patch also sets DevStack to disable validation of image store SSL
certificate by ansible deploy interface (similar to how IPA is currently
confugured).
This patch also caps Anisble < 2.4, since our custom callback plugin
has troubles with the newest Ansible 2.4 version (to be fixed later).
Change-Id: Id40f1067361cc32e98973c70fc5cd3d4242308d0
Closes-Bug: #1717858
Classic drivers will be deprecated, add hardware types for
staging drivers. "staging-" prefix used for entrypoints.
The DevStack plugin is amended to enable all hardware types and
interfaces registered by the ironic-staging-driver package
to test that they do not break ironic-conductor start when enabled
For this a new script is added to read entrypoints registered by a Python
package.
As previousely, by default `iboot` drivers are not enabled
as they require a client library not available on PyPI.
Change-Id: I26541adc9b99f7a436be0e3f8ef31c0ff64ff5d4
since DevStack is now using systemd, we can leverage that when setting
up callback_plugin used by Ansible started by ansble-deploy driver.
This patch adds two more options to the ironic_log callback plugin
configuration file - use_journal and use_syslog.
When set, they will override respective values from ironic config.
The callback plugin config is set to force usage of journald by default
in the devstack plugin.
Change-Id: I5c788dd6621c95a28aecc727a3988ad4f101b2a8
SSH-based power and management interfaces are unsupported and about to
be removed from ironic.
Change-Id: I0d00fbabb7402ef96bb26a68b64d04ae3231a5d5
Related-Bug: #1570301
The i18n team has decided not to translate the logs because it
seems like it not very useful; operators prefer to have them in
English so that they can search for those strings on the internet.
Change-Id: Ifcb4c4331440d94322a56a1e3bed04cff453cbad
Related-Bug: #1674374
this is a followup to I4d6d7619c6f3ba25c29263ffe5d778698e598429
([ansible] Improve partition images support)
fixes some typos and removes commented/unused code.
Change-Id: Iafda13a657956bc04b591c0911cf3338705f33c4
If disks are not being shred completely, some partitioning metadata
that was stored in the headers of partitions themselves can still
survive partition table data cleanup, and later can interfere with new
partitioning scheme on nodes when new partition sizes are the same but
their metadata (for example boot flag) is changed.
This patch adds a set of tasks that will wipe a small amount of blocks
(1024 by default) before and after partition boundatries to make sure
those will not be re-read.
Change-Id: I251d77be24ab6052d3f1f8cb5af68d477cf1f270
Co-Authored-By: Ihor Pukha <ipukha@mirantis.com>
This patch adds support for Ironic root hints to ansible deploy driver.
The advanced root hints based on oslo.utils operators are not supported yet,
only exact matches.
Change-Id: I6fd468cfa9a7792fa0e55aa58c337396e13d76ee