381 Commits

Author SHA1 Message Date
Vasyl Saienko
38f38fb303 Ignore required_services for multinode topology
Skip required_services check for subnode in multinode environment.

Change-Id: I0fa8ea81bbb9ebbc7de86e143d5562fb095ba6c3
Depends-On: I7e4ab0fec79f027302baea7257c9851f34d8be39
2016-11-03 16:54:16 +02:00
Lucas Alvares Gomes
793e2b1e3f DevStack: Support for creating UEFI VMs
This patch is enhancing the create-node.sh script to allow creating UEFI
capable VMs. Two new options were added:

* -L (UEFI Loader): For specifying the absolute path to the UEFI LOADER
* -N (UEFI NVRAM): For specifying the absolute path to the non-volatile
                   memory to store the UEFI variables, if needed.

Partial-Bug: #1625616
Change-Id: I3a05ff339877ff31eefda8a5a35b6e343bd4627b
2016-11-03 11:54:44 +00:00
Jenkins
75e24246ac Merge "Correct log the node UUID on failure" 2016-11-01 22:25:03 +00:00
Vasyl Saienko
0036d83b33 Use kvm for ironic VMs when possible
Nova pick KVM as preferred virtualization type when possible and
fallback to qemu [0].
This patch introduce devstack IRONIC_VM_ENGINE option that allows to
set libvirt type explicitly. If not set pick it dynamically,
kvm is preffered.

[0] https://review.openstack.org/#/c/31177/4/lib/nova@240

Change-Id: I05859974c312cb5df1d4b96dc3b98fbc1006359e
2016-10-31 11:18:51 +00:00
Yuiko Takada Mori
a0b316c7ac Correct log the node UUID on failure
Correct log the node UUID in the DevStack when it fails to add/update
the network_interface.

Prior to this patch some gibberish was being logged due to a broken grep.

Change-Id: I25206b9a34091bfb18528e39a4885fbfc10a7bd3
2016-10-28 12:09:39 +02:00
Jenkins
2e2f7633f4 Merge "Remove use of 'vconfig' command in devstack ironic script" 2016-10-26 11:05:49 +00:00
Clif Houck
3c54dd54c6 Remove use of 'vconfig' command in devstack ironic script
In favor of using the equivalent 'ip' command.

Change-Id: If70ce5c5fff2fc2c30ce4b40c6e90c95821d29ab
Closes-Bug: #1633586
2016-10-25 15:52:13 -05:00
pawnesh.kumar
d92425dfe8 Revert "Set SUBNETPOOL_PREFIX_V4 to FIXED_RANGE"
This reverts commit I8f0e5405f3e2d6e35418c73f610ac6b779dd75e5

Revert the temporary changes, when problem is fixed in devstack.
https://bugs.launchpad.net/devstack/+bug/1629133

Change-Id: I0b51e748043d785ca18dda8d7be744bf67feeaeb
2016-10-21 19:13:25 +00:00
Vasyl Saienko
57821e73b0 Skip create_ovs_taps() for multitenancy case
With multitenancy case there is no need to create a hacky
connection between brbm and br-int. This patch ensure that
we do not call devstack create_ovs_taps() with multitenancy
case.

Change-Id: I1326a3f83d596655d577c48f642ac3ba8a8b6ee2
2016-10-17 10:11:03 +03:00
Jenkins
a67facf208 Merge "Introduce default_boot_option configuration option" 2016-10-13 11:31:01 +00:00
Dmitry Tantsur
93f947c852 Introduce default_boot_option configuration option
This is the first step to changing the default boot option from netboot to local.
The new configuration allows setting the default boot option globally.

A warning is issued if no explicit value is provided for this configuration.

Change-Id: I3bd4a165fa2ec1105f34bf5a2150da99136ba4a6
Partial-Bug: #1619339
2016-10-11 14:59:19 +02:00
Vasyl Saienko
e7190eac30 Fix broken xenial job
MTU has been changed in neutron to 1450 by default by [0]
As result ISCSI job on xenial become broken. With this patch
PUBLIC_BRIDGE_MTU is set to smallest mtu of existed interfaces decreased
by 50. MTU on IRONIC_VM_NETWORK_BRIDGE is set to PUBLIC_BRIDGE_MTU.

