283 Commits

Author SHA1 Message Date
Dmitry Tantsur
cb7cdd3534 Fetch Glance endpoint from Keystone if it's not provided in the configuration
This is needed to fix the CI broken by glance switching to running
under wsgi, and thus breaking our assumption that glance is accessible
by host:port only.

The options glance_host, glance_port and glance_protocol were
deprecated.  Standalone deployments should use glance_api_servers
instead.

Also removes two unused utility functions.

Change-Id: I54dc04ab084aeb7208c9dd9940c6434c029bf41c
Partial-Bug: #1699542
2017-06-23 16:42:40 +02:00
Dan Smith
e71555a0df Discover hosts while waiting for hypervisors to show up in devstack
This will help us notice new compute nodes that may have gotten
added while we're polling.

Change-Id: I05502c4f861df48ae9ddaf36ddd37e1f70583db4
2017-06-14 08:05:56 -07:00
Pavlo Shchelokovskyy
977c064105 Make default_boot_option configurable in devstack
This patch adds an IRONIC_DEFAULT_BOOT_OPTION variable to our devstack
plugin (defaulting to 'netboot').

This will allow for easier setup of a DevStack environment to test local
boot with partition images.

Change-Id: I97986e4627c6c5a014cc1507f655ea824f8ea7c8
2017-06-12 11:08:15 +00:00
Pavlo Shchelokovskyy
4f9035c24f Remove legacy auth loading
remove support for specifying client auth in keystone_authtoken config section.
This was deprecated about a year ago and now can safely be removed.

Also, fill the [cinder] section with auth options in devstack.

Change-Id: I0c45d12d80eff45e643af29cded178644071c9fe
2017-06-06 10:20:54 +00:00
kesper
11c1108ce0 Adds parameters to run CI with hardware types.
This commit adds new parameters 'IRONIC_ENABLED_BOOT_INTERFACES',
'IRONIC_ENABLED_DEPLOY_INTERFACES', 'IRONIC_ENABLED_POWER_INTERFACES',
'IRONIC_ENABLED_CONSOLE_INTERFACES', 'IRONIC_ENABLED_INSPECT_INTERFACES',
'IRONIC_ENABLED_RAID_INTERFACES', 'IRONIC_ENABLED_VENDOR_INTERFACES',
'IRONIC_ENABLED_NETWORK_INTERFACES, 'IRONIC_ENABLED_STORAGE_INTERFACES'
and 'IRONIC_ENABLED_MANAGEMENT_INTERFACES' for running CI with hardware
types.

Change-Id: Ic99e551fab87cb5cea2177f5d8c82703fc2df080
2017-05-30 04:45:06 +00:00
Jenkins
a68e30a4f3 Merge "DevStack: Install gunicorn and sushy based on g-r constraints" 2017-05-07 18:18:02 +00:00
Jenkins
5588231117 Merge "[Devstack] Increase default NIC numbers for VMs to 2" 2017-05-05 21:44:57 +00:00
Dmitry Tantsur
08482d215f [devstack] start virtualpdu using full path
Otherwise systemd refuses to load it, and the CI job fails.

Change-Id: Ic312acc4c9389cb54362d8a9a734986aa9076176
2017-05-05 13:56:32 +02:00
Vasyl Saienko
86a190d717 [Devstack] Increase default NIC numbers for VMs to 2
In real world hardware node will have more than 1 NIC, this patch
increase default NIC count to 2 which will allow to test more
realistic scenarios.

Change-Id: I01a45127643e415382ff0897c6b2fb363c7a96fd
2017-05-05 11:53:21 +00:00
Jenkins
cd2c417e38 Merge "[Devstack] Rework VMs connection logic" 2017-05-05 08:10:52 +00:00
Jenkins
6540e7045e Merge "DevStack: Setup a Redfish environment" 2017-05-04 16:35:29 +00:00
Lucas Alvares Gomes
c8e3679ace DevStack: Install gunicorn and sushy based on g-r constraints
It also removes a comma (",") from an error message.

Depends-On: Ie77b220f630babd325e8d31cdc60ddea680c81a1
Change-Id: I3dc1b4df602912516ffdcef0f8bfd0d0750d7698
2017-05-04 09:54:54 +01:00
Jenkins
c408b2dafe Merge "[devstack] use the generic function to setup logging" 2017-05-03 14:20:10 +00:00
Lucas Alvares Gomes
9697ae6b18 DevStack: Setup a Redfish environment
This patch is extending DevStack to support deploying nodes with the new
`redfish` hardware type.

