463 Commits

Author SHA1 Message Date
Zuul
70a86cd8b5 Merge "Add option to specify mac adress in devstack/.../create-node.sh" 2018-02-05 05:25:03 +00:00
Zuul
e8cf57fa6a Merge "Remove sample policy and config files" 2018-02-03 16:35:38 +00:00
John Garbutt
d336978834 Remove sample policy and config files
Now we have docs, lets point people there rather than attempting to
maintain a copy in tree.

Also update the devstack plugin to know nothing about policy.json, as it
never allowed for customizing the location or the contents anyhow, and
to build ironic.conf from scratch rather than from the sample.

Change-Id: I10a4987204eb335f1fed29d4b1d7f3e075aa1792
2018-02-02 11:21:29 +00:00
Zuul
7bee7b7c5f Merge "Wait for ironic-neutron-agent to report state" 2018-02-02 09:24:40 +00:00
Zuul
92e0797724 Merge "Devstack - use neutron segments (routed provider networks)" 2018-02-01 20:06:09 +00:00
Derek Higgins
e209a6cf02 Add option to specify mac adress in devstack/.../create-node.sh
Add an option that allows the caller to specify a MAC for the
created node.

Change-Id: I341aa23b45901ee5e96254508c6327ebf67f2c9e
2018-02-01 11:46:56 +00:00
Zuul
d6c5927c38 Merge "Switch the CI to hardware types" 2018-01-31 04:30:36 +00:00
Harald Jensas
d2da4150ea Wait for ironic-neutron-agent to report state
Wait for the agent to finish reporting state, bridge_mappings
must be reported prior to any cleaning attempts.

Change-Id: I041761dd896c9d89dc6cf7bafc991a0697ded05b
Related-Bug: #1658964
2018-01-29 11:07:41 +01:00
Harald Jensas
d0d78a86de Devstack - use neutron segments (routed provider networks)
When IRONIC_USE_NEUTRON_SEGMENTS is True:
* The provisioning subnet is associated with the segment on the
  provisioning network.
* The baremetal node ports is created with --physical-network set.

The neutron segments service_plugin must be enabled to allow
associating the subnet with the segment.

Change-Id: Ie6dcebf24413c65ecdc3e0c56cc56f8d88dc406c
2018-01-29 11:07:33 +01:00
Julia Kreger
904f44522b Be more sane about cleaning
Seems that by default we now run cleaning
on all jobs. However, this is extremely wasteful
and time consuming. Also, if a cloud is IO resource
constrained, it can result in jobs failing erroneously
due to unpredictable IO performance, particularly with
the multinode jobs.

As such, slightly extend the wait timeout before we
fail for nodes not being ready, and flag multinode
jobs not to run cleaning.

Change-Id: I12011743fa197caef08a3d6d1297d662dfa7640a
2018-01-24 12:57:05 -08:00
Dmitry Tantsur
fa850c80cb Switch the CI to hardware types
Note that the job names are not changed to reduce the diff of this
patch. They will be renamed in later changes.

For the direct deploy, copy Swift temporary URL configuration from
devstack-gate (it hardcoded agent_* there).

Also clean up no-op conditions on drivers left from the times when
the job definitions were parametrized.

Change-Id: Ib0297f8936bba9449a02fb1a878981ab55687ef9
Partial-Bug: #1690185
2018-01-24 15:56:36 +01:00
Zuul
3dce1aa5c1 Merge "Setup ansible interface in devstack" 2018-01-15 16:13:02 +00:00
Pavlo Shchelokovskyy
fbcc4df961 Setup ansible interface in devstack
- enable ansible deploy interface
- install Ansible version from driver-requirements.txt
- generate private SSH key to use by Ansible (if absent)
- add the public ssh key to the tinyipa image during (re)build

By default nodes are not enrolled with it, as they will be assigned this
driver/interface in standalone tests.
For local development, nodes can be enrolled by setting

  IRONIC_DEFAULT_DEPLOY_INTERFACE=ansible

in local.conf and enabling 'ansible' deploy interface in the
IRONIC_ENABLED_DEPLOY_INTERFACES variable.

Change-Id: I12c1727c3ded13c381852334cb54e5e976154e98
2018-01-15 11:34:24 +00:00
Zuul
c31b22887f Merge "Run in superconductor cellsv2 mode for non-grenade jobs" 2018-01-09 16:12:28 +00:00
Jim Rollenhagen
28a165fae4 Devstack: install qemu-system-x86 on RHEL
This wasn't installed for me on a devstack run on a fresh RHEL 7.4 box.
Make sure it's installed as we depend on it by default.

