54 Commits

Author SHA1 Message Date
ZhiQiang Fan
154a1bd18e use openstack cli instead of keystone cli
keystone cli is no longer supported, let's use openstack cli instead

Change-Id: Ia3f764fb9c829098fdb89f73259a9f3b1c3119a7
2016-04-19 16:09:22 +00:00
Pavlo Shchelokovskyy
3aebf1f3b0 Set config options for keystoneauth.
Change-Id: I671fbc666dcfc836b162addb9a77174ba279ba48
2016-03-25 13:08:22 +02:00
Jenkins
d41ca2beda Merge "[devstack] add support for using iPXE instead of plain PXE" 2016-03-17 11:25:18 +00:00
Jenkins
b14fc0f890 Merge "Add discover nodes exercise" 2016-03-16 11:07:06 +00:00
Anton Arefiev
bee7f3850f Add discover nodes exercise
Related-Bug: #1524753
Change-Id: Id6373e3a986c343b1e6786753034b19860612117
2016-03-14 15:11:50 +01:00
Dmitry Tantsur
be14aae263 [devstack] add support for using iPXE instead of plain PXE
Makes our devstack plugin respect the IRONIC_IPXE_ENABLED variable.

Partial-Bug: #1416371
Change-Id: I16c6454ba5e1339acfe302baa68e69b9a81f9a18
2016-03-10 13:11:07 +01:00
Dmitry Tantsur
2f8e105b4b Recommend using dhcp-sequential-ip in the dnsmasq configuration
Introspection naturally happens in large bulks, after which it's inactive.
Small pool for DHCP addresses means that we'll have conflicts due to how
dnsmasq distributes them by default - using hashing. This option tells dnsmasq
to allocate IP addresses sequentially instead to avoid these conflicts.
See https://bugzilla.redhat.com/show_bug.cgi?id=1301659 for detailed analysis.

The drawback of this option is that long-running clients may switch IP
addresses if their lease expires. This is not a concern for short introspection
process.

This change may obsolete the need in the delay between 2 introspections.

Change-Id: Id277f3d31902bee16d3b048dbde5c34af905f0bc
2016-03-07 13:21:42 +01:00
Dmitry Tantsur
59e0f92ae3 [devstack] Improve virtual machines logs
Change the default introspection ramdisk kernel cmdline:
* Set ipa-debug=1 to enable IPA debug logging
* Set "vga=normal console=tty0 console=ttyS0" to get some actual logs saved
  and visible through virsh.

Change-Id: Ib049d99a096ad626d3fcf8094f5e358d5b91ff92
Closes-Bug: #1549836
2016-03-01 15:15:43 +00:00
Dmitry Tantsur
d8de403851 Fix gate broken by sudden remove of SERVICE_TENANT_NAME variable
Change-Id: If90a810a5fb96bac2a581fd57e9bff0b9e7911f6
Depends-On: Icd03119788d17de221293bce4c0d628df42fdb9b
2016-02-23 11:13:55 +01:00
Jenkins
dd369ead89 Merge "[devstack] Use the coreos builder for the source build of the ramdisk" 2016-02-04 15:19:33 +00:00
Jenkins
b925717b06 Merge "Register the keystone service and endpoint in the devstack plugin" 2016-02-03 16:41:06 +00:00
Jenkins
ade97c9700 Merge "Enable Keystone v3 endpoints for Inspector" 2016-02-03 12:01:43 +00:00
Dmitry Tantsur
c926e1e36f [devstack] Use the coreos builder for the source build of the ramdisk
The source builder in DIB has been broken for a while now, and anyway
we have to use the CoreOS builder to create an IPA+inspector gate:
I5631866edee42d5358f692e4fbcd82f1a6a1d4db.

We can provide DIB as an option again as soon as it's fixed.

Change-Id: I9a53c3bedd4106a4b03647209ea2a49efa4b2a47
2016-02-03 12:47:23 +01:00
Sam Betts
40c17e30fc Enable Keystone v3 endpoints for Inspector
Change-Id: Iaa6d1b9dcca401987ac5f8ccc37e337736905b92
Closes-Bug: #1531236
2016-02-02 16:11:27 +00:00
Dmitry Tantsur
7ee29da29c Register the keystone service and endpoint in the devstack plugin
The name is "baremetal-introspection", the same as in puppet-ironic:
https://github.com/openstack/puppet-ironic/blob/master/manifests/keystone/auth_inspector.pp