Closes-Bug: #1526477
Change-Id: I260c3033b3eed996bc4d258f29bb36828d32a950
2017-05-03 09:37:24 +01:00
Vasyl Saienko
fdf6f89a23 [Grenade]: Do not run ir-api on primary node after upgrade
Ironic upgrade process has pre-requirement that ironic-conductors
should be upgraded before ironic-api. Grenade is launched on primary
node, where we have ir-api and ir-cond runnning. Do not start ir-api
on primary node after upgrade to avoid situation when we have new ir-api
(primary) and old ir-cond (subnode) as it is not allowed by upgrade
procedure. Instead redirect all requests destinied to ir-api on primary
node to subnode.

Depends-On: I026121121059768aa74389add7eee6e63fdb214d

Change-Id: I9e496353a1d3d6547e4881f96fb187e488cff83f
2017-04-28 13:59:07 +03:00
Sam Betts
6df49741dd [Devstack] Rework VMs connection logic
Devstack currently plugs the simulated baremetal VMs into OVS using the
libvirt bridge driver, this caused a problem because libvirt unplugs the
VM from the network when it is turned off. To fix this an extra bridge
was added between the VM and OVS to allow the OVS port to persist even
when the VM was turned off. This patch replaces how the devstack
simulated baremetal VMs are plugged into OVS with a manually created tap
interface, this removes the need for an extra bridge, because manually
created tap interfaces aren't unplugged when the VM is turned off.

Allow to connect several interfaces to a node by setting
IRONIC_VM_INTERFACE_COUNT devstack variable.

Change-Id: I7d0249efc55edb4f3a69aaa5b101dd80df2a563f
Co-Authored-By: Vasyl Saienko <vsaienko@mirantis.com>
2017-04-28 11:16:58 +03:00
Dmitry Tantsur
c1887a86a2 [devstack] use the generic function to setup logging
This makes our logging setup compatible with USE_SYSTEMD, see gerrit
change I6af6d1857effaf662a9d72bd394864934eacbe70 for details.

Change-Id: I929bebde0ba50a6b9d5e6e0ab7e077b2c02a7849
2017-04-27 13:29:20 +02:00
Jenkins
075e809791 Merge "VirtualPDU use libvirt group instead of libvirtd" 2017-04-26 16:09:23 +00:00
Jenkins
9966bfc651 Merge "Remove pre-allocation model for OneView drivers" 2017-04-25 16:28:10 +00:00
Jenkins
5ebc60de42 Merge "Add /baremetal path instead of port 6385" 2017-04-20 21:13:47 +00:00
Félix Bouliane
7c265a5eac VirtualPDU use libvirt group instead of libvirtd
Currently, VirtualPDU uses 'libvirtd' group, which errors since this
group is not used anymore on ubuntu because we now use the same group
that debian uses 'libvirt'.

This commit change the used group to 'libvirt'. This is the right group
and it's allowed to do changes on virsh.

I would rather use LIBVIRT_GROUP however a bug in the selection logic
sets it to 'libvirtd' group as soon as it exists, even if both exists.

Change-Id: Iddb61356b8a92184ca60a078ea9d929e5b51e629
2017-04-18 18:16:35 -04:00
anascko
c971ceef5a Add /baremetal path instead of port 6385
The long-standing goal in OpenStack is to stop using custom ports for
services and only use subpaths like /identity or /compute. This change
enables the /baremetal subpath in our devstack plugin.

Closes-Bug: #1513005

Change-Id: Iaac8764394a13c4851d2ebbf3b91a380ba2aa49f
2017-04-18 11:03:22 +03:00
Hugo Nicodemos
bd4bd780ab Remove pre-allocation model for OneView drivers
The OneView drivers deprecated support for pre-allocation model
in Newton cycle (6.1.0), making the dynamic allocation the default
model[0]. This patch removes code pertaining to pre-allocation
feature from OneView drivers. The dunamic allocation feature should
be used instead.

[0] https://specs.openstack.org/openstack/ironic-specs/specs/not-implemented/oneview-drivers-dynamic-allocation.html

Change-Id: I7789ffc0ebc6e42f58b184c0781fb3b122c00323
Closes-Bug: 1681509
2017-04-17 10:54:14 -03:00
Vasyl Saienko
7cdda47a22 [Devstack] Fix libvirt group usage
For unclear reason we set group ownership for tftp and http directories
to libvirt. This patch fixes that and use STACK_USER group there.