Change-Id: I4faadb2d73afd298ffb1b7690b23f72800123f77
2018-01-03 14:41:48 -05:00
Matt Riedemann
da477a07f8 Run in superconductor cellsv2 mode for non-grenade jobs
Added in change I2bbdac5cd431e72517cb1c72bb925660ec8e868b,
ironic needed to run the multi-node jobs in singleconductor
mode because they rely on reschedules working in nova, which
doesn't work in superconductor mode where the top-level conductor
and scheduler are on a different message queue from the compute
service and cell conductor.

With the alternate hosts series in nova in Queens, we should have
the reschedule problem fixed such that when originally scheduling,
we not only get a target host but also a list of alternates for
retries within the cell. This allows us to run ironic multi-node
CI jobs (and all ironic non-upgrade related jobs for that matter)
in the default superconductor mode which is the recommended way
to run nova with cellsv2.

Depends-On: Iae904afb6cb4fcea8bb27741d774ffbe986a5fb4
Depends-On: Ie599968d9e7537e551fe6d9deb63a91b256b1e11
Change-Id: I755243abed054e6b6556a9a9498e565042293262
2017-12-22 16:43:45 +00:00
Harald Jensas
4cb638f65e Use openstack port create instead of neutron port-create
Change-Id: Icbb95fd00bfaac69f3fe8ff3b93118b2095608ff
2017-12-20 14:18:17 +01:00
Zuul
2924c3efb6 Merge "Finalize migration to keystoneauth adapters" 2017-12-20 02:21:54 +00:00
Pavlo Shchelokovskyy
ba53acb279 Finalize migration to keystoneauth adapters
removes code that allowed some service sections to not have and use
keystoneauth adapter options.

Also deprecates `[keystone]region_name` option in favor of per-client
option of the same name.

Change-Id: Ifd58947b016bfa93b516dd47a170ba8f5abf277e
Closes-Bug: #1699547
2017-12-19 12:17:35 +02:00
Zuul
547159c893 Merge "Use adapters for neutronclient" 2017-12-18 05:51:38 +00:00
Pavlo Shchelokovskyy
4d43262955 Use adapters for neutronclient
deprecates the following options in [neutron] section:
- url
- url_timeout
- auth_strategy

Changes some internal networking-related functions/methods
to accept a request context as optional keyword argument (defaults to
None).
This allows to pass a global request id to neutron client and
in future will simplify creating a user auth plugin from request
context.
For backward compatibility, when calling those functions/methods
without a request context, a dummy request context will be generated
automatically.

Change-Id: Ib327c7a141cfbca63b870027ad8e901c0f48bb2d
Partial-Bug: #1699547
2017-12-14 13:36:03 +02:00
Dmitry Tantsur
83dd6a1c0e Auto-detect the defaults for [glance]swift_{account,temp_url_key,endpoint_url}
In many cases, including devstack and TripleO, the swift account to use
is based on the project_id of the 'service' project, so it makes sense
to use it as a default.

Similarly, the temporary URL key can be fetches from Swift, using HEAD
on the account used to access it.

In both cases it is assumed that the same project is used by Ironic
and Glance to access Swift. Explicit values have to be provided
otherwise.

Finally, the endpoint URL can be fetched from the service catalog. Care
is taken to strip the /v1/AUTH_<tenant ID> suffix.

Closes-Bug: #1737714
Change-Id: I701899928f0f780939f17aabc59eb90593ba95f0
2017-12-12 11:48:06 +01:00
Zuul
6e920c1052 Merge "Fix swiftclient creation" 2017-12-06 22:51:13 +00:00
Pavlo Shchelokovskyy
9ee28252a4 Fix swiftclient creation
in the change I52f1386df45ebe0a43b11fe1583e012dfa3af532
we lost most of swiftclient options in a belief that those are handled
by the keystoneauth session passed to the swiftclient.

In fact though, swiftclient only uses this session to get itself an
endpoint and a token, but it has no SessionClient, and does not use that
passed in session to make further requests to swift itself.

This patch restores all the logic that we had to decompose the session
object loaded from config to options that are passed to swiftclient
explicitly.

Change-Id: I08f382aa9d2ad22f7dbd65f7b54a8dd0a765ba44
Partial-Bug: #1699547
Closes-Bug: #1736158
2017-12-06 14:14:29 +00:00
Ilya Etingof
47b198cb0a devstack to git pull sushy-tools if required
This change to devstack plugin code checks if `sushy-tools`
has been requested to be pulled from git rather than pypi.
This is a prerequisite for `sushy-tools` CI job to test the
Redfish emulator against Ironic conductor.