Change-Id: Ib22c758f70cf6403e5d8b400af4df62caba9dece
Related-Bug: #1391865
2016-02-02 16:52:39 +01:00
Jenkins
45986b2dbe Merge "Use new introspection data save command in exercise.sh" 2016-02-02 11:01:29 +00:00
Dmitry Tantsur
6dd0de04f8 Use new introspection data save command in exercise.sh
Change-Id: I28158449526dc702e0381cce558cf63c8634b5b8
2016-01-28 08:09:58 +01:00
Dmitry Tantsur
7477959fe1 Set timeout in gate to 10 minutes
There is no reason for it to be the default 1 hour, as working introspection
ends within 2-3 minutes on the virtual environment.

Change-Id: I9b9b868f7c30e15c0f5131d53958db28d287ca7d
2016-01-27 14:08:45 +01:00
Jenkins
b7c61dee01 Merge "Check whether agent tarball exists" 2016-01-25 16:20:46 +00:00
Yuiko Takada
cdf22878d8 Check whether agent tarball exists
Currently, when execute devstack/stack.sh,
agent tarball is downloaded every time even if
it exists already.
This patch set
* checks whether kernel/ramdisk exists
and if there are, doesn't down load them.
* checks whether ironic agent kernel/ramdisk exists
and if there are, copy them.

Change-Id: Ic546ba8fc0cc14dc7cf13433e09db35a0854d115
Closes-Bug: #1533491
2016-01-21 16:47:52 +09:00
Dmitry Tantsur
f7329d7563 Revert "Block broken diskimage-builder versions to unblock the gate"
This should land as soon as DIB 1.7.2 hits the gate.

This reverts commit 357bbcbb1f471cbeca5e9d8ba6d9731591f1290b.

Change-Id: Id9560c67f2339eb6a812c5c28b428a68b4138a79
2016-01-19 13:08:14 +00:00
Dmitry Tantsur
357bbcbb1f Block broken diskimage-builder versions to unblock the gate
Revert as soon as DIB 1.7.2 is released.

Change-Id: I02d7ff2c1c126787a0d91ac0cfa70871ee8014c6
2016-01-19 12:04:50 +01:00
Dmitry Tantsur
0423d93736 Track node identification during the whole processing
Currently our logging in processing is very inconsistent:
some log strings mention node UUID, some - node BMC IP, some nothing.
This change introduces a common prefix for all processing logs
based on as much information as possible.
Only code that actually have some context about the node (either
NodeInfo or introspection data) is updated.

Also logging BMC addresses can be disabled now.

Updates example.conf (a lot of updated comments from oslo).

Change-Id: Ib20f2acdc60bfaceed7a33467557b92857c32798
2016-01-13 12:23:15 +01:00
Dmitry Tantsur
5a5f885e3e Enable ramdisk log collection in devstack plugin and improve logging
Add info logging to actually see the resulting file name, make other
logging improvement.

Also set ironic-inspector to always store logs.

Change-Id: I75fe35a9ce564b0fd23fbe6f5027e0b576195bcd
2015-12-14 14:24:49 +01:00
Dmitry Tantsur
0533f463fd Improve debug logging
* Update default log levels
* Make iptables logging more compact by removing newlines
* Enable debug logging in devstack plugin by default

Change-Id: I2af558078cb27edb5f162372d52c048f0e659079
2015-12-14 14:19:06 +01:00
Pavlo Shchelokovskyy
8c234e3965 Auto-fill keystone_authtoken config section
Use DevStack function for that. Also create a signing cache dir
for tokens and clean it on teardown of DevStack.

Change-Id: I4890f4a31883afdfd8d5eb00f2457a7c5c211f88
Closes-Bug: #1484014
2015-12-02 18:07:18 +00:00
Dmitry Tantsur
51f7cfbe8d Increase cleaning timeout for gate to 10 minutes
See for example this failed job:
http://logs.openstack.org/18/250418/2/check/gate-ironic-inspector-dsvm-ipa-nv/a1dc8d3/

