117 Commits

Author SHA1 Message Date
Dmitry Tantsur
e7c3218f71 Add manage_boot parameter to introspection API
Adds a new node field "manage_boot" to store this value. When it is set
to False, neither boot device nor power state are touched for this node.
Instead, we expect a 3rd party to handle them.

We still manage the PXE filter because the node may need DHCP.

Change-Id: Id3585bd32138a069dfcfc0ab04ee4f5f10f0a5ea
Story: #1528920
Task: #11338
2018-06-25 12:09:17 +02:00
Zuul
361fb091a5 Merge "Change the default discovery driver to fake-hardware" 2018-04-30 19:09:12 +00:00
Dmitry Tantsur
66f318b339 Change the default discovery driver to fake-hardware
The fake classic driver will be removed this release.

Depends-On: Ia0e95cbc1bb4dbd32793705b876ab8b474b753ad
Change-Id: I85f2a2a3ed1ca689c639c60e86853c821e808105
2018-04-30 14:36:34 +00:00
Zuul
70cb1ec7f5 Merge "Trivial: Update pypi url to new url" 2018-04-24 16:54:53 +00:00
melissaml
50a5aa1d2c Trivial: Update pypi url to new url
Pypi url changed from [1] to [2]

[1] https://pypi.python.org/pypi/<package>
[2] https://pypi.org/project/<package>

Change-Id: I116c1ad13c375db45e11444bb8592994bf8d0832
2018-04-24 09:57:43 +08:00
melissaml
03db5d8d31 Update auth_uri option to www_authenticate_uri
Option auth_uri from group keystone_authtoken is deprecated[1].
Use option www_authenticate_uri from group keystone_authtoken.

[1]https://review.openstack.org/#/c/508522/

Change-Id: Ie0d7c4268a49d3d3c6928b10987dd5eeede683d6
2018-04-21 04:21:53 +08:00
Dmitry Tantsur
faf9d3508b Switch documentation to hardware types
The devstack example configuration is synchronized with
https://docs.openstack.org/ironic/latest/contributor/dev-quickstart.html

Also remove setting IRONIC_VM_LOGS_DIR from the example local.conf,
as it does not work, at least not on CentOS.

Change-Id: Ife51165742a8b762e84d5ac7ad807480669bfedb
2018-03-16 17:11:05 +01:00
Jim Rollenhagen
5c54c0938e 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 build ironic.conf from scratch rather
than from the sample.

Change-Id: Id65a4f803832fefe467d59147c39d2dea604ed3c
2018-02-06 10:36:12 -08:00
KaiFeng Wang
72228aa218 Doc update: remove discoverd reference
The openstack-ironic-discoverd package is no longer maintained in Fedora,
this patch removes it from the document.

Change-Id: I51eee948c039c3be9f6438eb07bd6ac825036888
2018-01-08 09:03:39 +08:00
shangxiaobj
d0edef14f1 Replace http with https for doc links
Use https instead of http for docs links in ironic-inspector

Change-Id: Ibc6700af5114ef64d3fe9803a4433d19b1223456
2018-01-02 06:25:34 +00:00
Zuul
df3b8605ba Merge "Replace http with https for doc links in ironic-inspector" 2017-12-27 16:22:47 +00:00
shangxiaobj
9954f19a33 Replace http with https for doc links in ironic-inspector
1) Update doc links according to OpenStack document migration
2) Use https instead of http for docs links

Change-Id: Ic6ae704cc097e5f27d7f37e5a773f55f0c79a617
2017-12-23 01:22:23 +00:00
Zuul
8e1f3ede1c Merge "Terminal state transitions in transactions" 2017-12-22 19:04:46 +00:00
dparalen
7e72ceffd1 Terminal state transitions in transactions
Multiple spots were not using DB transactions when processing the terminal
state transitions (error, abort, finish, timeout). The pattern looked like
this:

    node_info.fsm_event(istate.Events.error)
    # more code
    node_info.finished(error='Oops!')

which led to brief periodes of state inconsistency of NodeInfo records in
the DB.

