191 Commits

Author SHA1 Message Date
Jenkins
ef724cc958 Merge "Use devstack test-config phase" 2016-08-10 14:34:27 +00:00
Vasyl Saienko
600e2e4057 Update devstack configure_ironic_ssh_keypair
When authorized_file doesn't contain new-line character at the end,
configure_ironic_ssh_keypair() just append new key to the existed line,
as result both keys becomes corrupted. The patch adds a check for
last character in the authorized_key file, if new-line is missed
add it.

Change-Id: I64a7bba5f3c7dee76ae2faf659af1231280f2b8b
Closes-Bug: #1611207
2016-08-09 05:56:24 +00:00
Vasyl Saienko
dcd93a58e4 Use devstack test-config phase
New phase 'test-config' has been introduced by [0].
'test-config' is called at the end of devstack used to configure
tempest or any other test environments.
This patch uses new phase to configure tempest if it is enabled.

Reference:
[0] https://review.openstack.org/#/c/311797/

Change-Id: I8a6a3aeee89c1c08bfa5e630b1cdd8f8a5fa2007
2016-08-08 06:38:47 +00:00
Jenkins
f0360dcc16 Merge "Promote agent vendor passthru to core API" 2016-08-06 00:04:23 +00:00
Dmitry Tantsur
8bdd538c0c Promote agent vendor passthru to core API
Introduces new /v1/lookup and /v1/heartbeat/<UUID> endpoints
(and associated controllers).

This change does not deprecate the old passthru endpoints, it should
be done after IPA switches to using the new ones.

Change-Id: I9080c07b03103cd7a323e2fc01be821733b07eea
Partial-Bug: #1570841
2016-08-05 12:31:32 +02:00
Vasyl Saienko
fc92d5ce43 Update add nova user to baremetal_admin behaviour
Some jobs/installations install ironic without nova. We need to
check that nova service is enabled/installed before adding nova
user to baremetal_admin. Otherwise it leads to deployment errors.

Change-Id: I7d753085d5c8ff6633fba3947752aed0e99c72b2
Closes-Bug: #1610011
2016-08-05 09:40:44 +03:00
Sinval Vieira
4483de30ba Add Dynamic Allocation feature for the OneView drivers
This change is about adding the ability to the OneView drivers of
dynamically allocate OneView resources to Ironic. The current
version of the drivers consider what we call "pre-allocation" of
nodes, meaning that when a node is registered in Ironic, even if
it is not in use, this resource is still reserved in OneView.
This change will prevent such situations by allocating OneView
resources only at boot time, allowing both systems to really
share the same pool of hardware.

Change-Id: I43d1db490b4834080562946b8a6ca584ea36864d
Co-Authored-By: Lilia Sampaio <liliars@lsd.ufcg.edu.br>
Co-Authored-By: Xavier <marcusrafael@lsd.ufcg.edu.br>
Co-Authored-By: Hugo Nicodemos <nicodemos@lsd.ufcg.edu.br>
Co-Authored-By: Thiago Paiva Brito <thiagop@lsd.ufcg.edu.br>
Co-Authored-By: Caio Oliveira <caiobo@lsd.ufcg.edu.br>
Partial-Bug: #1541096
2016-08-04 13:10:02 -03:00
Devananda van der Veen
c7da7a6925 Add keystone policy support to Ironic
Implements more fine-grained policy support within our API service,
following the oslo policy-in-code spec, while maintaining compatibility
with the previous default policy.json file. An empty policy.json file is
included, along with a sample file listig all supported policy settings
and their default values.

A new tox target "genpolicy" has been added to ease automation of
sample policy file generation.

All calls to policy.enforce() have been replaced with with
policy.authorize() to avoid silent failures when a rule is undefined,
because enforce() does not raise() if the target rule does not exist.

  NOTE: policy.enforce() is not removed by this patch, but a deprecation
  warning will be logged if it this method is invoked.

Updates unit test coverage for the new authorize() method, as well as
more general unit test updates for some of the new rules.