Also Recently [0] infra start installing libvirt from UCA
repository. The groups change with newer libvirt. Older Ubuntu used
'libvirtd', but now uses libvirt like Debian.
Update our local check that is needed for ironic standalone installation.

[0] c9a9e415b9a955525a407b78650f93e9193c8117

Change-Id: I2e4633a258e5f8a6bd442797dd4cfbf4894c798b
2017-04-13 13:25:58 +00:00
kesper
09b1fc673a Bypassing upload deploy ramdisk/kernel to glance when deploy iso is given
Deploy kernel and ramdisk are not required for deployment when deploy iso
is intended to be used for provisioning. This fix bypass uploading of
deploy ramdisk/kernel to glance when deploy iso is given.

Change-Id: I201b899abb1beb18454b6e2ac563c652201867a1
2017-04-06 11:36:19 +00:00
Jenkins
11f09ae63b Merge "Modify the spelling mistakes Change explictly to explicitly" 2017-04-05 22:22:56 +00:00
kesper
aa3ebd6da5 Add string comparison for 'IRONIC_DEPLOY_DRIVER'
For ilo drivers, IRONIC_DEPLOY_DRIVER check need to be change.
It was integer comparison supposed to be string comparison.

Closes-Bug:1679944

Change-Id: I3ad04ff36ebe0b4ab3f4a2050f91044dc32a2631
2017-04-05 05:12:46 -04:00
wanghongtaozz
b7e96f438f Modify the spelling mistakes
Change explictly to explicitly

Change-Id: Ia31e3d23677f14f4dedb10f66187ff1e747f4ca1
2017-04-04 18:36:53 -07:00
Jenkins
9e3aebfb6f Merge "Revert "[Devstack] Rework VMs connection logic"" 2017-04-04 23:04:18 +00:00
Julia Kreger
d756d064c5 Revert "[Devstack] Rework VMs connection logic"
This reverts commit 4ec88c9b8acb1229c30bb39cb5b92bb3131da6d2.

The commit changed the port creation logic with the change
of the variable creation/handling such that the ports are only
created in devstack scenarios, thus breaking third party CI
running on baremetal.

Change-Id: I6cd163e7cbe2b075f91f16d6a7965b674ce8e2a4
2017-04-04 19:16:26 +00:00
Jenkins
41bd6f28d6 Merge "[Devstack] Rework VMs connection logic" 2017-04-03 10:22:32 +00:00
Sam Betts
4ec88c9b8a [Devstack] Rework VMs connection logic
Devstack currently plugs the simulated baremetal VMs into OVS using the
libvirt bridge driver, this caused a problem because libvirt unplugs the
VM from the network when it is turned off. To fix this an extra bridge
was added between the VM and OVS to allow the OVS port to persist even
when the VM was turned off. This patch replaces how the devstack
simulated baremetal VMs are plugged into OVS with a manually created tap
interface, this removes the need for an extra bridge, because manually
created tap interfaces aren't unplugged when the VM is turned off.

Allow to connect several interfaces to a node by setting
IRONIC_VM_INTERFACE_COUNT devstack variable.

Co-Authored-By: Vasyl Saienko <vsaienko@mirantis.com>

Change-Id: Iafd470445d59f0e2009e65ddaf65a6c603a1e1c1
2017-03-30 14:05:17 +00:00
Miles Gould
0adb6dd1b9 devstack: install python-dracclient if DRAC enabled
Change-Id: Ic1b132e25c13e0171ac1d5edf109a5412d76e56f
2017-03-28 17:16:19 +01:00
Jenkins
604a6fe3e9 Merge "Add standalone tests using direct HTTP links" 2017-03-23 17:55:06 +00:00
Jenkins
e7535cf0b5 Merge "[devstack] Use global requirements for virtualbmc" 2017-03-22 14:50:57 +00:00
Pavlo Shchelokovskyy
f8e6adea83 [devstack] Use global requirements for virtualbmc
When installing virtualbmc, take into account the requirements and
constraints from openstack/requirements.

Change-Id: I61a9279ae5ab12fd0415fdfbc5a696250c0bd09d
2017-03-22 08:20:02 +00:00
Vasyl Saienko
f7d0fbd830 Add standalone tests using direct HTTP links
Adds two tests that uses direct HTTP link instead of glance:
  * pxe_ipmitool + wholedisk on HTTP server
  * agent_ipmitool + wholedisk on HTTP server