Change-Id: I7b52f6754121c2cfcb60b20db1d733d511391efd
2015-11-27 13:50:14 +01:00
Jenkins
11dd9451ef Merge "Support IPA for devstack-plugin" 2015-11-05 18:01:51 +00:00
Yuiko Takada
29f29eab70 Support IPA for devstack-plugin
Change-Id: Idff4374aad1609ebfce8e9affe0b4692155012b6
2015-11-04 16:33:29 +09:00
Dmitry Tantsur
97426f22b0 Fix random gate breakages due to cleaning
After pxe_ssh got support for cleaning, it now takes substantial
time to get from manageable to available, we need to accound for it.

Also simplify debugging of gate issues:
* Show node info before failing due to provision state not reached
* Shorten retry timeout for enroll->manageable transition to 1 minute
* Report nova hypervisor-stats before failing

Closes-Bug: #1508001
Change-Id: Ic11bd20509b726b1ff2d3a7edd63479e9b79486e
2015-10-20 15:46:12 +02:00
Dmitry Tantsur
05b3a6ec6b Fix gate broken by the devstack trueorfalse change
Seems like we were using this function in a wrong way, now change
Icc0eb3808a2b6583828d8c47f0af4181e7e2c75a broke us.

Depends-On: I19bb8ada9a6f42d375838cc88a376715918c2a3e
Closes-Bug: #1506436
Change-Id: I6fd6d6ebc9a8057eb3ec90f989c709cbac86b572
2015-10-15 14:32:24 +02:00
Dmitry Tantsur
6631b8ffab Fix database schema for mysql and switch the gate to testing it
MySQL can't use TEXT fields for primary keys. This change switches all them
to VARCHAR(255). This change should not be breaking for SQLite, as it
does not distinguish between these two data types.

README is updated with up-to-date information about the connection option.

Change-Id: I0153855c1827b55067a7c04310bfad7eb71f35fe
Closes-Bug: #1501746
2015-10-01 15:53:35 +02:00
Jenkins
7039d96aaa Merge "devstack: allow nodes to be already MANAGEABLE in exercise" 2015-09-24 16:54:45 +00:00
Dmitry Tantsur
6a2bd8e387 devstack: allow nodes to be already MANAGEABLE in exercise
Previously exercise.sh would fail in this case. It does not matter
for the gate, but simplifies testing locally.

Change-Id: Ibfa519ae15b17d6c8ed915a01e9b56296bab1bab
2015-09-23 18:28:24 +02:00
Sam Betts
aa3b8ba777 Add alembic migrations for the inspector database
This patch adds a new command ironic-inspector-dbsync which can be used
to sync the ironic inspector database using alembic migrations. It adds
a migration to match the current required db schema.

Change-Id: I21188b3f5003c8ab43d82903473e2a6ef7f755a0
Closes-Bug: #1495620
2015-09-23 14:44:46 +01:00
Yuiko Takada
52ef561c9f Use rootwrap to execute iptables instead of requiring root
This patch set adds support for rootwrap in order to execute iptables.

Co-Authored-By: Dmitry Tantsur <dtantsur@redhat.com>
Change-Id: I7c424c17222f119730b8c5ac0daafd9906282e4d
Closes-bug: #1495844
2015-09-23 13:27:15 +02:00
Dmitry Tantsur
de2108de98 Switch to using CLI for introspection rules
Gate for liberty is using python-ironic-inspector-client 1.2.0.

Unused function curl_ins is not deleted, as it's likely to be used
the next time we introduce a new API.

Change-Id: I019023cb9add125a7c43b94c3a5a5b029f812c51
2015-09-20 19:00:49 +02:00
Dmitry Tantsur
8fc9f7ae20 Replace glance and keystone commands with OSC equivalents
Both have potential of breaking our gate (glance is very close to doing it).
Unfortunately, due to v2 vs v3 issue we can't use `openstack endpoint show`
now, so leaving a FIXME item.

Change-Id: Id3e59507409e5fd9d4c24d9796b8fa6249f73f0c
2015-09-17 11:16:43 +02:00
Dmitry Tantsur
eb9b3da67a Add introspection rules support
This patch introduces a simple JSON-based DSL to run on introspected
data. Conditions and actions are provided via new plugin entry points.

This patch is missing PUT operation on a rule, this can be added later.

Also not all planned conditions and actions are added in this patch,
will also follow up.

