Replace NvpPluginV2 with NsxPlugin

The king is dead, long live the king!

Partial-implements blueprint: nicira-plugin-renaming

Change-Id: I9b71479a8d4228d45a6591b169c489c0107fb04c
Set umask

Ensure we have a known-good umask.  Otherwise files such as
/etc/polkit-1/rules.d/50-libvirt-$STACK_USER.rules may not be readable
by non-root users afterwards.

Also reworded some comments to be more clear.

Change-Id: I7653d4eee062cf32df22aa158da6269b1aa9a558
Closes-Bug: #1265195
Fix comments about System Functions

This commit fixes comments about "System Functions".
 * Add a missing comment about System Functions in the header
 * Fix singular to plural like others

Change-Id: I3feb94cd11a6683ca80093574d60fdf7420e3af2
Implements fix to run lbaas service on fedora with devstack

changes 'user_group = nobody' in 'haproxy' section of lbaas_agent.ini

Change-Id: I801fec5a11d8abd97cb6f5cdff35fabb9eaf9000
Closes-Bug: 1283064
Add support for oslo.vmware

Change-Id: I2162a339b1869c27850afcda6be3c4e11de94e0e
Add GIT_TIMEOUT variable to watch git operations

During my CI testing of each devstack change I can often see git get
itself stuck and hang indefinitely.  I'm not sure if it's transient
network issues, or issues at the remote end (seen with both github.com
and git.openstack.org) but it hits fairly frequently.  Retrying the
command usually gets it going again.  Searching for "git hanging" and
similar shows its not entirely uncommon...

This adds a watchdog timeout for remote git operations based on a new
environment variable GIT_TIMEOUT.  It will retry 3 times before giving
up.  The wrapper is applied to the main remote git calls.

Change-Id: I5b0114ca26b7ac2f25993264f761cba9ec8c09e1
Move setup_develop() to common

It's in the wrong place for current Grenade

Change-Id: Ia670198332af5945a56d708cd83d9239df0c2287
Add variable to configure the run of IPv6 Tests

Related Tempest change:
  https://review.openstack.org/#/c/74933/

Closes-bug: 1282387

Change-Id: If9e9c5319c484dc4c00ed3bdcefc132410719b87
Make admin_bind_host configurable

The use case is running devstack inside an OpenStack vm and running tempest
from some other machine. To make the catalog export urls that can be accessed
from off the devstack machine, you need to set KEYSTONE_SERVICE_HOST to an
external IP. But devstack uses that address in its setup of keystone in
addition to exporting in the catalog. Because OpenStack has an issue where
a vm cannot access itself through its own floating ip, devstack fails. There
is no way to have this use case by providing an ip address. The workaround
is to use the hostname of the devstack machine. That worked until recently
when a change was made to set admin_bind_host to the value of
KEYSTONE_SERVICE_HOST. The result is that port 35357 is only opened locally.
This change allows the devstack user to restore the original behavior
allowing this use case.

Change-Id: I97b938b305b7dd878397e7e64462650064e59cd2
Closes-Bug: #1283803
Savanna: use heat infra engine if available

In Savanna we have two provisioning engines:

* "savanna" that directly work with nova/neutron/glance/cinder/etc and
   we'd like to deprecate it early in Juno release cycle, but it's still
   useful due to the fact that it could work ok w/o Heat;
* "heat" engine uses Heat for provisioning of cluster resources, it's
   currently under active development and we're ready to make it default
   for OpenStack installations with enabled Heat.

Change-Id: I937337b3921e9e51768a118fb4b6bd95962622bd
Add end-of-file checks to bash8

Add two end-of-file checks to bash8.  Firstly, alert if heredoc hasn't
finished.  Some heredocs were done like:

---
sudo bash -c "cat <<EOF > foo
...
EOF"
---

(A better way to do this is "cat <<EOF | sudo tee ..." as it retains
the usual heredoc layout in the code).

The trailing quote was throwing the matching in bash8 off and it kept
appending the next file as if it was still part of the heredoc.  To
avoid this, we check if we're still in a heredoc when we start a new
file; if so raise an error and reset the heredoc status fresh.  We
track the state of the previous file, line and lineno so we can give a
good error.

---
E012: heredoc did not end before EOF: 'cat <<EOF'
 - lib/trove: L221
---

This includes fixes for the existing problem heredocs.

A similar EOF check is to ensure the previous file ended with a
newline.

---
E004: file did not end with a newline: '$MY_XTRACE'
 - lib/neutron_plugins/embrane: L40
---

This requires only one fix

Change-Id: I5e547d87b3921fc7ce6588c28f074e5c9f489c1f
Run yum repolist commands as root

Otherwise you get yum errors like [1] when you run stack.sh as !root.
The solution is to run yum commands as root so it can access the right
certs

[1] https://access.redhat.com/site/solutions/312413

Change-Id: I54b0df13508c50aba67e23da11953c536933917a
Move enablement of rhel6-optional repo earlier

Change 4f1fee6eae300a3384900df06ebc857e95854eb0 added the RHEL6
optional repo in fixup_stuff.sh, but it turns out that doesn't get run
until after the package prerequisites phase.  Move this into stack.sh
with the RDO repo setup.

Change-Id: Iae0df85fa94c6c1b6f497dd29fda90d03b903a41
Make python-guestfs NOPRIME & install for libvirt

The libguestfs dependency tree includes a number
of packages that we may not want or work everywhere, such as fuse.

Now python-(lib)guestfs will install from lib/nova_plugins/hypervisor-libvirt

Change-Id: I6c3a614010ee8d65813eec66a56680def622514c
Insecure check if keystone is up

If we start keystone with an SSL endpoint then the curl check to see if
it is running will fail because it cannot create a secure connection.
This check can be done insecurely as all we care about is that the
service has started.

Change-Id: I826753d4d46e9956f443110029346bc70282951a
Don't use --skip-redirect for cinder restart on rhel6

RHEL6 doesn't support this flag so the restart fails.  Not exactly
sure why it is required, seems unchagned from the initial
commit 67787e6b4c6f31388cbee6d83b67371b31c443d4

(found running stack.sh with -e per [1])

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

Change-Id: Ib34c3663409d7b96b932286cb5a6974e940075d3
Merge "Move enablement of rhel6-optional repo earlier"
Fix heat role create error

https://review.openstack.org/#/c/76036/ changed the user creat commands,
missed the argument to --user

Change-Id: Iaf10ef80a2fb0227dd66a314e7ec253dfb4dc4fe
Unbuffer log output

* Force-flush log output so we don't lose log output in certain error cases.
* Slow down exit paths: add sleep to die(), wait until last moment to
  kill child processes (including the awk log output filter)

Change-Id: I1620fd33b89b237d9c2bb6206f3de2c81719f676
Merge "Add support for oslo.vmware"