77 Commits

Author SHA1 Message Date
Dmitry Tantsur
d6404d2f99 Rename discoverd -> inspector
As agreed on the summit I'm renaming the python modules
and doing some adjustments:
* This is a breaking change, so version is bumped to 2.0.0
* Used this chance to split conf options over proper sections
* RELEASES.rst is gone; it's too hard to keep it up-to-date;
  anyway git does better job at doing history
* Dropped deprecated option ports_for_inactive_interfaces
* Dropped old /v1/discover endpoint and associated client call
* No longer set on_discovery and newly_discovered in Node.extra
  (deprecated since 1.0.0, superseded by the get status API)
* Default firewall chain name is "ironic-inspector" and
  is configurable

Notes:
* Some links will be updated after real move.
* Stable branches will probably use the old name.
* Some usage of discovery word is left in context of
  "discovered data"
* DIB element will probably be deprecated, so leaving it
  alone for now.
* Some usages of word "discovery" in the README will be updated
  later to make this patch a bit smaller
* Ramdisk code will be moved to IPA, so not touching it too much

Change-Id: I59f1f5bfb1248ab69973dab845aa028df493054e
2015-05-29 09:06:56 +02:00
Dmitry Tantsur
43530a5330 README: More updates for Troubleshooting section
* mention DHCP logs and tcpdump
* clarify mention Red Hat systems
* small tweaks

Change-Id: I68713f278d0a132588edcf09d338e7c7d9891fb6
2015-04-10 15:29:55 +02:00
Dmitry Tantsur
d463c590bf Pre-release documentation update
* move out release notes to RELEASES.rst
* create troubleshooting guide
* document interaction with Ironic state machine
* document how discoverd creates/deletes ports
* mention Ironic inspection

Closes-Bug: #1439971
Closes-Bug: #1439276
Change-Id: I11cfcf215083385bbf02f160c858c6da19a91c0e
2015-04-08 11:30:46 +02:00
Dmitry Tantsur
69cf5306aa Add ability to save logs received from the ramdisk
Change-Id: I44abe5f41c83eafd5042434bf2556b8309f4a42a
Partial-Bug: #1439647
2015-04-03 17:07:28 +02:00
Dmitry Tantsur
d80c7d5ee5 Enable ramdisk_error plugin by default
Change-Id: I98eac405f289474c7bee6b9fe72f61240d1d7715
Partial-Bug: #1439647
2015-04-02 17:25:01 +02:00
Dmitry Tantsur
0d839308cf Proper errors handling for client
* Introduce a specific exception class (subclasses requests.HTTPError
  to be backward compatible)
* Fetch error message from response body
* i18nize existing errors

Change-Id: I71922895c3177720789c6933da79b8882bfa7127
Closes-Bug: #1428680
2015-03-27 15:33:29 +01:00
YuikoTakada
9ec4f0fbc8 Switch to oslo.config
This patch set adds support for generating config files
using oslo-config-generator.

Old invocation without --config-file is no longer supported.

Co-Authored-By: Dmitry Tantsur <dtantsur@redhat.com>
Change-Id: If640e6dc83c971a8f82f9b245a4496d298dfd042
Closes-Bug: #1398359
2015-03-24 15:57:14 +01:00
Dmitry Tantsur
b9e8e1e73f More generic option for tuning adding ports
New option 'add_ports' with values 'all', 'active', 'pxe'.
Deprecate old option 'ports_for_inactive_interfaces' and drop
introduced in this cycle option 'only_pxe_booting_port'.

Change-Id: I40155fa1c4a54945cdc83506e741fc9be506b9db
Partial-Bug: #1404279
2015-03-23 17:25:52 +01:00
Jenkins
18235ab8c1 Merge "Documentation update" 2015-03-23 15:31:27 +00:00
Mitsuhiro SHIGEMATSU
f92b42be30 Fix typos in ironic-discoverd
modified:   README.rst
	modified:   ironic_discoverd/introspect.py