[0] 51a697817d

Closes-Bug: #1631875
Related-Bug: #1603268
Change-Id: I044d415410a714591e9770a57cfb8509a103cf00
2016-10-11 15:04:24 +03:00
Vasyl Saienko
5194f4181b Fix setting custom IRONIC_VM_NETWORK_BRIDGE
Pass IRONIC_VM_NETWORK_BRIDGE to setup-network.sh script.
Update setup-network.sh script to use new bridge name.

Change-Id: I934e5604fc1850007fb55bc637fe449ac17b98d0
2016-10-11 15:02:40 +03:00
Vladyslav Drok
63b76e8ad1 Remove unnecessary option from plugin settings
The setting of Q_USE_PROVIDERNET_FOR_PUBLIC was added to
multitenancy job in project-config commit
7d1e2127a2b055640d90808347ae5b133df83847, so no need to set it in
the plugin settings anymore.

Multitenancy devstack setup docs are updated too.

Change-Id: I165bfc8051b9cf3fc80f299c8215712089003f3a
2016-10-06 20:52:46 +03:00
Jim Rollenhagen
183d1d5ff1 Set SUBNETPOOL_PREFIX_V4 to FIXED_RANGE
The default for SUBNETPOOL_PREFIX_V4 in devstack causes external
connectivity to be mostly broken in osic-cloud1 nodes. IPA relies on
external activity to build images, and osic-cloud1 is pretty prevalent
for running CI jobs, therefore this breaks IPA CI.

Setting this to the same range as FIXED_RANGE should eliminate this, or
at least reduce the probability of it happening from 1:(size of /8) to
1:(size of /24).

This should be reverted when the actual problem is fixed in devstack.

Related-Bug: #1629133
Change-Id: I8f0e5405f3e2d6e35418c73f610ac6b779dd75e5
2016-10-06 08:53:11 -04:00
ChangBo Guo(gcb)
66a0812058 Trivial: Fix some typos in comments and docstring
Change-Id: I2b0f76c7458f79e23708c8dd9455239c71cc2f5a
2016-10-03 11:38:00 +00:00
Jenkins
85750a1913 Merge "Move flavor create under 'VIRT_DRIVER == ironic'" 2016-10-01 16:59:39 +00:00
Jenkins
f0872d9ff6 Merge "Support https in devstack plugin" 2016-10-01 03:13:15 +00:00
Vasyl Saienko
c1e0fece35 Fix grenade jobs
This changes up devstack code to make sure OVS does the right thing
after upgrading. After the neutron upgrade, it uses a new OVS tag for
networking, so this changes things over to the new one.

Make sure that we remove all resources that were created during
resources phase.

Set tempest fixed_network_name explicitly as it is prerequirement for
ironic, see reference.

Reference:

https://github.com/openstack/tempest/blob/039b2fe/tempest/scenario/manager.py#L1161

Change-Id: I35789602fb542bb33533211a742c3e4d265a3b91
2016-09-30 11:42:41 +00:00
Zhenguo Niu
e388c3e715 Move flavor create under 'VIRT_DRIVER == ironic'
We only check nova service enabled when VIRT_DRIVER set to ironic,
so moving nova flavor create under the condition in case of nova
disabled.

Change-Id: I351c3628895d25823500d116845eff3c8b9411fe
2016-09-28 22:10:52 +08:00
Clark Boylan
f584606d55 Support https in devstack plugin
Devstack allows for services to be deployed with https. Configure
services properly in ironic's devstack plugin in this case.

Change-Id: I3b7e529ef57dc4c7bb5d34160a068945140cf789
2016-09-23 14:10:05 -07:00
Jenkins
659f951d72 Merge "DevStack: Use Jinja2 for templating when creating new VMs" 2016-09-23 16:33:22 +00:00
Jenkins
a0c1121d1d Merge "Change the logic of selecting image for tests" 2016-09-22 18:44:20 +00:00
Vladyslav Drok
e434225f9b Change the logic of selecting image for tests
Right now devstack sets DEFAULT_IMAGE_NAME depending on the driver in
stackrc. UUID of the image with this name is then written to tempest
config during tempest configuration stage and is used to determine
which image will be used during nova boot.