Change-Id: I548f5a19a266436edbb874ea14af67db711240be
2017-12-01 15:13:39 +01:00
Zuul
0db99e1a03 Merge "[devstack] stop setting or relying on standard properties" 2017-11-28 15:56:18 +00:00
Pavlo Shchelokovskyy
303ac3f835 Use adapters for inspectorclient
Inspector-client is a bit lacking behind other clients, as it does not
have Adapter-based SessionClient and thus does not support all
adapter-related options.
That's why we construct a session and an adapter from config section,
use adapter to resolve inspector API from service catalog
(or return the fixed endpoint_override one)
and then pass the session and inspector API endpoint to client.

This patch also deprecates `[inspector]service_url` in favor of
`[inspector]endpoint_override`.

As a side-effect, addressig inspector service now supports both regions
and interfaces to specify entry in service catalog.

Also, inspectorclient calls are now being made with the user token
(wrapped with a service token) when there is a token in the task's
request context.

Change-Id: I21836e712fa9764468ac2654525554b5b4f03741
Partial-Bug: #1699547
2017-11-21 09:33:08 +02:00
Pavlo Shchelokovskyy
3e84bdb6db Use adapters for cinderclient
deprecates the `[cinder]url` option in favor of
[cinder]endpoint_override.

Change-Id: Idd02e8cf0892965a3138479e49ec40cfeda7c96d
Partial-Bug: #1699547
2017-11-21 09:32:21 +02:00
Pavlo Shchelokovskyy
63e0ff2f6c Rework keystone auth for glance
this patch changes the way glance client is instantiated, using
keystoneauth sessions and adapters.

In order to support glance API endpoint discovery from keystone catalog
and more unified way of client loading,
many options in `[glance]` config sections are deprecated,
mostly those that specified a (set of) glance API endpoint(s)
or parts of glance API address.
Instead, a single option `[glance]endpoint_override` must be used when
required to access a specific (possibly load-balanced)
glance API endpoint without discovering it from keystone catalog.

Another set of deprecated options are those that are duplicating
keystoneauth session options in [glance] section.

Also, intrinsic support for parsing the glance API URL from image ref
set to the full glance REST path to the image is removed as it was not
working any way since an 'http(s)://' image ref is not treated
as a glance image.

Change-Id: I6a93b71ac097e951dfc93fd1ee4d7ef483514f2c
Partial-Bug: #1699547
Closes-Bug: #1699542
2017-11-17 11:40:14 -05:00
Zuul
0a2d87f400 Merge "devstack: Clean up some of the devstack code" 2017-11-09 11:12:34 +00:00
Dmitry Tantsur
fe2102f90c [devstack] stop setting or relying on standard properties
This change moves our devstack plugin away from using the old
scheduling properties: memory_mb, local_gb and cpus. Nova will
stop using them for scheduling in Queens.

The cpu_arch property is left intact, as it's still useful.

The Placement API is polled to determine when nodes are fully exposed
to nova instead of polling the hypervisor stats. cURL + jq are used,
as the Placement OSC plugin is not ready yet.

Change-Id: I497a992bd86e8a359f333d6936621d1136d68061
2017-11-07 14:54:37 +01:00
wanghao
4b6fe66687 Miss node_id in devstack lib
When installing devstack, found there is
a missing node id in devstack/lib/ironic
when root devices are less than 4Gb.

Change-Id: I331bfe1e6481dc0de2869166fc6a2a0398314735
Closes-Bug: #1730526
2017-11-07 10:20:00 +11:00
John L. Villalovos
1b23af1c77 devstack: Clean up some of the devstack code
Mostly inspired by some comments left in the review of commit
aa5fd8afdc31b95c1a5f91f8af5fa733c4afd121 (Allow to set default ifaces
in DevStack)

Sorted the list of enabled interfaces and the default interface
values.

Used a local variable to store the uppercase value, in order to make
the code more readable as people may not immediately know what
${var^^} does in bash.

Change-Id: Ic2b2ac0a3cea9fa39173c5e2f5a9eaa3f4d8d2e4
2017-11-01 10:42:03 -07:00
Pavlo Shchelokovskyy
aa5fd8afdc Allow to set default ifaces in DevStack
as we move toward deprecating classic drivers,
we need a way to specify which particular combination
of interfaces of a hw type to assign to nodes being enrolled
and run test against.

This patch adds a number of IRONIC_DEFAULT_<>_INTERFACE
variables to devstack plugin (all empty by default)
and if set, sets their value as "[DEFAULT]default_<>_interface"
config option.

Change-Id: I9fc22125ddd3c70ff37185d025df1dfa3217a782
2017-10-31 17:31:30 +00:00
Vasyl Saienko
f357c76cd5 [Devstack] Replace tap with veth
This patch replace tap interfaces by veth pairs which
ensures that port is always present in ovs even when VM
is powered off.

Closes-Bug: #1722158