Change-Id: I8f1a5b0ecb3d53ffdefd7018c1b9700210572ffc
2017-03-21 09:46:17 +02:00
Jenkins
ad5840313b Merge "devstack: Don't modprobe inside containers" 2017-03-20 11:33:46 +00:00
Julian Edwards
1de3681b13 devstack: Don't modprobe inside containers
When running in a container, the host must already have the modules
inserted in its kernel.

Change-Id: Ic61ad57557be5dd1319db70bfb50c23836874028
2017-03-17 08:47:38 +10:00
Jenkins
23a61f2d7b Merge "Add Ironic standalone tests" 2017-03-16 00:06:25 +00:00
Vasyl Saienko
e48375538c Add Ironic standalone tests
This patch adds the following standalone tests:

  * agent_ipmitool + wholedisk image + bios
  * agent_ipmitool + partitioned image + bios
  * pxe_ipmitool + wholedisk image + bios
  * pxe_ipmitool + partitioned image + bios

Partial-Bug: #1660606

Change-Id: Ic04b0f134e20d9937a610a14d7c4128f45738eeb
2017-03-15 16:54:45 +02:00
Jenkins
bec748f437 Merge "Address a shell syntax mistake" 2017-03-14 00:05:03 +00:00
Tao Li
aec3663604 Address a shell syntax mistake
Missing space before ']' in addressed line and change it to
another better format.

Change-Id: Ib7cfe5990db180dbc347315759fffad002dfa550
2017-03-13 09:54:11 +08:00
Jenkins
8ba5203731 Merge "Add wsgi handling to ironic-api in devstack" 2017-03-10 12:33:02 +00:00
anascko
5d22cfe1a8 Add wsgi handling to ironic-api in devstack
Adds handling of running ironic API under Apache as WSGI app to
devstack plugin.

New variable IRONIC_USE_MOD_WSGI (False by default) is added.
Another new variable IRONIC_WSGI_DIR (default is distro specific) is
also added, which specifies location for WSGI scripts.

Change-Id: I9c5ad56e1acd292ff0f9cc9b460125fc420abda5
Closes-Bug: #1513005
2017-03-09 16:55:34 +02:00
John L. Villalovos
1e560b182f devstack: Make sentry _IRONIC_DEVSTACK_LIB a global variable
Make the sentry variable _IRONIC_DEVSTACK_LIB a global variable so
that it will work as expected.

When variables use the 'declare' directive, it is by default a local
variable. While other variables have global scope.

For example:
   declare -A AN_ARRAY   # local in scope
   foo=1                 # global in scope
   declare -A -g SPAM    # global in scope because of -g

This causes errors to occur as some of the variables will be local only
and others will be global.

The issue that can occur is that when sourcing devstack/lib/ironic a
second time the sentry _IRONIC_DEVSTACK_LIB will not be set but all
the other variables from devstack/lib/ironic will already have been
set as they are by default global variables. And the purpose of
_IRONIC_DEVSTACK_LIB is to prevent the file from being sourced twice.

Change-Id: I24b6ebb89f3d950d39b0665346b4c17bf05d0a0b
2017-03-08 08:19:40 -08:00
Jenkins
50682f8ad9 Merge "devstack: Adding a README for ironic-bm-logs directory" 2017-02-27 22:53:14 +00:00
Vasyl Saienko
5efde6a7a3 Source lib/ironic in grenade settings
We set global variables in Ironic devstack plugin like
DEFAULT_IMAGE_NAME. Ensure that grenade uses them by
sourcing lib/ironic from upgrade/settings.

Set IRONIC_DEPLOY_DRIVER by default to pxe_ipmitool. As we no longer
add IRONIC_DEPLOY_DRIVER to IRONIC_ENABLED_DRIVERS and defaults are
conflicting.

Closes-Bug: #1663371

Change-Id: I462ac792ad7920beff64c15a7c005406fcfa5cce
2017-02-09 20:35:02 +00:00
John L. Villalovos
c0830f4466 devstack: Adding a README for ironic-bm-logs directory
Adding a README file to be put into the ironic-bm-logs/ directory that
explains the virtual bare-metal log files.

Change-Id: If4fc6b53273d39c65db0251957795d214440118d
2017-02-06 09:32:24 -08:00
Dmitry Tantsur
e98b028a65 [devstack] Allow using "ipmi" hardware type
Currently only the default interfaces are supported.

Also fail devstack if the deploy driver is neither in enabled_drivers
not in enabled_hardware_types, as we no longer can easily detect which
list to append it to automagically.

Change-Id: I055497963f05833bf065ab396fff9b628357fc08
Partial-Bug: #1524745
2017-02-06 18:02:01 +01:00