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
when switching nodes to use ansible-deploy,
use the `staging-ipmi-ansible` hw type with `staging-ansible`
deploy interface instead of the classic `pxe_ipmitool_ansible` driver.
This change is backward compatible with the job definition in
project-config which must remain the same until the stable/pike and
older branches are supported.
Also, change our ansible callback plugin settings only when testing
ansible-deploy interface.
Change-Id: Iba5eb5a5aace982561d4e11042a14c2de0dd8b98
Reuse `setenv` settings from parent `testenv` env
This is a followup to I3aefd97312bb9e5985e601dd192913247046d6e4
Change-Id: I4960a737a68ee146447cb6e4a5c6fe5b36a6dfc1
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
os-testr>=1.0 uses stestr as test runner instead of testrepository.
This patch adds appropriate config and git ignore options for stestr.
Change-Id: I3aefd97312bb9e5985e601dd192913247046d6e4
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
for each driver, install the 'other' dependencies first just in case
those contain something needed to build the Python dependencies when
installing them.
Change-Id: I5a35dcc2d7ee516e3db52f982d6af8205d7a7ba6
Co-Authored-By: Karim Boumedhel <karimboumedhel@gmail.com>
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
- partitioning scheme now closer resembles what's being done by IPA
- for partition images the root partition is last so that it can grow
- for whole-disk images, configdrive is created as far as possible
- added support for setting disk label for created partition table,
supported are 'gpt' and 'msdos' (default)
- for 'gpt' disks, a bios_grub partiton is prepended to standard ones
- 'parted' module for Ansible was renamed to ``ironic_parted`` to not
shadow ``parted`` module included in Ansible 2.3
It was also rewritten to be cleaner and more stable:
- changed accepted module arguments
- added support for units (MiB and % for now)
- added more validations
- left support for msdos and gpt partition tables only
- partitions are created one by one, and actual block devices created
are searched for and reported.
- module returns only after all partitions are available for write
Change-Id: I4d6d7619c6f3ba25c29263ffe5d778698e598429
DeprecationWarning: "Using the 'enforce_type' argument is deprecated
in version '4.0' and will be removed in version '5.0': The argument
enforce_type has changed its default value to True and then will
be removed completely."
Change-Id: Ia189a7ee1d4e2c238cfb0e25d00c250be2f231b9
Possibly existing out-of-tree playbooks will be imcompatible
with this version and must be rewritten!
Changes include:
- all info passed into ansible playbooks from ironic is now available in
the playbooks as elements of 'ironic' dictionary to better differentiate
those from other vars possibly created/set inside playbooks.
- any field of node's instance_info having a form of "image_<field>"
is now available in playbooks as "ironic.image.<field>" var.
- 'parted' tag in playbooks is removed and instead differentiation
between partition and whole-disk imaged is being done based on
ironic.image.type var value.
- 'shutdown' tag is removed, and soft power-off is moved to a separate
playbook, defined by new driver_info field 'ansible_shutdown_playbook'
('shutdown.yaml' by default)
- default 'deploy' role is split into smaller roles,
each targeting a separate stage of deployment process
to faciliate customiation and re-use
- discover - e.g. set root device and image target
- prepare - if needed, prepare system, e.g. create partitions
- deploy - download/convert/write user image and configdrive
- configure - post-deployment steps, e.g. installing the bootloader
Documentation is updated.
Change-Id: I158a96d26dc9a114b6b607267c13e3ee1939cac9
To use this driver property, tasks that soft poweroff the deploy ramdisk
in-band are tagged with additional 'shutdown' tag and are executed
separately.
Change-Id: Ie7bae9dd9fa17a764599390362e1c7f6926c7746
make driver much closer to AgentDeploy by reusing HeartbeatMixin and
implementing other required methods
This effectively requires ironic version > 7.0
Change-Id: I9ba5186ecdae49a17785a109341050c828c849cc
- make cleaning re-use url from agent heartbeat as node ip
- improve validation of cleaning steps
- require step names to be present and unique
Change-Id: I63067c2d91a05673f5f46c38a4ffbc9c0999342c
this function was moved to common place in deploy_utils and now can be
easily reused.
Also, it does basic disk layout parsing and validation so there is no
more need to do it in ansible-deploy driver.
Change-Id: I2054dc1f124a62ef1f45c8a0dad0b755e8de23ea
Specify 'ironic_staging_drivers' as the name of the application for
the flake8-import-order plugin. That way it knows that imports of
ironic_staging_drivers should come after external libraries.
Change-Id: I7e8046baea6de65f9473f34fb84837380a41699a
bring ironic_staging_drivers pep8 checks in line with main ironic:
- update hacking version to the one from g-r
- add import order checks, with the same style
- enable same additional checks from hacking
Only two small violations found, so better to update now while it's
easy.
Change-Id: I12459a1ffdb122f50ce25230e310412f18717ef5
During Newton release some methods in ironic have changed there call
signatures adding arguments useful for ansible-deploy driver.
This patch removes workarounds that were in place for backward
compatibility when calling these methods/functions.
Effectively ansible-deploy driver now requires ironic of Newton release
or newer.
Change-Id: Ic6aa1516fe76b68f8c33aaf021221efb05cf3807