226 Commits

Author SHA1 Message Date
Pavlo Shchelokovskyy
17d8d23a5f [ansible] skip latest stable ansible releases
current latest stable Ansible releases to PyPI (2.1.4.0, 2.2.1.0) have
Jinja2<2.9 as hard-coded requirement to account for a bug present in
Jinja2 2.9.[0-4], while current OpenStack upper constraints have
Jinja2==2.9.5 (the global requirements.txt still allows Jinja2>2.8).

This makes those latest stable Ansible releases incompatible with current
OpenStack global requirements.

This patch might be reverted in the future if OpenStack's upper
constraint for Jinja2 is downgraded to 2.8.1 again.

Change-Id: I5e5648cb2dcf6fca01cb887b52f4a56b964b0c30
2017-02-27 14:06:38 +02:00
Pavlo Shchelokovskyy
961240213b Enable testing of particular staging driver
Allow switching the ironic nodes in DevStack to one of staging drivers.
This will enable running standard ironic tests against this driver
on a gate job.

Currently only pxe_ipmitool_ansible driver is handled,
as it can in priciple be tested on gates with virtual HW.

Change-Id: Ief19ccb2711aed03ad0c4f4feee73edaa5c554c9
0.6.0
2017-02-13 17:44:23 +00:00
Pavlo Shchelokovskyy
afb682bf54 Re-use tinyipa image for ansbile-deploy
It is possible to rebuild the pre-built tinyipa image available
at tarballs.openstack.org to make it usable with ansible-deploy driver.

The rebuild is rather fast, and only downloads 2 packages from TC mirrors
(SSH server and dependencies).

Change-Id: Ie39ce67dc93e7d53bf75937c7defacafad5fbfcf
Related-Bug: #1526308
2017-02-13 16:39:34 +00:00
Jenkins
d0b8994d51 Merge "Remove py34 env from tox" 2017-02-13 12:39:10 +00:00
Jenkins
ff540ca131 Merge "Removes unnecessary utf-8 encoding" 2017-02-13 12:39:01 +00:00
Zhenguo Niu
e594bc52a9 Remove py34 env from tox
The gating on python 3.4 is restricted to <= Mitaka. This is due to
the change from ubuntu Trusty to Xenial, where only python 3.5 is
available. There's no need to continue to keep it.

Change-Id: Iad33f7e1781432e17104d165aba377b7a6a40b1c
2017-02-09 11:11:30 +08:00
OpenStack Proposal Bot
d641357ba1 Updated from global requirements
Change-Id: I82fb2a57e18883d55bee7e1d7e95bd367bc513c5
2017-01-24 12:10:25 +00:00
Jenkins
cf29fd0515 Merge "Overrides get_supported_power_states() for WOL Power" 2017-01-24 11:44:34 +00:00
Naohiro Tamura
6e1f825bd2 Overrides get_supported_power_states() for WOL Power
This patch overrides the default implementation of
get_supported_power_states() in the base power I/F for WOL Power.
The get_supported_power_states() is newly introduced in the base power
I/F to support SOFT_REBOOT and SOFT_POWER_OFF functions.

Change-Id: I4b46ebbbe8a976c382adb9e062c32d8670a15670
Partial-Bug: #1526226
Depends-On: I1c9bbd1f11f6a8565607c874b3c99aa10eeb62a5
2017-01-17 11:09:46 +09:00
M V P Nitesh
c55f6ebea8 Removes unnecessary utf-8 encoding
Change-Id: I02509b6adbe77b83202d45ffdb2f9842eb56253c
2017-01-11 19:44:36 +05:30
Jenkins
aa31cbe8c8 Merge "Fix issue with /etc/hosts in ansible element" 2017-01-11 13:26:31 +00:00
Jenkins
a8edd3de65 Merge "Remove duplicated 'md5'" 2017-01-11 11:13:35 +00:00
OpenStack Proposal Bot
953d9e9a06 Updated from global requirements
Change-Id: I00b1ecb6158f2c89fd0aac3dbaa499e604ba7d95
2017-01-11 10:27:49 +00:00
Jenkins
9c453ded6f Merge "Fix the 'cover' tox env" 0.5.0 2017-01-11 10:20:55 +00:00
Andrey Shestakov
cba800da55 Remove duplicated 'md5'
Hash algorithm should be specified by user in image_checkusm parameter.
If not specified, 'md5' sets by default in deploy.py. Additional 'md5:'
is duplicated in playbook, which causes fail with error:
"md5:md5 checksums are not supported"

Change-Id: I693023cd8e226a5e8ba84c3672dfe6f5a65b9f8a
2017-01-05 13:37:20 +02:00
Pavlo Shchelokovskyy
c3f02d1d2f [ansible] fix some places for Ansible 2.2
Changes include:

- callback plugin - fixed for Ansible 2.2

  Apparently now `eventlet.monkey_patch()` breaks Ansible,
  and since it is implicitly executed on any import from ironic package,
  it breaks the callback plugin and the whole ansible-deploy driver
  when using Ansible 2.2.
  Instead, just copy-paste those several lines of code explicitly
  into callback plugin module or use them from ironic_staging_drivers
  code.

- ansible.cfg - add interprocess polling interval option.

  Increasing it should decrease CPU load generated by each
  ansible-playbook invocation and improve ironic-conductor performance
  for parallel deployment of nodes with ansible-deploy driver

- in-memory inventory playbook - changed add_host module args to
  correspond to Ansible 2.x

Change-Id: I365a82cd3592a7669599fe84674ca4abab8f576f
Closes-Bug: #1652326
2016-12-23 16:52:18 +02:00
Andrey Shestakov
841c18e7eb Fix issue with /etc/hosts in ansible element
Ansible require valid hostname in /etc/hosts file.
This file does not exists in ubuntu-minimal Xenial, which causes build fail.

This change ensures that /etc/hosts file exists and has required content.

This change requires dib > 1.25.2 (or current master branch).

Also, move openssh-server from package-installs to element-deps,
as there is a separate element for that.

Change-Id: I5ff78cf6591ef2228a3695d91d8b2c2095fc28b3
2016-12-20 13:27:43 +02:00
Pavlo Shchelokovskyy
b20420ea4e Fix AMT unit tests
AMT drivers recently were removed from ironic,
but some unit tests for AMT driver in ironic-staging-drivers still try
to use AMT-specific exceptions from ironic package instead of from
ironic-staging-drivers.

This patch changes affected places to use those exceptions from
ironic_staging_drivers.common module.

Change-Id: I7982cd8043a0508df6e26b8ef75738b7d3a82ee7
Closes-Bug: #1651069
2016-12-19 11:22:50 +02:00
Jenkins
e70eb23225 Merge "Use upper constraints it tox envs" 2016-12-15 10:57:30 +00:00
OpenStack Proposal Bot
248b89e026 Updated from global requirements
Change-Id: Ib05c819d2bfb36eedbe9173c990c2ab54b49652d
2016-12-15 01:25:18 +00:00
Pavlo Shchelokovskyy
7b3e177723 Fix the 'cover' tox env
currently tox env for code coverage does not measure anything
as it tries to measure the coverage of 'ironic-staging-drivers' package,
while the actual package name is 'ironic_staging_drivers'.

This patch:
- erases current coverage data first
- fixes project name expected by 'coverage'
- adds coverage reporting in the end of 'tox -ecover' run
- omits tests file from both coverage and report
- adds 'cover' to .gitignore (auto-generated as part of coverage report)

Change-Id: I0044e3dd399934be706a06fd921972632efcceea
2016-12-14 20:09:43 +00:00
Jenkins
c97f1924ee Merge "Add py35 to default tox targets" 2016-12-13 15:55:01 +00:00
Pavlo Shchelokovskyy
b287acfbd4 Use upper constraints it tox envs
Currently unit tests are broken due to upstream kombu/amqp changes.

Change-Id: Id71e2060139bf7de45f838bc87513dbfab04f21f
Related-Bug: #1638263
2016-12-09 16:11:03 +02:00
Pavlo Shchelokovskyy
a4c2924b6a Add py35 to default tox targets
Ubuntu Xenial comes with Python 3.5 out-of-the-box,
and both ironic and ironic-staging-drivers are already gating against
py35 unit tests.

Change-Id: Ie1728d90b9eada194ae65aca15be5238edfa4ebc
2016-12-06 14:22:29 +02: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
Vladyslav Drok
9de213f26f Change cleaning methods to use network interface
As part of the commit a9a1293312ca67c5e5dbb258146832516a41e939
to ironic, prepare_cleaning_ports and tear_down_cleaning_ports
methods from deploy_utils module were removed. This change
replaces their usage with network interface's add_cleaning_network
and remove_cleaning_network methods.

Closes-Bug: #1644874
Change-Id: I139c6284f93a63fbd5a02eef18610c7df236d2db
0.4.0
2016-11-25 19:49:25 +02:00
Jenkins
897c5d3005 Merge "Add DIB element for ansible-deploy driver ramdisk" 2016-11-16 13:16:13 +00:00
Jenkins
2963fa750d Merge "Add documentation for ansible-deploy driver" 2016-11-10 10:12:03 +00:00
Pavlo Shchelokovskyy
209e6a4da6 Add documentation for ansible-deploy driver
Change-Id: Ieb61ccda30cc31434ffe3a0ec7d1a85ca0f7988f
Related-Bug: #1526308
2016-11-09 14:49:25 +00:00
Pavlo Shchelokovskyy
6aae875ed4 Add DIB element for ansible-deploy driver ramdisk
Based on:
- `ironic-agent` element and uses IPA for lookup/heartbeats
- `devuser` element to set user name, permissions and SSH keys.

Additionally:
- ensures OpenSSH is installed and configured properly
- correctly sets hostname to avoid some Ansible problems with elevation
- overrides DIB_DEV_USER_PWDLESS_SUDO to always be "yes"

