Adds max retry limit to sync_power_state task

* sync_power_state periodic task tries to set node's actual power state.
  In case of failure to sync power state, Ironic will keep trying to
  sync power state, Hence introduce a max retry per node
  sync power state limit
* Set Node's DB power state as the actual Node power state if max retries
  exceeded
* Set the Node's last_error msg after max retries exceed and set the
  node in maintainence mode

Change-Id: Idbd3afab746f81b9097e97afb1d12a81686a4564
Closes-Bug: #1285806
Speed up ironic tests

This change speeds up ironic tests by 60% by:
* Mocking eventlet.greenthread.sleep in a handful of tests
* Changing a time.sleep(2) to time.sleep(0.2) in a test where
  time.sleep is used intentionally for testing

Change-Id: I0cd2ae06549844ec3b76e7c91e1f49665ebc9717
Fix missed exception raise in _add_driver_fields

There was a bug where the NovaException was not being raised in
the IronicDriver._add_driver_fields() method if the client update
call failed after the maximum number of retries.

Change-Id: Ic082079f35892cc2bf3fcad46cd33cebd1105608
Imported Translations from Transifex

Change-Id: If69eb05fc679aa1466bd185d5308338e6673415c
Remove logging of exceptions from controller's methods

WSME does exceptions logging in wsmeext.pecan via format_exception()
function. Logging exceptions in Ironic controllers code causes
duplicate messages in log.

Change-Id: Ie5a9856508127557714166d838f0e762e37a611d
Decrease running time of SeaMicro driver tests

Modify config options in SeaMicro driver unit tests for considerable
decrease running time.

Change-Id: I643e9ba6cf16e37a945b9017c59db96b80bb2270
Avoid API root controller dependency on v1 dir

This commit fixes the issue that pecan root controller
is dependent on files in v1 directory.

Change-Id: Id26db27b61094356ee02dbc7c5baa7e551a3cc5c
Partial-Bug: #1255954
Run ipmi power status less aggressively

Ironic runs IPMI 'power status' in a loop until the desired state is
reached. Running repeated IPMI commands in a tight loop (1 second sleep)
seems to occasionally cause 'insufficient resources' errors with some
hardware types.

In this commit we update the IPMI retry timer to use a
DynamicLoopingCall which can wait longer for each retry of the power
status command. We increase the wait time exponentially
between each call, until the total time would exceed the max retry time
on the next iteration.

This patch also removes the spurious initial 'power status' call which
preceeded the 'power on' or 'power off' call without any gap. Since
Ironic has a periodic task to sync the power state, it is safe to assume
that the hardware's current power state is already known and does not
need to be verified inside the set_power_state method.

As part of this change we also increase the default IPMI retry_timeout
config to 60 seconds.

Co-authored-by: Dan Prince <dprince@redhat.com>

Change-Id: Ie0e29239592bb64c7a10ecedae299df2c5053359
Closes-bug: #1291991
Update SeaMicro to use MixinVendorInterface

SeaMicro driver is now using the generic MixinVendorInterface
for the VendorPassthru driver interface

Change-Id: Iae8288d10fb9454a513a12b0c28add8b7504efd6
Merge "Fix missed exception raise in _add_driver_fields"
Merge "Decrease running time of SeaMicro driver tests"
Run periodic_task in a with a dynamic timer

In ironic.common.service, Ironic was running the periodic task loop
every periodic_interval (60s by default) seconds. This means that any
periodic task configured with an interval shorter than periodic_interval
was only getting run every periodic_interval seconds.

I reconfigured periodic tasks to run in a dynamic loop, where
now the periodic task loop will run every min(periodic_interval,
next_run) seconds.

Change-Id: I17a270ecbb5fd53149a89816f4be1c9a0c27b541
Closes-Bug: 1295874
Merge "Adds max retry limit to sync_power_state task"
Merge "Avoid API root controller dependency on v1 dir"
Merge "Update SeaMicro to use MixinVendorInterface"
Merge "Imported Translations from Transifex"
Merge "Run ipmi power status less aggressively"
Merge "Remove logging of exceptions from controller's methods"
Merge "Speed up ironic tests"
Merge "Run periodic_task in a with a dynamic timer"