As ironic python agent now supports both whole disk and partition
images, we should change this logic, and the user should be able to
request which image should be used in tests.

This commit adds IRONIC_TEMPEST_WHOLE_DISK_IMAGE and
IRONIC_IMAGE_NAME variables to provide this possibility.

If IRONIC_TEMPEST_WHOLE_DISK_IMAGE is not set, we try to infer the
image type by the size of the ephemeral partition requested, if it
is 0, we consider the image to be whole disk.

Change-Id: Ic718a6b37c09ae564ecc3913cf31234316f1da63
2016-09-22 15:03:03 +00:00
Lucas Alvares Gomes
d4d2183c48 DevStack: Use Jinja2 for templating when creating new VMs
This patch is changing the configure-vm.py script to use Jinja2
templating when creating new VMs instead of string interpolation.

Jinja templating allows more complex templating such as conditionals
which will greatly simplify the code for creating Legacy BIOS or UEFI
supported VMs.

Change-Id: Id4a8432923fa71ca8f3f28edd1235d3a318c3e95
Partial-Bug: #1625616
2016-09-21 14:56:20 -03:00
Jenkins
8ed3557e2f Merge "Fix test syntax error in devstack/lib/ironic" 2016-09-19 17:31:51 +00:00
Jenkins
f41c26d4f2 Merge "Allow using TempURLs for deploy images" 2016-09-19 16:48:28 +00:00
John L. Villalovos
f6771bd1bf Fix test syntax error in devstack/lib/ironic
The test conditional was not using [[ ]] for the if statement
conditional.

We can use '&&' inside [[ ]]. So put all the tests inside the one
[[ ]] block.

Change-Id: I4c8cb7a3a49f5e00ec638bd1fd1d9eb4931b97a1
2016-09-15 10:09:31 -07:00
Pavlo Shchelokovskyy
15de01a5f6 Configure clean network to provision network
Currently when setting up Ironic with multi-tenancy support,
the DevStack plugin by default still sets the cleaning network
to the default private network of the demo project,
which is not exactly correct.

Change the DevStack plugin so that the cleaning network
is the same as provisioning network if IRONIC_CLEAN_NET_NAME is not set:

- In case of multi-tenancy support enabled, use the created separate
provisioning network
- w/o multi-tenancy support use the default private network.

If the IRONIC_CLEAN_NET_NAME is provided, use that.

Change-Id: I9db8f5e3000f05d27a3fa8fc94cfdafe34a6f48a
2016-09-12 11:50:56 +03:00
Pavlo Shchelokovskyy
497be96d4a Allow using TempURLs for deploy images
when iPXE is enabled, it is possible for the bootloader to download
the deploy kernel and ramdisk directly from Swift TempURL instead of
downloading them to conductor and serving from local HTTP server.

This patch adds the required logic and a new config option
`ipxe_use_swift` (default False), setting which to True enables
using Swift TempURLs for deploy ramdisk and kernel.

Note that local caching and serving for kernel and ramdisk of user image
is still performed for partition images that require non-local boot,
as moving those to use TempURLs will make it impossible for the user
to reboot the instance when TempURLs time out or image is deleted from
Glance/Swift.

Change-Id: I106cc6148c329e784bfbb5019fdfeb0509a9de09
Closes-Bug: #1526404
Co-Authored-By: Andrey Shestakov <ashestakov@mirantis.com>
2016-09-07 20:40:53 +03:00
Jenkins
b7b38352ea Merge "DevStack: Configure retrieving logs from the deploy ramdisk" 2016-09-01 11:03:03 +00:00
Jenkins
5493389f5c Merge "OneView test nodes to use dynamic allocation" 2016-08-31 21:31:55 +00:00
Vasyl Saienko
a53dae62af Fix ironic-multitenant-network job
Recently neutron public network type has been changed by default
to flat [0]. It caused ironic-multitenant-network job to failure.
This patch update settings in ironic/settings untill apropriate changes
are merged to project-config and developer documentation.

