Opening stable/juno

Bump version to next stable release on juno branch, and set
defaultbranch in .gitreview for convenience.

Change-Id: I9312271d24982e1d251472aabaee92a62eb38970
NetApp fix for default host type in eseries

This fixes the issue where the default host type
provided in mapping should be high performing LnxALUA
type for eseries. It also makes it configurable in case
users want to configure a different host type.

Closes-Bug: #1365884

Change-Id: I30992ca69c25c3c02334470aae90c32731a5f3f4
(cherry picked from commit a120ede9ae3f18756db07d1d6696b9ac773b84bf)
VMware: Fix initialization of datastore selector

The WSDL URL of storage policy service is determined and a session is
created using it in do_setup(). This session is later used to initialize
the datastore selector property (ds_sel), which uses the session for all
storage policy related API calls.

After commit a8fa3ceb1e72bac2ab67f569a2ca009f995f59fd (Integrate
OSprofiler and Cinder), the properties defined in vmdk module are called
before do_setup(). As a result, the ds_sel (datastore selector) property
is initialized with a session instance containing a 'None' PBM (storage
policy service) WSDL URL. This results in failures of all storage policy
related APIs invoked using datastore selector. This patch fixes the
problem by re-initializing the property in do_setup().

Change-Id: Ibdf8b23f9e215000cf9053b81d374066fabd6851
Closes-Bug: #1380675
(cherry picked from commit 6ac6225e72bde92f66da8e92c563c140471b949b)
Truncate fail_reason to column length

During create_backup failure handling, backup_update fails with
DataError ("Data too long for column") if the fail_reason is
greater than 255 characters. As a result, backup status is stuck
in 'creating' state. This patch avoids the problem by truncating
fail_reason to 255 characters before update.

Closes-Bug: #1376199
Change-Id: If0d616b81d3869f7ea110caab8cf4140cf5c5c9e
(cherry picked from commit 82716b4ac836024b968c76db75be8a92ede0e226)
Cinder api service doesn't handle SIGHUP properly

When SIGHUP signal is sent to cinder-api service, it doesn't complete
processing of all pending requests before terminating all the
processes.

This change is a copy of Abhishek Kekane's fix for nova api.

Change-Id: I049d2aa2f3ad1fe388e00213a71f374803ed409a
Closes-Bug: #1334647
(cherry picked from commit 6c3ad4cf55c5f4cb610fb2625aed1286857b6c67)
Merge "NetApp fix for default host type in eseries" into stable/juno
Use look up service for auto zoning

The VMAX FC driver didn't use the look up service for auto zoning.
Instead it built initiator target map itself. However, that
requires the initiator to log into the fabric before zoning
in order to find out target WWNs.

This patch is to use the look up service to find out valid initiator
target WWNS and use that to build initiator target map. With this fix,
the initiator is no longer required to log into the fabric ahead of time.

Closes-Bug: #1379156
(cherry picked from commit 8707458a98bd1e4059939325659a7290757d972f)
Change-Id: I76e1a8a2e7d4230b851b763f7d13dd1489b69364
Eventlet green threads not released back to pool

Presently, the wsgi server allows persist connections hence even after
the response is sent to the client, it doesn't close the client socket
connection.
Because of this problem, the green thread is not released back to the pool.

In order to close the client socket connection explicitly after the
response is sent and read successfully by the client, you simply have to
set keepalive to False when you create a wsgi server.

DocImpact:
Added wsgi_keep_alive option (default=True).
In order to maintain the backward compatibility, setting wsgi_keep_alive
as True by default. Recommended is set it to False.

Conflicts:
        cinder/wsgi.py
        etc/cinder/cinder.conf.sample

SecurityImpact

Closes-Bug: #1361360
Change-Id: Ic57b2aceb136e8626388cfe4df72b2f47cb0661c
(cherry picked from commit fc87da7eeb3451e139ee71b31095d0b9093332ce)
Remove test_barbican from keymgr tests

Unfortunately it seems we have some very poorly
written keymgr unit tests, specifically
keymgr/test_barbican.py does this:
from barbicanclient.common import auth

First problem is that from a unit test perspective
that pretty much sucks, second problem is that
barbicanclient as of version 3.0.0.0 no longer
has an "auth" module, as a result Cinderunit tests
now fail.