This patch refactors the NodeInfo.finished() method to require a terminal state
transition to perform as part of the NodeInfo state update:

   NodeInfo().finished(istate.Events.finish)
   NodeInfo().finished(istate.Events.abort, 'Canceled by operator')

This patch also introduces a new state: aborting to allow the inspector to
try call power-off the node before marking the introspection aborted.

There's a new DB migration since the new state implies a schema change too
(Enum).

Closes-Bug: #1721233
Closes-Bug: #1721230
Closes-Bug: #1723384

Change-Id: I0bb051d1956a996ed006d55a5ca2d670d9455047
2017-12-19 18:15:31 +01:00
dparalen
92c6b5fcf3 Dnsmasq filter docs follow-up
This is a follow-up patch to address documentation nits from the patch:
  I63fe91ee4f9ac3021bcfd9a4a378af56af800fac

Change-Id: If3e4ac1fcc3d3be1508086db122a11df71e7e3e6
2017-11-28 15:19:23 +01:00
dparalen
8ddfacdf34 Introducing a dnsmasq PXE filter driver
A PXE filter driver is introduced that works by configuring and controlling
the dnsmasq service.

Closes-Bug: 1693813
Related-Bug: 1665666
Change-Id: I63fe91ee4f9ac3021bcfd9a4a378af56af800fac
2017-11-22 15:08:23 +01:00
Ruby Loo
16148bf6c8 refer to 'openstack baremetal' CLI in docs
The 'ironic' CLI is going to be deprecated [1]; the 'openstack baremetal'
(OSC) CLI should be used instead. This changes the documentation to refer
to the OSC CLI.

[1] https://bugs.launchpad.net/python-ironicclient/+bug/1700815

Change-Id: I737ba38c6130e7ba123368b6081c4923d1423d98
2017-10-23 17:29:26 -04:00
Zuul
f02eda0315 Merge "Refactoring the firewall" 2017-10-19 21:40:25 +00:00
dparalen
7b27585463 Refactoring the firewall
Adopting the PXE filter interface/driver concept

Related-Bug: 1665666
Change-Id: If83db978080b9c4e5d51ba50bbe8ed26e29abe83
2017-10-19 16:38:15 +02:00
Pavlo Shchelokovskyy
198ef70c2b Add request context and policy enforcement
this patch introduces an oslo.policy-based API access policy
enforcement engine to ironic-inspector.
As part of implementation, a proper oslo.context-based request
context is also generated and assigned to each request.

Short overview of changes:

- added custom RequestContext class

  - extends oslo.context to handle of "is_public_api" flag
    (False by default)

- added context to request in each API route

  - '/continue' api sets the "is_public_api" flag to True

- added documented definitions for API access policies and their
  defaults
- added enforcement of these policies on API requests
- added oslo.policy-specific entry points to setup.cfg
- added autogenerated policy sample file with defaults
- added documentation with autogenerated policies

Change-Id: Iff6f98fa9950d78608f0a7c325d132c11a1383b3
Closes-Bug: #1719812
2017-10-13 11:55:52 +00:00
Bob Fournier
25929f3d04 Change example dnsmasq.conf in install doc for uefi
As described in https://bugs.launchpad.net/puppet-ironic/+bug/1714320,
a loop can occur in which dnsmasq always indicates ipxe.efi as the
bootfile if the client request has both UEFI and iPXE options set.
This fixes the documentation for the example dnsmasq.conf so that
loop won't occur.

In addition, some UEFI clients use architecture type 9 so that is
added to the example dnsmasq.conf.

Related-Bug: 1714320
Change-Id: Icdefba2b1be47622c9bd9c3bfb9b3413964c9dac
2017-09-01 10:36:42 -04:00
shangxiaobj
b1c0656041 i[Trivialfix]Fix typos in ironic-inspector
Fix the typos in ironic-inspector.

Change-Id: I20eabb78b6529b414e0b928eaa7ffe33221145f3
2017-08-31 19:04:53 -07:00
Jenkins
99e59eeaf6 Merge "Update the documentation link for doc migration" 2017-08-10 19:04:57 +00:00
Ilya Etingof
28da7b6745 Configuration documentation migrated
Documentation layout aligned with the OS standards.