Reference:
[0] https://review.openstack.org/#/c/346282/
Change-Id: Icd83203f1c61f71c96324c532baabe3a924cf617
2016-08-31 15:36:04 +00:00
Lucas Alvares Gomes
8b1b946d18 DevStack: Configure retrieving logs from the deploy ramdisk
This patch changes the devstack plugin to allow users to configure the
ironic service to retrieve (or not) the logs from the deploy ramdisk. By
default this feature is enabled in Ironic to collect the logs upon a
deployment failure but in DevStack we've set it to *always* to help us
with troubleshooting.

Three new configuration were added to devstack:

1. $IRONIC_DEPLOY_LOGS_COLLECT - When Ironic should collect the logs,
   possible values are:

   * on_failure: Collect the ramdisk logs upon a deployment failure
   * always: Collect the ramdisk logs from the deployment on success or
     failure
   * never: Never collect the ramdisk logs

2. $IRONIC_DEPLOY_LOGS_STORAGE_BACKEND - Where should Ironic store the
   logs, possible values are:

   * local: To store the logs in the local filesystem
   * swift: To store the logs in Swift

3. $IRONIC_DEPLOY_LOGS_LOCAL_PATH - The path to the directory where
   Ironic should put the logs when $IRONIC_DEPLOY_LOGS_STORAGE_BACKEND is
   set to "local". Defaults to /opt/stack/ironic-bm-logs/deploy_logs

Change-Id: Iedd0858a84eff03d9b5074c04c9e132a90cea1cf
Closes-Bug: #1616969
2016-08-30 10:59:33 +01:00
rajinir
4f1416ad45 Option to enroll nodes with drac driver
This patch allows import and enroll nodes with pxe_drac
driver from space separated hardware info node file.

Change-Id: Ie87fed29cc2bb7b156b89ec026cd0c59eb07fb11
2016-08-29 11:33:48 -05:00
Lucas Alvares Gomes
55410888de Fix pep8 on Python3.5
This patch is fixing the pep8 warning messages when running "tox -epep8"
with the python3.5 interpreter (the default on some distros, e.g Arch
Linux).

The method file_open() from common/utils.py was removed because it
wasn't being used anywhere and was violating pep8 by using file() which
is only present in python2.

Change-Id: Ie9356a870ea7b271aa44db57accba02f52b3e948
Closes-Bug: #1617947
2016-08-29 12:07:41 +01:00
Thiago Paiva
8d2a0087e5 OneView test nodes to use dynamic allocation
Now that the dynamic allocation feature has merged, the testing of *_oneview
drivers shall use the new allocation model on the CI infra. To allow this, we're
adding a new parameter to the hwinfo file to indicate when the
dynamic_allocation flag should be added to the node and managing the logic when
it is present.

Change-Id: I40ed9abe96dd15701b31e0ad0b7d71ff065488ef
2016-08-25 10:42:28 -03:00
Jenkins
73fe52c5a8 Merge "Always set DEFAULT/host in devstack." 2016-08-19 04:03:49 +00:00
Vasyl Saienko
bbfd59a637 Always set DEFAULT/host in devstack.
This patch always set DEFAULT/host option to local machine hostname.
When mutinode setup is used conductors should have different host values.

Change-Id: I54056d163c06f0afb3702c3af98d85342c6e8232
2016-08-18 15:08:24 +03:00
Lucas Alvares Gomes
935a44ff44 DevStack: No need to change the ramdisk filesystem type
This patch is removing the conditional that was changing the ramdisk
fileystem type from tmpfs to ramfs in case the amount of RAM was lower
than 1GB.

That code was used before to make the bash ramdisk to boot on machines
with less than 1GB of ram, now we do have TinyIPA so I believe this code
is not needed any more.

Ramfs is old and should be replaced with tmpfs which overcomes many of
it's limitation.

Change-Id: I54fd06213e003aba705118ea0cff72f889cfcc08
2016-08-15 10:08:57 +01:00
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