Change-Id: I9951e4f3fcd2030cfac04904a16412b1d018858c
2015-03-22 02:06:06 +09:00
Dmitry Tantsur
358c113e7a Documentation update
* Split away HTTP API and make sure usage info is enough for users
* Drop release notes for unsupported 0.2
* Various link updates and small fixes
* Forward-port 1.0.1 release notes

Change-Id: Ifa2b306d4a6fff19abc1565dabe7f6609363dc08
2015-03-20 16:40:09 +01:00
Dmitry Tantsur
d5541bfe8f Enable overwrite_existing by default
Change-Id: Ia0c845a6dbfa4eea4977e152625880d0eb97f6ca
Closes-Bug: #1420281
2015-03-06 16:16:28 +01:00
Dmitry Tantsur
489979757d Add python-openstackclient plugin for ironic-discoverd
$ openstack baremetal introspection {start, status} UUID

Closes-Bug: #1410180
Closes-Bug: #1429148
Change-Id: Ie009a8430e9e7d7529ac1a492d31896c3405d3de
2015-03-06 15:34:40 +01:00
Dmitry Tantsur
e7e9e0b6f9 Properly implement authentication via keystonemiddleware
This requires introducing new option 'identity_uri'.

Change-Id: Ibed9cf163357c7b38f6e9a980900bcc1d9d12804
Closes-Bug: #1427125
2015-03-02 17:13:12 +01:00
Dmitry Tantsur
e724de4dc6 Documentation and strings update
Related to blueprint setup-ipmi-credentials-take2

Change-Id: Ib43c0bf4e4b1405a236781c6a7284620373936c1
2015-02-12 12:24:33 +01:00
Jenkins
d8dc0b911a Merge "Adding root_device_hint plugin" 2015-02-12 11:12:37 +00:00
Imre Farkas
4e8260aa8f Adding root_device_hint plugin
In some cases (eg. DRAC), the driver doesn't provide any information to
figure out the root device during RAID configuration. A workaround for
that is creating the RAID disks in 2 runs: one run for the root device
and another one for the rest. In between ironic-discoverd can be used to
examine the changes in the block devices.

This patch adds this capability as a plugin to gather the block device
serials, save it temporarly and expose the root device hint.

Change-Id: I71c42cb131a4e8f0b4fe4eb2f42ac7cde2bceea9
2015-02-12 12:01:08 +01:00
Dmitry Tantsur
1c1cad0a07 Client and doc update for setting IPMI credentials
Demo CLI is not updated, waiting for proper CLI to be implemented
first.

Change-Id: Ibbac0114310969c4dd5273a5abd6cdc678cc24bd
Implements: blueprint setup-ipmi-credentials-take2
2015-02-11 18:37:59 +01:00
Dmitry Tantsur
f656333d52 Functional test for boot interface detection
Also adds missing documentation.

Change-Id: I6eece4d022d929630be9b7612fdb860a07ee0c5e
Implements: blueprint better-boot-interface-detection
2015-02-09 16:55:19 +01:00
Jenkins
2fbe520ba8 Merge "Allow ramdisk to specify PXE boot interface" 2015-02-09 12:34:34 +00:00
Jenkins
5e44dee8b3 Merge "Refactor ValidateInterfaces plugin" 2015-02-09 12:15:09 +00:00
Dmitry Tantsur
8d6652200c Allow ramdisk to specify PXE boot interface
Defaults to creating a port only for interface we used for
PXE booting.

Change-Id: Ib020d10dfdbf6902780133390fc80f7522a8614b
Implements: blueprint better-boot-interface-detection
2015-02-06 18:16:28 +01:00
Dmitry Tantsur
2fac425ddb Refactor ValidateInterfaces plugin
* Drop support for ancient ramdisks not passing 'interfaces'
* Store all_interfaces into node_info
* Raise if no interfaces are provided
* Raise if no interfaces found after processing

Implements: blueprint better-boot-interface-detection
Change-Id: Ic3f3ed73f774cfc7545d3b397a609fe8add7d4ec
2015-02-05 15:45:45 +01:00
Frederic Lepied
22a0e24efb Add eDeploy plugin
It receives eDeploy's hardware discovery to classify hardware
according to hardware profiles and extracts the needed information for
the configuration of the node.