Partial-bug: #1526752
Change-Id: Ie4398f840601d027e2fe209c17d854421687c7b7
2016-08-04 12:43:20 +00:00
Jenkins
ff24dc2d93 Merge "Revert "Devstack should use a prebuilt ramdisk by default"" 2016-08-04 11:56:06 +00:00
Jenkins
42c7e7cf8a Merge "Update devstack plugin with new auth options" 2016-08-04 11:46:32 +00:00
Jay Faulkner
30fc692e3a Revert "Devstack should use a prebuilt ramdisk by default"
This reverts commit 5b752d258a0402abfd7f2511874f42bdf7c77dc1. Due to
devstack-gate only setting IRONIC_BUILD_DEPLOY_RAMDISK=false, this will
prevent IPA source jobs from ever building a new ramdisk.

Change-Id: I3e43c08b7f8e9d41f420b12475c9ce74cb860df9
2016-08-03 22:06:15 +00:00
Pavlo Shchelokovskyy
ff5347b3df Update devstack plugin with new auth options
Change-Id: I0a12f010d5b4325ee707bf674adb4813a8721c05
2016-08-03 11:24:25 -07:00
Jay Faulkner
5b752d258a Devstack should use a prebuilt ramdisk by default
Ironic-python-agent has both supported ramdisks prebuilt and ready for
download, leaving no reason for building this in devstack in the general
case.

This also resolves (via alternative means) the bug which is causing our
deploy ramdisk to get built every time in the gate.

Change-Id: I00cf31bf75343fec4d7ec11178b3a253da806ac0
Related-bug: #1607981
2016-07-29 16:03:26 -07:00
Vladyslav Drok
56d75b9654 Do the VM setup only when requested
After the recent change, we started calling create_bridge_and_vms
no matter if it was requested by setting IRONIC_BAREMETAL_BASIC_OPS
to True or not. This breaks the ironicclient functional job that
does not need any vms created.

Change-Id: Iabd2794fc0aad2ca752e04d87d53f641f26e9ffb
Closes-bug: #1605194
2016-07-21 14:39:43 +03:00
Jenkins
d91d1e1174 Merge "Update {configure|cleanup}ironic_provision_network." 2016-07-19 19:29:38 +00:00
Jenkins
1671023847 Merge "Add test to verify ironic multitenancy" 2016-07-18 17:27:02 +00:00
Vasyl Saienko
4cb336506a Update {configure|cleanup}ironic_provision_network.
Use OSC instead of Neutron client in configure_ironic_provision_network.
Do not rely on local.conf variable when perform cleaning in
cleanup_ironic_provision_network.

Change-Id: Ie6f5df657231ea16691a6ab88481c34bbdb1f281
2016-07-18 16:43:12 +03:00
Yuriy Yekovenko
9084c647a9 Add test to verify ironic multitenancy
* Create two tenants with own networks.
  * Boot 2 baremetal instances in the same IP subnet in
    different tenants.
  * Verify L3 connectivity between instances IP's
  * Verify L3 connectivity between instances floating IP's

Co-Authored-By: Vasyl Saienko (vsaienko@mirantis.com)

Change-Id: I4fe31ecae3393abc2779a5e80e348899f9113f1b
Related-Bug: 1520230
2016-07-18 15:50:05 +03:00
Jenkins
146c91245e Merge "Add configure_provision_network function" 2016-07-18 12:17:19 +00:00
Jenkins
c40d449a39 Merge "Update Ironic VM network connection" 2016-07-14 16:39:05 +00:00
vsaienko
75fc071b54 Add configure_provision_network function
This change allows to configure ironic provision network by setting
IRONIC_PROVISION_NETWORK_NAME variable. In this case additional
interface $OVS_PHYSICAL_BRIDGE.$IRONIC_PROVISION_SEGMENTATION_ID
will be configured with IRONIC_PROVISION_SUBNET_GATEWAY ip address.

Additional configuration parameters are:

IRONIC_PROVISION_PROVIDER_NETWORK_TYPE
IRONIC_PROVISION_SEGMENTATION_ID
IRONIC_PROVISION_ALLOCATION_POOL
IRONIC_PROVISION_SUBNET_GATEWAY
IRONIC_PROVISION_SUBNET_PREFIX

Change-Id: I619f2fb92aafe7348b0a47eaaaad1790df5ae5c7
Partial-bug: #1526403
2016-07-14 14:00:42 +03:00
vsaienko
8fe320753c Update Ironic VM network connection
When VM is dirrectly connected to OVS (current setup) there is no port
in OVS when VM is in powered off state. Since Ironic plug port to
network when VM is in powered-off state. Port should be present in OVS
even when VM is powered-off.

This patch adds additional network bridge called br-$VM_NAME for each
VM. Adds additional interface ovs-$VM_NAME which is added to both OVS
and br-$VM_NAME. And configures VM NIC in br-$VM_NAME instead of direct
connection to OVS switch.

Now connection looks like:

               Linux Bridge         OVS
 --------       -----------       ---------
 | vm-1 | <-->  | br-vm-1 | <---> | br-bm |
 --------       -----------       ---------

Change-Id: I317dd9429684a14d16ecf2887d45c2b014e36a84
Partial-bug: #1526403
2016-07-14 13:58:49 +03:00
Dao Cong Tien
22a80f77c5 Nova-compatible serial console: socat console_utils
This adds console_utils functions for 'socat' console.
Implements:
- get_socat_console_url(): returns url for socat console
- start_socat_console(): uses (socat + console_cmd execution)
- stop_socat_console(): stops socat/console_cmd subprocess

Change-Id: I79ddd83d12cc8111e05b5107359d6db8a8881d61
Spec: https://review.openstack.org/#/c/319505/
Related-Bug: #1553083
2016-07-14 01:09:19 +00:00
Jenkins
501b0cecbf Merge "Config variable to configure [glance] section" 2016-07-13 21:39:33 +00:00
Jenkins
e49cd1af0a Merge "Add support for building ISO for deploy ramdisk" 2016-07-13 21:39:24 +00:00
Jenkins
7fa98a94f8 Merge "Allow to use network interfaces in devstack" 2016-07-13 20:26:54 +00:00
Carol Bouchard
1805765fef Increase devstack BM VM RAM for coreos to boot
This change set increases baremetal VM RAM from 1024 to 1280 in
devstack script to support Coreos ramdisk version.

Change-Id: Ic93807e20d6fe3ba3a7a9f78c0a8887d1c54aa19
Closes-bug:  #1602277
2016-07-12 10:34:56 -04:00
R-Vaishnavi
8abcf2ebfe Config variable to configure [glance] section
Some drivers require glance with swift backend to
be able to store some deployment artifacts, e.g.
in case of iscsi_ilo driver it may be boot_iso that
is constructed from user image kernel and ramdisk.
This requires some configuration and this change is
intended for such drivers.

This commit adds a new config variable
IRONIC_CONFIGURE_GLANCE_WITH_SWIFT, which can be
set to True to configure the Swift related config
parameters of [glance] section in ironic.conf.

This patch is required for iLO ThirdParty CI.

Change-Id: I1bad2b06b268825e181b7b3125d08c977f54f7b8
2016-07-12 03:21:48 +00:00
R-Vaishnavi
6edfdfac31 Add support for building ISO for deploy ramdisk
This commit adds support for building and uploading
an ISO image for deploy ramdisk.  This is used by
some drivers in Ironic today. A new variable
IRONIC_DEPLOY_ISO_REQUIRED=true can be set in localrc
to create and upload ISO image for the deploy ramdisk.

This patch is required for iLO ThirdParty CI.

Closes-Bug: 1510914
Change-Id: I03a31490323b4bff9700146844a7009212840c60
2016-07-12 02:55:28 +00:00
Jenkins
c4ff454b10 Merge "Remove white space between print and ()" 2016-07-11 10:52:08 +00:00
yuyafei
32ac108e48 Remove white space between print and ()
TrivialFix