Ironic callback functionality requires Ironic API >= 1.22.

Change-Id: I3f6c3baf0197d27f2d423f52611666ca186cd0a4
Related-Bug: #1526308
2016-11-08 12:31:06 +02:00
Jenkins
a634d43e8c Merge "Don't log success cleaning if ansible fails" 2016-11-04 12:31:08 +00:00
Jenkins
6dec9ea6c7 Merge "Enable release notes translation" 2016-11-04 12:19:34 +00:00
Anton Arefiev
52dac91217 Don't log success cleaning if ansible fails
If ansible fails cleaning, it's log "Ansible completed cleaning ...",
the reason - missing 'else' statement.

Change-Id: I418012daeb7377b3dad983bb17e06317b623bb22
2016-10-20 16:23:50 +03:00
Jenkins
6718d638eb Merge "Add docs for Intel NM vendor passthru driver" 2016-10-10 11:10:38 +00:00
Pavlo Shchelokovskyy
c82b63c423 Add docs for Intel NM vendor passthru driver
Change-Id: I917176d90ba4aacb73a18eff46863716ff8a14e8
2016-10-10 13:40:28 +03: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
Jenkins
b0b3dccc9a Merge "Cleanup tox.ini: Remove obsolete constraints" 2016-10-03 12:44:03 +00:00
Jenkins
9337381ca7 Merge "Add Ansible-deploy driver" 2016-09-27 13:06:32 +00:00
Pavlo Shchelokovskyy
21df4aec85 [Docs] give example of dev libvirt pkg name
as examples, point to appropriate names for Ubuntu and Fedora.

Change-Id: Icaa81a250220d2a26bdcc02886c25247fcf91884
2016-09-19 21:33:36 +03:00
Jenkins
7bfbfcf5fa Merge "Add docs for libvirt driver" 2016-09-19 17:48:10 +00: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
Jenkins
4a6bb47529 Merge "Fix reference in WoL driver docs" 2016-08-30 10:11:42 +00:00
Pavlo Shchelokovskyy
f333dbfab4 Add docs for libvirt driver
Change-Id: Ie9a164818645562e7e7140113f9ebeb5e9eee4c8
2016-08-29 16:35:40 +03:00
Andreas Jaeger
1543af888b Cleanup tox.ini: Remove obsolete constraints
Remove old and unused constraints environments from tox.ini. Those
have never been used.

Note that the repo has in the past not used constraints in OpenStack
CI, this change keeps the status quo.

For more information about constraints see:
http://lists.openstack.org/pipermail/openstack-dev/2016-August/101474.html

Change-Id: Idb24ac27d5653b5f0c7a5f618b475c9e278fcc8a
2016-08-26 18:05:05 +02:00
Lucas Alvares Gomes
f3698f57ed Fix iboot mock
The iboot mock was pointing to the iboot module in Ironic
(ironic.drivers.modules.iboot), this patch is changing it to point to
the module in ironic-staging-drivers otherwise, once iboot is removed
from the Ironic tree it's likely to break the unittests in this project.

Change-Id: I85fbfa9a83143ad309ae0cf6d5d45c8b7e45391e
0.3.0
2016-08-26 16:37:14 +01:00
Lucas Alvares Gomes
3ca96ed906 Mock the 'libvirt' import on tests
This patch is removing python-libvirt from test-requirements.txt and
mocking that library for the tests.

Closes-Bug: #1616906
Change-Id: Id067476c58bf9ddedd6cfc5fe80303f7d949cb9e
2016-08-26 15:52:00 +01:00
Pavlo Shchelokovskyy
b993e8c281 Fix reference in WoL driver docs
There is an internal Ironic docs reference left after moving
this driver from Ironic repo, which does not work and produces warnings
during docs build.

Change-Id: I8111d90b530708b3a0ce00361ae532b933553536
2016-08-25 14:47:26 +03:00
Jenkins
5ed5ff4d99 Merge "Add iBoot driver" 2016-08-12 15:15:18 +00:00
Lucas Alvares Gomes
0eef2eaa95 Remove kwargs from the vendor passthru continue_deploy tests
The commit a9216bb07f4ccd4dc202fd1f5c14b36a08ac6046 in Ironic refactored
the vendor passtrhru classes and removed the kwargs from the
continue_deploy() method, breaking the tests in here.

Closes-Bug: #1612210
Change-Id: Ie471dddb7d05a0fd5710518ab38b555e7dce0596
2016-08-11 12:44:36 +01:00
Lucas Alvares Gomes
6e8fc9fc4d Add iBoot driver
This patch is importing the iBoot 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_iboot   -> pxe_iboot_iscsi
agent_iboot -> pxe_iboot_agent
fake_iboot  -> fake_iboot_fake

Change-Id: I2783b8e65408811858ffb00c372aa7ae269ad75b
2016-08-10 16:04:28 +01:00