Change-Id: I11b4cf21ec81ce8efd3222597a5226fe260721e2
Implements: blueprint edeploy
2015-02-03 12:02:11 +01:00
Dmitry Tantsur
07b2f8e415 Start 1.1 development
Change-Id: Ica2e05bb5172249a293ea56e1a440ff26f144f6c
2015-02-03 11:55:23 +01:00
Dmitry Tantsur
b7d8913c03 Finalize name + small readme fixes
Change-Id: If5bdcebc96b16283466cc5c32d88e5eea1b189bd
2015-02-03 10:25:05 +01:00
Dmitry Tantsur
f1d54408d9 Last-minute release notes update for 1.0.0
Change-Id: Idf830a084ed19f42be9f97d4064e91b0f8080e0e
2015-02-03 09:43:01 +01:00
Dmitry Tantsur
3ea013c5f3 Fix discovery image installation notes
Prebuilt images that are on the internet no longer work,
do not mention them. Rather provide instruction on building images.

Some more fixes to the installation notes.

Change-Id: I7c66be780a12f1c327f0e7ef5558db2eb8e3e622
2015-01-21 17:11:10 +01:00
Dmitry Tantsur
f10affd7a9 Update README for 1.0.0 release
Change-Id: I6d2de31072e5fa46f6b78d6eac529e8b9efddc7c
2015-01-20 11:10:29 +01:00
John Trowbridge
74ea75ba0e Allows passing of config file via --config-file option.
Maintains backwards compatibility with the old style invocation,
by adding a config_shim method. Logs a warning if the old style
invocation is used.

Change-Id: I11666a2fff0e9bdc6b26cb46505dcb03fa06fa50
Closes-Bug: #1411194
2015-01-19 08:54:35 -05:00
Dmitry Tantsur
f39c8a29aa Add introspect client call and switch functest to it
Also make README reflect the current reality, as it wasn't updated
in the previous (already merged) patch.

Change-Id: I32a95a7f428f08fec564c3e3bc2b6413bd38bf3a
Implements: blueprint v1-api-reform
2015-01-13 12:19:08 +01:00
Dmitry Tantsur
abc9541c4d Support new Kilo state machine
Implements: blueprint kilo-state-machine
Change-Id: I8f35b523a9cf2613f98e79816bbcb43611d04893
2015-01-12 13:30:39 +01:00
Dmitry Tantsur
3f903a7b1e Implement get status endpoint
* New endpoint /v1/introspection/<uuid>
* Backed by new function node_cache.get_node
* New client function get_status
* Functional test

Change-Id: Ib072b2ff711e7df232a793bf5e17c7880e97b92d
Implements: blueprint get-status-api
2015-01-09 13:35:39 +01:00
Dmitry Tantsur
3e67296d41 Disable setting IPMI credentials by default
It's unlikely we're going to have proper testing for this feature
in 1.0.0 timeline, so let us not enable it by default.

Also updated release notes and example.conf to explicitly state
experimental nature of this feature.

Change-Id: Ie40fb585c11083c4d8943fd6edc9f5c999206c47
Implements: blueprint setup-ipmi-credentials
2015-01-08 14:12:16 +01:00
Dmitry Tantsur
b340f08960 Make database a required configuration option
The more we rely on this database, the less sane is to use
temporary file as the default.

Change-Id: I8e04d76c6310c1db3576e0dc37d38a8b3af8c4b8
Closes-Bug: #1407602
2015-01-06 15:18:26 +01:00
Dmitry Tantsur
cb09de9500 Make firewall management optional
Adds configuration option "manage_firewall" that allows disabling
firewall management completely. Handy for testing and for future
IPA integration work.

Change-Id: I8db1d5528650e24336ad87976459c57c753486a7
Closes-Bug: #1400475
2014-12-19 14:14:28 +01:00
Dmitry Tantsur
feaf7f5a33 Update README and stop posting full changelogs
Git already does quite a good job of keeping a changelog, only
create high-level release notes from now on.