Implements: blueprint rules
Change-Id: If4d17b5f1462d03879cb4c2ff4e5cb3ea364b697
2015-09-14 14:56:09 +02:00
Dmitry Tantsur
4aedc4558f Enable colorized logging in devstack plugin
Change-Id: Idc8e25a4ee71e1876bceb83528ca335d35faff7a
2015-09-08 15:23:40 +02:00
John Trowbridge
6eb9f58c87 Store and expose introspection data
This adds the ability to store all of the data collected
during introspection. The configuration option
"[processing] store_data" (defaults to 'none'), determines
this behavior. Initially, only 'none' and 'swift' are
supported. If 'swift' is used, the data is stored in Swift
with the object name of "inspector_data-<UUID>".

Adds an endpoint /v1/introspection/<UUID>/data which
retrieves the data according to the method in
"[processing] store_data". Returns 404 if this option
is disabled.

There is a further option to store the location of the data
in the Ironic Node.extra column. For 'swift', this will be
the name of the swift object. The option,
"[processing] store_data_location" determines the key
name in the Node.extra column. (defaults to not storing
the location).

Change-Id: Ibc38064f7ea56f85b9f5a77ef6f62a50f0381ff4
Implements: blueprint store-introspection-data
2015-08-27 20:18:54 -04:00
Dmitry Tantsur
f15aee4a7f Insert artificial delay between sending virtual nodes on introspection
KVM PXE code seems broken in an interesting way, when you try to PXE
boot too many nodes. This change makes inspector sleep configurable
amount of time between powering on nodes with *_ssh driver.

Work around in devstack/exercise.sh is no longer needed and is dropped.

Note that this change is not HA, so we might revisit it in the future.

Change-Id: I9b16592f9b5130e90c02fce1b421887f451e397b
Closes-Bug: #1473024
2015-07-21 14:28:46 +02:00
Jenkins
5410e163c2 Merge "Migrate to oslo_db" 2015-07-08 12:58:45 +00:00
Yuiko Takada
e195b4780a Migrate to oslo_db
Currently, Ironic-inspector uses SQLite as database.
We should migrate to oslo.db.
In this patch, make database connect operations to oslo_db.

Change-Id: Ibd0f787b570bc101eab9fbd0b59d8a775a95e2e0
Implements: blueprint migrate-to-oslodb
2015-07-08 08:33:23 -04:00
Yuiko Takada
3f5fa160a0 Specify server id clearly on the gate test
When there are 2 nova nodes, devstack/exercise.sh loops forever.
This patch fixes this bug.

Change-Id: I0442e5b06c23ddf4771a9a404fc770965db503e4
Closes-Bug: #1472154
2015-07-08 09:11:03 +00:00
Dmitry Tantsur
816c3f6408 Try real nova boot in exercise.sh
This is to make sure we don't break neutron.

Change-Id: I473fed7bb4b987debad37f21a2a86551ffae7fe8
2015-07-03 13:05:32 +02:00
Dmitry Tantsur
f2ba59b53b Use real property values from nova flavor in exercise.sh
Change-Id: I3b5181f7416ca4daee7259eb0462f7d70829038d
2015-07-02 11:42:11 +02:00
Dmitry Tantsur
14454ad9d7 Fix and enhance devstack test script
* Put nodes in a proper provision state
* Use Ironic API instead of Inspector one for starting introspection
* Insert sleeps between sending nodes on introspection
* Add check on provision state
* Update devstack/plugin.sh to default to network not overlapping
  with devstack-gate default one

Closes-Bug: #1470346
Change-Id: Ib7c8fd32cca792c82030e2235166f05d6a40d747
2015-07-01 14:54:51 +02:00
Dmitry Tantsur
def1f3700c Make functional test importable and stop depending on DIB code
With integration tests on the radar we no longer need to do
integration checking between ramdisk code and inspector here.

Also copy integration test script from functest to devstack.
Once we update the gate to use the new script, the whole functest
directory should be deleted.

Change-Id: Ic29e954fac1c535cb4f83d46ccea9ebfb80f840c
Closes-Bug: #1468748
2015-06-30 07:57:06 +00:00
Dmitry Tantsur
a7788a7a9a Move client out of tree
New home is https://github.com/openstack/python-ironic-inspector-client

Change-Id: I9b252f7007f568bfd19906662d7fb8b2e53574f6
Closes-Bug: #1464707
2015-06-18 16:50:03 +02:00