The configuration page refactored, configuration options
documentation automatically generated by
oslo_config.sphinxext.

Closes-Bug: #1706175
Change-Id: I544d92d64833c0887b14509063334c39a0c428f1
2017-08-09 14:36:51 +02:00
chenxing
c28dd315bf Update the documentation link for doc migration
Change-Id: Ie3d175b4d910f49f8a54812926131448ff1ab4d5
2017-08-03 14:29:06 +00:00
leesea
112ab521ae Add selinux check in Troubleshooting PXE boot document
If node receiving DHCP address and failing to get kernel and/or
ramdisk, it maybe the selinux is enforcing.

We can let TFTP packet through selinux by setting:

setsebool -P tftp_home_dir 1

Change-Id: I574f8fdf819ea65dd9177c5ce9a78825ea4feec1
2017-07-26 08:32:00 +08:00
dparalen
c08fa16631 Docs migration conclusion
Change-Id: I3137d491822f5323d87ea4f988e7061ca1a215ba
Closes-Bug: 1702142
2017-07-24 17:30:50 +01:00
dparalen
c38ac86d53 Introducing the user content
Moving the user content down the mandatory directory path.

Change-Id: Icccf00cb22eab01c9ae7626f0997b9c362471e4d
Partial-Bug: 1702142
2017-07-24 17:29:40 +01:00
dparalen
93d6f69f70 Introducing the installation content
Moving the installation and upgrade guides down the mandatory directory
structure.  Had to change the upgrade headline level.

Partial-Bug: 1702142

Change-Id: If00d2e3d90ac89421c51d1b1530d7cc685fad78f
2017-07-24 15:28:57 +01:00
dparalen
cc7b98aa10 Introducing the contributor content
Moving the contributor "link" and API down the mandatory directory
structure.

Change-Id: I111cd55a06e40dc4db649728a5025354a85b3e1d
Partial-Bug: 1702142
2017-07-21 10:22:33 +02:00
dparalen
aa5ad2ec16 switch from oslosphinx to openstackdocstheme
Change-Id: I78740d50bcc79137bb7a4172c2695cc670a595ce
Partial-Bug: 1702142
2017-07-10 16:21:56 +02:00
Chris Krelle
f61a75aaa0 add disabled option to VALID_ADD_PORTS_VALUES
This allows inspector to create nodes without creating ports for the node.

Change-Id: Ife4c06d20e9217f0a308fef19177884596c6cf2d
Closes-Bug: #1693892
2017-06-23 10:09:45 -07:00
Jenkins
095b4e3d72 Merge "Completely remove support for setting IPMI credentials" 2017-05-31 15:04:49 +00:00
Dmitry Tantsur
e05257035c Completely remove support for setting IPMI credentials
This experimental feature was deprecated in the Ocata release,
as it was found unstable, untested and dangerous.

API version is bumped to 1.12 to indicate this change to users.

Change-Id: I1aad6ddfd03946edc19ae510accd6c8daf5fc268
Closes-Bug: #1654318
2017-05-26 14:29:13 +02:00
Jenkins
dacd376320 Merge "Bump pydot2 to pydot3" 2017-05-25 14:43:06 +00:00
Jenkins
65945d1086 Merge "Inspector rules API does not return all attributes" 2017-05-17 15:35:40 +00:00
dparalen
b1ce6f9ba3 Bump pydot2 to pydot3
pydot2 is incompatible with python3[1]. Bumping the pydot release (through
the test-requirements.txt) rather than pinning basepython to fix this.

Also updating the states.svg with the tox -egenstates result of running
pydot3

[1] https://github.com/erocarrera/pydot/issues/107