(cherry picked from commit 7a7c62511cc33bb1af87cb10aad73a08910d071b)
Also created release notes for 1.0.

Change-Id: I2ef30a4786d83d5a35788e6f2ad3532ef1aa3da0
2014-12-16 14:14:22 +01:00
Dmitry Tantsur
43b0769703 Support updating IPMI credentials from within ramdisk
If ipmi_setup_credentials is set to true in Node.extra, return
desired credentials back to the ramdisk and wait for power management
interface to pass validation.

Unfortunately, due to newly revealed problems, this is reverting
a big part of blueprint returning-to-ramdisk.

Change-Id: I63976d01f265d18c385f6a30f1f2884c58ca5a43
Implements: blueprint setup-ipmi-credentials
2014-12-10 20:33:09 +01:00
Jenkins
472537d213 Merge "Return serialized node to the ramdisk" 2014-12-05 16:17:20 +00:00
Dmitry Tantsur
770ee28ffa Cherry-pick changelog from 0.2.5
Change-Id: Ibbafbd4ac9df85894f0a71bbcf9baee02835e282
2014-12-05 14:55:53 +01:00
Dmitry Tantsur
f43fecf394 Return serialized node to the ramdisk
Implements: blueprint returning-to-ramdisk
Change-Id: I5536b2697416569aa3f7a5b969cfc5ef539db602
2014-12-04 14:49:24 +01:00
Dmitry Tantsur
9b1a164cfa Add option power_off_after_discovery
Option controls whether to shut down node after the discovery.

Change-Id: I447a640a963eafac820c94db3dcd005268ae6bef
Implements: blueprint returning-to-ramdisk
2014-12-04 14:49:24 +01:00
Dmitry Tantsur
1d7b86f1f0 Make /v1/continue synchronous and return real errors
Change-Id: Idfe84eaa9bf24937d24126926b569c6004d847e9
Implements: blueprint returning-to-ramdisk
2014-12-02 11:30:08 +01:00
Dmitry Tantsur
5d51e82c50 Implement timeout for discovery
Unfortunately, we can't really notify that we timed out, because
we can't set Ironic internal fields like 'last_error'. So we rely
on Ironic to do it's own timeout.

Change-Id: I5901f8e80b59d53975b6b265fba61e965884bb31
Closes-Bug: #1391871
2014-12-02 11:29:35 +01:00
Dmitry Tantsur
dafa4d0013 Support hooks for processing data
Change-Id: I5ae1623664549663570f036fa4ae3661b19f1b89
Implements: blueprint plugin-architecture
2014-12-01 13:36:42 +01:00
Dmitry Tantsur
cb32def5c5 Keep cache of nodes under discovery in the local database
Introduces SQLite database to keep a cache of nodes for discovery.
Move node lookup code into a new module `node_cache`.

This will greatly improve performance by doing less network requests
and will allow both implementing timeouts and getting rid of using
maintenance mode.

Change-Id: I543cb32d9d04f55bcf4573e9e0d341317cae4df6
Partial-Bug: #1391868
Partial-Bug: #1391871
2014-11-26 11:56:00 +01:00
Dmitry Tantsur
baef340b28 Add CONTRIBUTING.rst
Change-Id: I813af096bc4ab6bcfd3f83018bbeebee2d5ff0ec
2014-11-20 14:05:39 +01:00
Dmitry Tantsur
086b118ecb Release 0.2.4 to fix MANIFEST
Change-Id: I35eea660a936e305acde44f43ed05b7cb824934b
2014-11-14 17:23:14 +01:00
Dmitry Tantsur
5a28c1790d Post-migration updates for stackforge and launchpad
Change-Id: Id35cfe2ed3fa6a48d41efb29c3dab9e78bc7d051
2014-11-14 15:14:33 +01:00
Dmitry Tantsur
5f2228798c Updates prior to moving to stackforge 2014-11-12 14:10:21 +01:00