21 Commits

Author SHA1 Message Date
Yuriy Zveryanskyy
c1d9f44dbd Add hardware types
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
2017-08-31 11:34:40 +00:00
Pavlo Shchelokovskyy
47d5e7a7b9 [ansible] add journald and syslog loggers
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
2017-07-10 12:26:12 +00:00
Pavlo Shchelokovskyy
6e415c3284 Remove pxe_ssh_ansible driver
SSH-based power and management interfaces are unsupported and about to
be removed from ironic.

Change-Id: I0d00fbabb7402ef96bb26a68b64d04ae3231a5d5
Related-Bug: #1570301
2017-07-08 19:39:26 +03:00
Yuriy Zveryanskyy
84b1b0d34e [ansible] Add basic root device hints support
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
2017-06-16 19:25:58 +00:00
Pavlo Shchelokovskyy
1d6b1b89d2 [ansible] Improve partition images support
- 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
2017-06-16 19:25:51 +00:00
Pavlo Shchelokovskyy
b963a18c63 [ansible] Major changes in playbooks "API"
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
2017-06-12 13:47:18 +00:00
Pavlo Shchelokovskyy
1ab7c51edb [ansible] add metrics collection
add standard ironic metrics collection decorators to methods of
ansible-deploy driver.

Change-Id: I8f2230e1a1caf2751fb76290e9cc51556392dee1
2017-05-15 17:21:11 +00:00
Pavlo Shchelokovskyy
e1ece310fa [ansible] honor deploy_forces_oob_reboot
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
2017-05-15 17:21:11 +00:00
Pavlo Shchelokovskyy
6e8cd3163f [ansible] driver refactoring
make driver much closer to AgentDeploy by reusing HeartbeatMixin and
implementing other required methods

This effectively requires ironic version > 7.0

Change-Id: I9ba5186ecdae49a17785a109341050c828c849cc
2017-05-15 17:21:02 +00:00
Pavlo Shchelokovskyy
6eaf42f11f [ansible] reuse build_instance_info_for_deploy
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
2017-05-08 16:56:21 +00:00
Pavlo Shchelokovskyy
d2e2683046 [ansible] remove call signatures workarounds
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
2017-03-17 19:19:20 +00:00
Pavlo Shchelokovskyy
fd7a07f981 Remove agent vendor passthru from drivers
Agent lookup/heartbeat as vendor passthru interface is deprecated and
is being removed from Ironic.

This patch updates all the drivers in ironic-staging-drivers to not rely
in this functionality.

Change-Id: Idfcfdff6a8657d6e6f09b8fe85ebaa0251969955
Related-Bug: #1640533
2016-12-06 12:21:19 +00:00
Andreas Jaeger
cfb90b9a00 Enable release notes translation
Releasenote translation publishing is being prepared. 'locale_dirs'
needs to be defined in conf.py to generate translated version of the
release notes.

Note that this repository might not get translated release notes - or
no translations at all - but we add the entry here nevertheless to
prepare for it.

Change-Id: I260e6d906e9bfac28523bb3a93d4d598f8a3d169
2016-10-06 20:27:58 +02:00
Pavlo Shchelokovskyy
ffd006e098 Add Ansible-deploy driver
Requires Ironic API >= 1.22 when using heartbeats to Ironic API.

For better logging and proper deployment failure handling,
Ironic should be > '6.1.1.dev147' version.

Tested with and targets Ansible >= 2.1

Experimental DIB element: I3f6c3baf0197d27f2d423f52611666ca186cd0a4
Experimental TinyCore-based bootstrap:
Ie39ce67dc93e7d53bf75937c7defacafad5fbfcf

Tested with DevStack, Bifrost and Mirantis OpenStack,
with both VMs and real IPMI hardware.
Tempest's baremetal_server_basic_ops test reliably passes on DevStack
with `pxe_ssh_ansible` driver.

More elaborate documentation will be proposed in next changes.

Change-Id: Ib9317d365d7bc39aa00a9d9e1eadddd2f9b2947f
Related-bug: #1526308
Co-Authored-By: Yuriy Zveryanskyy <yzveryanskyy@mirantis.com>
2016-09-16 21:54:24 +03:00
Yuriy Zveryanskyy
9e96fb9f7e Fix boot policy for Intel Node Manager driver
Correction time parameter does not apply to boot time policy and
should be set to zero.

Change-Id: I342c576508a2c65d3022d0f6e27ad5454178cf6b
2016-04-22 08:16:29 +00:00
Yuriy Zveryanskyy
10b87cb98e Add vendor methods for Intel Node Manager statistics
Intel Node Manager is able to provide some statistical parameters
directly without tools like ceilometer.
This patch adds vendor methods for statistics.

Change-Id: I9becb7e4f62c773d2a21fd53255acad3098b47a3
2016-04-22 11:12:52 +03:00
vsaienko
296a45c8af Introduce libvirt power/mgmt driver
Libvirt has its own API. It allows to connect to different hypervisors
like xen, vmware, virtualbox, qemu, full list can be found at
https://libvirt.org/drivers.html.
It supports different type of transports like ssh, tcp, unix sockets.
This patch introduces new type of power and management drivers,
which use libvirt-python library to connect to hypervisor.

Change-Id: I2df214aab95c2f5d2505f5ad4ef9f3a542e44c6a
Depends-On: I12211db38a3fdb3b2d733e5769f2c052c32c4a75
Closes-Bug: #1523880
2016-04-20 06:53:24 +00:00
Lin Tan
79217fcaee Add amt driver
This patch is importing the amt driver and the documentation.

Change-Id: Ief024a4b21dcfdfaa2e2799c44f96044caef49b2
2016-03-24 10:48:12 +08:00
Yuriy Zveryanskyy
d5f031527f Add Intel Node Manager driver
This patch adds two new entry points with Intel Node Manager
vendor interface: "agent_ipmitool_nm" and "fake_nm".
New vendor interface supports Intel Node Manager policies.

Change-Id: Iedbb3b906cef7bd5b2d768e926a59820ccd8c196
2016-03-07 16:55:25 +02:00
Lucas Alvares Gomes
5ad7c7c925 Add Wake-On-Lan driver
This patch is importing the Wake-On-Lan (WOL) driver and its documentation
from ironic to ironic-staging-driver.

Since we can't have duplicated entry points in setuptools we had to
rename the driver names as following:

pxe_wol   -> pxe_wol_iscsi
agent_wol -> pxe_wol_agent
fake_wol  -> fake_wol_fake

This patch is using the "<boot>_<power>_<deploy>" template to name the
drivers consistently.

Change-Id: I2b051494fdba7bf6ca30d8f7bb406511bf7d4d76
2016-02-23 14:36:59 +00:00
Lucas Alvares Gomes
ba17b7c6fe Add reno for release notes management
Change-Id: Ia09a993d6ca7fa073db77be12035ec49a71db597
2016-02-08 14:41:18 +00:00