Change-Id: I0f691bbd30329266bc90bb64881a122f0384636b
2016-07-09 09:30:01 +08:00
Thiago Paiva
219a690329 Allow to enroll nodes with oneview driver
This patch allows import nodes with *_oneview drivers from
space separated nodes file.

Change-Id: I6d8447fd0404f9746bbfb0e38bf3c6c66b7ab1f8
2016-07-07 21:11:25 -03:00
vsaienko
58fbfabeda Allow to use network interfaces in devstack
This patch allow to set enabled_network_interfaces configuration option
via IRONIC_ENABLED_NETWORK_INTERFACES and registered ironic node with
IRONIC_NETWORK_INTERFACE.

Change-Id: Ie01ca4be3a085bc283879b5528c5c174a35a843b
Depends-On: I0c26582b6b6e9d32650ff3e2b9a3269c3c2d5454
Partial-bug: #1526403
2016-07-04 10:29:38 +03:00
Yuiko Takada Mori
e75ff03b6e Follow-up patch of 9a1aeb76da2ed53e042a94ead8640af9374a10bf
This patch set removes unused option.

Change-Id: I2fba6fd7800cab98e783fc29f2d60d5ecfdde458
Partial-Bug: #1589370
2016-06-28 11:14:21 +09:00
Jenkins
95ec6ab8b7 Merge "Fail early if ramdisk type is dib, and not building" 2016-06-28 00:57:58 +00:00
Jenkins
3fcc79f023 Merge "Fix parameter create-node.sh" 2016-06-28 00:57:50 +00:00
Sam Betts
13d25d4788 Fail early if ramdisk type is dib, and not building
Currently if IRONIC_BUILD_DEPLOY_RAMDISK is False, and ramdisk type is
DIB, we won't fail until the script attempts to run wget using an empty
address, this results in a hard to debug error. This patch ensures that
if we are not building the ramdisk but the ramdisk type is DIB that the
whole script fails early with an error message describing how to correct
the problem.

Change-Id: Ib9f31a3356ed64631129e5880e2657b0cf2014d2
2016-06-27 12:01:10 +01:00
Jenkins
5c0aefd59d Merge "Restore diskimage-builder install" 2016-06-24 17:50:47 +00:00
Jenkins
c821888bb0 Merge "Add Link-Local-Connection info to ironic port" 2016-06-24 07:50:25 +00:00
Mathieu Mitchell
b0565fa5ea Use PRIVATE_NETWORK_NAME for devstack plugin
The devstack plugin hardcodes "private" for the default cleaning network
and when looking up the network to bind onto for IPA-conductor
communication.

Ensure we are using the devstack PRIVATE_NETWORK_NAME variable instead
of hardcoding the commonly used name.

Change-Id: I6f344edc75ad1e2ac29bd59a9804ab3cad6cf2b2
Partial-bug: #1595598
2016-06-23 11:30:06 -04:00
stephane
e84051e5b2 Restore diskimage-builder install
In the change I0fc25c64339bc4c1f03ccb35cbc4efad4a7ad966, we
lost the ability to install diskimage-builder if not present.
Add this back if we're using dib to build IPA.

Change-Id: Ic4e59f6ad18af44cec33b770d1df91f5e9eade12
Closes-Bug: 1593005
2016-06-21 18:11:21 -07:00
Yuiko Takada Mori
9a1aeb76da Fix parameter create-node.sh
When IRONIC_VM_LOG_CONSOLE is set in devstack/local.conf,
devstack/tools/ironic/scripts/create-node.sh fails with below error message.

expected syntax: --format <string>

This error occurs because when IRONIC_VM_LOG_CONSOLE is set False,
log_arg is passed with empty string to
devstack/tools/ironic/scripts/create-node.sh.
This patch set fixes parameter order of
devstack/tools/ironic/scripts/create-node.sh, and also
create-node.sh has too many parameters, so fix to use getopts.