The test_barbican.py unit tests need to be rewritten
to mock out the client components and actually test
Cinder components where needed without relying on
the barbicanclient.

For now in order to free up the gate, remove test_barbican.py

Change-Id: Id770c87c0d622ae4c1e0d71141ffa9aed29be2ec
Partial-Bug: #1389419
(cherry picked from commit 37e4a12652c803d60c18079b735d96e5c7890f07)
Fix Brocade FC SAN lookup MITM vulnerability

Modify the Brocade FC SAN lookup service implementation to use the
same SSH key config properties used elsewhere rather than relying on
arguments which are non-standard and never passed by the base lookup
service.

Change-Id: I0cb5141368bc9a62a4e0374026d66fc2725cfe24
Closes-Bug: 1391311
(cherry picked from commit ab4f57212683baec45d5b682bdd3952ff58249ed)
Update cinder.conf.sample to fix max db conn retries

Another external library change (oslo.db) has broken the gate
because cinder.conf.sample appears to be out of date.  The change
was just to a message string:

   Maximum number of database connection retries during
   startup. Set to -1 to specify an infinite retry count. (integer value)
   ->
   Maximum db connection retries during startup. Set to -1 to
   specify an infinite retry count. (integer value)

This patch updates cinder.conf.sample to get beyond this failure.  The
Cinder team will be talking about how to avoid these issues in the future.

Change-Id: Ia14954842d141b9bd208ce98c5a70a42b014ac45
(cherry picked from commit 969a27c56e8c69ba7420d98a0c123dce2ad16870)
Fix wrapper to work with barbicanclient 3.0.1

Due to the updates to the python-barbicanclient in version 3.0.1, the cinder
barbican wrapper no longer functions.  This patch updates the cinder barbican
wrapper and test cases to work with barbicanclient 3.0.1.

Change-Id: Ibef4abd5fd9b12962420eaa5d7ebf62700171861
Closes-Bug: #1388461
(cherry picked from commit 2d52d4177ca7cf41ee8162f07e444d9b75c377dd)
TgtAdm: Don't change CHAP username/password on live migration

As tgtd doesn't update CHAP username/password while the initiator is
connected, CHAP username/password must not be changed while a Nova
instance are performing live-migration; otherwise the compute node
which the instance migrates to cannot login to the volume and the
migration process is aborted.

This fixes TgtAdm implementation not to regenerate random
username/password every time initialize_connection is called.
Also, it enables CHAP auth in unit tests of TargetAdmin helpers.

Change-Id: I48729a33fada62a7c8e4fe500b1e39533d898701
Closes-Bug: #1383509
(cherry picked from commit c22038b9005070e51224f5057aac9f73cf4d0340)
Merge "Fix wrapper to work with barbicanclient 3.0.1" into stable/juno
Merge "TgtAdm: Don't change CHAP username/password on live migration" into stable/juno
Merge "Use look up service for auto zoning" into stable/juno
Change CHAP secret default length

Some of the iSCSI initiators have a limit regarding the maximum
CHAP secret length. For example, the MS iSCSI Initiator
does not allow CHAP secrets longer than 16 characters, smaller
than the actual default 20 characters length.

This patch simply changes the default length to 16 characters,
value which is already used by default by some of the volume
drivers. In fact, the iSCSI specs state that: "Implementations
MUST support use of up to 128 bit random CHAP secrets".

Change-Id: I0295fabd0c0048c93e1f452077d0f5d19af9784d
Closes-Bug: #1392792
(cherry picked from commit 3e124edb5dbbd5b48bb8816e6c1b60f5a0fa03db)
IBM Storwize driver: Add local variable assignment to "ctxt"

* The method get_vdisk_params in helpers.py is missing a local variable
assignment for "ctxt", causing "UnboundLocalError: local variable
'ctxt' referenced before assignment. Adding the assignment should
resolve this issue.

* Add the unit tests coverage for get_vdisk_params.

Change-Id: I564b1ef8cd1b6504d5ac8c9af0bb11bf29767d9a
closes-bug: #1379654
(cherry picked from commit afcbfe053c9165ab84af30c8e663dfaee2a79e81)
Merge "VMware: Fix initialization of datastore selector" into stable/juno
Merge "IBM Storwize driver: Add local variable assignment to "ctxt"" into stable/juno