Change-Id: I04ff6a97bebf15636a794b51f748c62eda627d36
2017-10-10 11:33:25 +00:00
zhurong
84b6fdd81b Using devstack configure_rootwrap to configure ironic rootwrap
Change-Id: Ib3e258f2e0f9a0415562c9b16dbb2bcea31510f1
2017-09-07 15:10:38 +08:00
Jenkins
0114f71fe5 Merge "Introduce keystoneauth adapters for clients" 2017-09-05 14:12:38 +00:00
Jenkins
ca977b2712 Merge "devstack: Comment variables related to multi-tenant networking" 2017-08-29 01:36:12 +00:00
Jenkins
fdc5b9ad93 Merge "Test ironic-dbsync online_data_migrations" 2017-08-29 01:34:37 +00:00
John L. Villalovos
e1d777bd20 devstack: Comment variables related to multi-tenant networking
Comment some of the variables related to multi-tenant networking. To
make it clear what turns on multi-tenant networking testing.

Change-Id: I6126dd385c6a341e18b825c00d4afe9194d32b35
2017-08-28 16:03:08 +00:00
Vasyl Saienko
e5b7aa2033 Test ironic-dbsync online_data_migrations
Run ironic-dbsync online_data_migrations on single node grenade
right after usual dbsync.
Do not set pin_relase_version for single node grenade as we
do cold upgrade and it is not required.

Related-Bug: 1526283
Related-Bug: 1502887
Change-Id: I2e331252aeb66376c2d6cc3c16b6de0aefca5434
2017-08-28 15:46:56 +00:00
Vladyslav Drok
212029537d Add a comment about default devstack images
Change-Id: I64d09d4a6f25ed7dafcdd8dcfd3ed7407eba0baf
2017-08-28 18:08:45 +03:00
John L. Villalovos
44a2b3cb9c Add #!/bin/bash to devstack/common_settings
This helps text editors know the file type and adjust syntax
highlighting correctly.

Change-Id: Id2967d069a0ac443edff06ea037c428559481a5b
2017-08-25 13:19:19 -07:00
Jenkins
4cb2175144 Merge "Set explicit default to enabled driver interfaces" 2017-08-23 10:50:52 +00:00
Jenkins
7f924cf30f Merge "Partially revert "Set resource class during upgrade"" 2017-08-22 15:34:23 +00:00
Vladyslav Drok
63f803c4a9 Partially revert "Set resource class during upgrade"
This reverts part of commit 30bc3c0933a1072e5e4c48b4614f5f387ffd8327.
On master, when upgrading from pike to queens in grenade, we already
create all the nodes with a resource class being set, so no need to
update it. We still pass the parameters to verify and verify_noapi as
that's what grenade does.

Change-Id: Ic7c3218fe95ef9f73d358216831158a1ec025fba
2017-08-22 10:02:32 +00:00
Pavlo Shchelokovskyy
308e414a57 Introduce keystoneauth adapters for clients
Currently ironic explicitly or implicitly sets the API urls
for most services in the config.
This is quite fragile and we should move to discovery from
the keystone catalog eventually.

To support this, this patch registers `keystoneauth1.adapter.Adapter`
options to all config sections for service clients auth.
Among others it exports `interfaces` option that we set to
['internal', 'public'] by default.
Other exported options are `service_type`, `service_name`, `region_name`
and `endpoint_override`.
The latter will eventually be used by all clients to specify a specific
endpoint to use (for example in noauth mode).

Effectively this patch starts to move all clients code to load client
configuration from config for all of auth, session and adapter.

The first to move is [service_catalog] section, with [conductor]api_url
option being deprecated in favor of [service_catalog]endpoint_override.
A sane default of 'service_type' = 'baremetal' is set for this config
section as well.

More patches moving other clients to consume these new options and
deprecate some other options will follow.

Change-Id: I1283ef3b4d736ac089df0cc74a5850a93b24b6ab
Partial-Bug: #1699547
Related-Bug: #1699542
2017-08-22 06:07:19 +00:00
Jenkins
6efe371280 Merge "devstack: Remove unused variable IRONIC_VM_NETWORK_RANGE" 2017-08-21 22:40:12 +00:00
Jenkins
c55c090b99 Merge "Set resource class during upgrade" 2017-08-21 22:19:43 +00:00
Pavlo Shchelokovskyy
f7fa8afa5b Set explicit default to enabled driver interfaces
this will allow any other devstack plugin that depends on ironic to
easier extend the list for a particular enabled interface type

current explicit defaults are copied from current ironic.conf.sample

Change-Id: I1e22a8dc4bb57e1b1e1002baab38ba2f3ba8f230
2017-08-21 13:14:26 +00:00