Change-Id: I9aa0e701af3915b39e1a5681c2105a6afb687dd2
Depends-On: I82e3651eefd3186c9e131b0db29a328967fb3161
2017-05-17 16:51:32 +02:00
dparalen
ade23652fb Allow timeout in active states
While reviewing the API--Worker split spec we discussed the issues
following from selecting oslo.messaging as the queue implementation.
Because of the at-most-once semantics of oslo.messaging it may well happen
that a task will end up hanging indefinitelly in an active state.

This change allows the node_cache.clean_up() function to pick-up these
"tasks" and "terminate" them by setting the error state.

Change-Id: I696f14d486f10d84aaae5675446138ebdd047ecd
Depends-On: Iaeb99ab1954a1d5303c9bd10b81f7f8d6aa7e731
2017-05-10 15:11:59 +02:00
Annie Lezil
33a28f34f8 Inspector rules API does not return all attributes
When using the Inspector rules API to query existing introspection
rules, inspector does not return 'invert' or 'multiple' attributes of
conditions associated with the rules.

Change-Id: I08606cea676ecf57bbb3b73077c4832240fbe0d2
Closes-Bug: #1670372
2017-05-05 20:01:53 +02:00
Jenkins
de5a3fe03b Merge "Add new transaction starting -> error on timeout" 2017-04-27 16:53:31 +00:00
Jenkins
75219a1758 Merge "Adds node state to the API response data" 2017-04-27 13:32:18 +00:00
Jenkins
c9d3191cf9 Merge "Allow hooks to have dependencies on other hooks" 2017-04-27 12:59:24 +00:00
Anton Arefiev
9f125629fe Add new transaction starting -> error on timeout
Exception along the `starting` inspection code may causes
`no defined transition` error as there is no transition for
`starting` state on timeout event.

Also it could happen if small timeout configured, so there
is not enough time for starting -> waiting transition,
e.g. new greenthread spawn is blocked due to missing of
available slots.

Closes-Bug: #1662494
Change-Id: I66cf0374a2ba4ab4692110daafd4a3d2d20d56d6
2017-04-27 13:57:43 +03:00
yaojun
fc2e029fa6 Adds node state to the API response data
This adds the node state when the GET /v1/introspection/<node uuid or
name> API is performed.

Change-Id: I81c6834933f789cb644a854313aacaf49a4856a7
Closes-Bug: #1665664
2017-04-27 16:35:47 +08:00
Dmitry Tantsur
10522e0963 Allow hooks to have dependencies on other hooks
Also refactored hooks and got rid of compatibility layer with old
stevedore.

Change-Id: I81f21df7ebad4df893539ec5f0a03064e7c0a263
Closes-Bug: #1681751
2017-04-26 19:13:52 +02:00
Dmitry Tantsur
782ee92c45 Set pxe_enabled on new and existing ports on introspection
Set it to True for the PXE-booting port, to False for all the others.
Create an extended functional tests covering various operations with ports.

Change-Id: I435a5c04884b6c4da70cb7260b305fbde23eebc0
Closes-Bug: #1667472
2017-04-18 10:20:49 +00:00
Bob Fournier
07c94392e2 Use processed lldp data, if available, for local_link_connection plugin
This change uses the processed lldp stored by the lldp_basic plugin
to populate the local_link_connection port_id and switch_id.

If processed lldp data cannot be found, the raw lldp data is processed by
this plugin as currently implemented.  This patch changes the
processing to use the construct lib as implemented in the common
definitions in lldp_tlvs.py to parse the LLDP TLVs.

A minor change is also made to pass node_info into warning log messages.

Change-Id: Iae3fa41736898df2c73350d8dc61ed24f2963e32
2017-04-10 14:34:22 -04:00
Tao Li
392ba0bc5f Update the url of ironic inspection documentation
The url is invalid for ironic inspection documentation, so change it
to a new valid url.

Change-Id: I53ca59094e78c3966e82e4960a143bbc86fb90f8
2017-03-30 08:52:54 +08:00
Jenkins
c74aff0387 Merge "Mention state machine diagram generation in contrib guide" 2017-03-24 14:13:46 +00:00
Jenkins
2a5b721170 Merge "Fix inconsistent service naming in install guide" 2017-03-23 14:50:15 +00:00