Change-Id: Ibdfff27e2c0119f8261f2324233acbeea6612d79
Closes-bug: #1589370
2016-06-17 13:44:22 +09:00
Jay Faulkner
2898b622f7 Change port used for Ironic static http to 3928
Due to recent infrastructure changes, infra began using port 8088. This
caused a conflict with our apache config, causing services to not start.
Infra is changing this port (Ie67bbba02dbf61a481f66001de3e0dede9448316)
but it may take up to a week to take effect.

Instead of having our gate broken for a week, I'm changing the default
port. 3928 was not chosen at random; it's listed as the netboot-pxe
service port in /etc/services.

Change-Id: Ifdcf3c82fd9ee64c1548e47dba4c78c2347959e0
Closes-bug: 1590139
2016-06-16 17:35:40 -07:00
vsaienko
b9cf7d42b1 Add Link-Local-Connection info to ironic port
This patch introduce new variable called IRONIC_USE_LINK_LOCAL.
Link-Local-Connection information is used by Neutron to bind_port
on the switch.

Change-Id: Icfb9257bded5b234a9d05f2b2de6d6580f2f42aa
Partial-bug: #1526403
2016-06-14 20:13:31 +03:00
Dmitry Tantsur
259a492243 Remove support for the old ramdisk (DIB deploy-ironic element)
To be specific, removed in this patch are:
* vendor passthru for the old ramdisk
* support for deploy_key
* various helper functions (like notify)
* devstack plugin support for the old ramdisk

Fixed:
* vendor passthru for drivers (add support for IPA to seamicro one)
* documentation for iSCSI-based deployment

Change-Id: I0fc25c64339bc4c1f03ccb35cbc4efad4a7ad966
2016-06-09 13:43:21 +02:00
John L. Villalovos
ebbffe1e73 Update comment from NOTE to TODO
A commend had been raised in the review that it should be a TODO.

Change-Id: I5fe8451d6375f6377cb1f3425e02193eb408666d
2016-06-07 07:21:27 -07:00
Jenkins
1dc12f268a Merge "Update resources subnet CIDR" 2016-06-07 09:43:37 +00:00
vsaienko
3de027ded5 Update resources subnet CIDR
During resources phase resources subnet is created with the same CIDR
as during setup. Ironic requires to have a route to this network from
control plane (ironic-conductor).
This patch creates a new network with has an unique CIDR and GATEWAY
defined by RESOURCES_FIXED_RANGE and RESOURCES_NETWORK_GATEWAY.
Default value for RESOURCES_FIXED_RANGE is 10.2.0.0/24 and
for RESOURCES_NETWORK_GATEWAY is 10.2.0.1

Change-Id: I83f9f90809bbf2e6d73c7282bbb9b2be084b6a66
Co-Authored-By: vsaienko <vsaienko@mirantis.com>
2016-06-06 15:28:09 -07:00
dparalen
033dbb2d10 remove neutron stuff from devstack deb packages
It seems we are enforcing certain dependencies to be always installed on
behalf of other projects.  The issue I'm facing is we unconditionally
install openvswitch-datapath-dkms which isn't necessary for Ubuntu kernels
>= 3.13.  Even worse, this package isn't available on Ubuntu 16.4 LTS thus
breaking devstack setup.sh on that platform.

This patch removes Neutron dependencies as those are handled by devstack[1]
and devstack neutron plugin[2]

[1] https://github.com/openstack-dev/devstack/blob/master/files/debs/openvswitch#L3
[2] https://github.com/openstack-dev/devstack/blob/master/lib/neutron_plugins/ovs_base#L58

Closes-bug: #1580101

Change-Id: Iff0cf13499d9cb05f241f23759d5faec9a9c4a98
2016-06-06 15:49:59 +00:00
Jenkins
8b75becccb Merge "Add support for dib based agent ramdisk in lib/ironic" 2016-06-02 19:16:21 +00:00