443 Commits

Author SHA1 Message Date
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
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
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
Vladyslav Drok
30bc3c0933 Set resource class during upgrade
This is done to trigger a bit of code from commit
c3118b91db4b97a689c9a2f25a9554a0ccb29252 to nova for active nodes.

Change-Id: I1ac1b8501cbed901941e7c89fc55c5b9bea0cb4f
2017-08-21 10:14:42 +00:00
Jenkins
82fc8bdad6 Merge "[devstack] use resource classes by default" 2017-08-19 10:47:19 +00:00
Jenkins
3eb915b6e5 Merge "Wait for cleaning is completed after base smoke tests" 2017-08-19 04:25:20 +00:00
Jenkins
8d73a833b6 Merge "Do not restart n-cpu during upgrade" 2017-08-19 04:19:39 +00:00
Jenkins
38d571add7 Merge "Get rid of sourcing stackrc in grenade settings" 2017-08-18 22:46:03 +00:00
Vasyl Saienko
6128bce5d7 Do not restart n-cpu during upgrade
As we do not upgrade nova on multinode grenade, there is no need to
restart it. This way we avoid breaking n-cpu service, as new
dependencies are installed and they may not work with old code.

Change-Id: Id0c13704654d43a663458b9c099a1a0477c746a6
2017-08-18 14:43:08 +00:00
Vasyl Saienko
bf91a8fca4 Wait for cleaning is completed after base smoke tests
Nova do not wait for cleaning is completed when deleting instance
as result after destroy phase ironic may still perform cleaning.
This patch ensures all nodes are available again after base smoke tests
finished and hypervisor stats are updated.

We still need to wait for resources after destroy phase which will be
done in separate patch as changes to grenade workflow are needed.

Change-Id: Ib6c5a0543533893664cb3e895286d0e226e364d2
2017-08-18 14:41:25 +00:00
Dmitry Tantsur
d5d8bd2703 [devstack] use resource classes by default
Scheduling based on properties is disabled completely.
Properties are still populated for nodes, we need to figure out
an appropriate wait loop without them first.

Depends-On: I2fd1e4a95f000da19864e75299afa51527697101
Change-Id: I58601cb8301e23560ea666d4ea088ce51af37ee6
2017-08-18 14:39:45 +00:00
John L. Villalovos
68e600bb54 devstack: Remove unused variable IRONIC_VM_NETWORK_RANGE
IRONIC_VM_NETWORK_RANGE is not used anywhere in the code. A search
using:
 http://codesearch.openstack.org/?q=IRONIC_VM_NETWORK_RANGE&i=nope&files=&repos=

Only found this one instance we are deleting.

Change-Id: Idad9bba8b5466bf2fed4a17772f43847475a6f02
2017-08-17 15:48:04 -07:00
Vladyslav Drok
c4b39e7b09 Get rid of sourcing stackrc in grenade settings
Instead, use the common_settings file to source all the variables
we need at the early stages of devstack setup and during the upgrade
itself. This also fixes an issue with the networking-generic-switch
upgrade script, which is run from the old release instead of the new
one.

It depends on a patch from an older release, as grenade is setup
using settings from an older release, we need common_setting to be
populated there.

Change-Id: I0d6d3e9e60785bb9b6a10c8c7a07867a5b2a5e6e
Depends-On: I34fb68c150b753824bd2687a1f522ac87771a5e3
2017-08-17 15:54:10 +00:00
Vladyslav Drok
72395ad46f Remove ensure_logs_exist check during upgrade
We now run services under systemd, and this check is not necessary in
this case. Follow-up to commit ee538d1e7c1a92cb8412713e03cdfbcdacad7fab
to grenade.

Change-Id: I84ca621f0200838c04e267101848dc7ca16a5cfe
2017-08-16 10:51:27 +00:00
Jenkins
8d65f2e37a Merge "Update the documentation links - code comments" 2017-08-15 14:48:41 +00:00
Pavlo Shchelokovskyy
20baf6913e Update the documentation links - code comments
This patch updates the old links existing in ironic code as comments.

Change-Id: I75f68b042448cc01d55fdcfec86b42ecacd8fdd3
Co-Authored-By: Chason Chan <chen.xing@99cloud.net>
2017-08-15 09:48:13 +03:00
Jenkins
2a7f939663 Merge "Remove setting custom http_timeout in grenade" 2017-08-14 08:19:29 +00:00
Vladyslav Drok
c4d9159463 Remove setting custom http_timeout in grenade
The fix to the bug this was trying to work around has merged to
neutron.

Change-Id: Ib89a9a61f84923db6463e97d5fd8f9580173b3df
2017-08-11 19:52:00 +03:00
Dmitry Tantsur
1e6bf0f5c0 [devstack] switch to the latest API version and OSC commands
* Use only OSC commands instead of a mix of both CLI
* Switch to "latest" API version, as we're anyway going to use it by default
* Always set resource_class to something, as it's required since Pike

As a side effect, it enabled cleaning before nodes become available.

Change-Id: I36bf8d8204b0287a862a354760071ab3bdafbabc
2017-08-11 13:03:20 +02:00
Jenkins
c08c21e308 Merge "Trigger interface attach tests" 2017-08-05 01:24:32 +00:00
Jenkins
beb14094d4 Merge "Remove SSH-based driver interfaces and drivers" 2017-08-04 02:20:49 +00:00
Jenkins
5f0187d57e Merge "Avoid double ".img" postfix of image file path in devstack installation" 2017-08-03 13:55:44 +00:00
Jenkins
4162e2f188 Merge "[devstack] add support for running behind tls-proxy" 2017-08-03 07:43:19 +00:00