Merge "Remove internal bash8"
diff --git a/HACKING.rst b/HACKING.rst
index d69bb49..3b86529 100644
--- a/HACKING.rst
+++ b/HACKING.rst
@@ -10,8 +10,8 @@
Shell script was chosen because it best illustrates the steps used to
set up and interact with OpenStack components.
-DevStack's official repository is located on GitHub at
-https://github.com/openstack-dev/devstack.git. Besides the master branch that
+DevStack's official repository is located on git.openstack.org at
+https://git.openstack.org/openstack-dev/devstack. Besides the master branch that
tracks the OpenStack trunk branches a separate branch is maintained for all
OpenStack releases starting with Diablo (stable/diablo).
diff --git a/MAINTAINERS.rst b/MAINTAINERS.rst
index d754c08..d55135d 100644
--- a/MAINTAINERS.rst
+++ b/MAINTAINERS.rst
@@ -48,7 +48,7 @@
OpenDaylight
~~~~~~~~~~~~
-* Kyle Mestery <kmestery@cisco.com>
+* Kyle Mestery <mestery@mestery.com>
OpenFlow Agent (ofagent)
~~~~~~~~~~~~~~~~~~~~~~~~
diff --git a/doc/source/assets/css/local.css b/doc/source/assets/css/local.css
index 5c703af..c8667c4 100644
--- a/doc/source/assets/css/local.css
+++ b/doc/source/assets/css/local.css
@@ -71,7 +71,7 @@
margin-bottom: 14px;
}
-li#github {
+li#git {
background-position: left -70px !important;
height: 61px;
padding: ;
@@ -119,4 +119,4 @@
.wat {
margin-top: 33px;
-}
\ No newline at end of file
+}
diff --git a/doc/source/assets/images/quickstart.png b/doc/source/assets/images/quickstart.png
index 5400a6f..735617b 100644
--- a/doc/source/assets/images/quickstart.png
+++ b/doc/source/assets/images/quickstart.png
Binary files differ
diff --git a/doc/source/changes.html b/doc/source/changes.html
index 966b0c9..028e1cf 100644
--- a/doc/source/changes.html
+++ b/doc/source/changes.html
@@ -34,7 +34,7 @@
<li><a href="overview.html">Overview</a></li>
<li><a href="changes.html">Changes</a></li>
<li><a href="faq.html">FAQ</a></li>
- <li><a href="http://github.com/openstack-dev/devstack">GitHub</a></li>
+ <li><a href="https://git.openstack.org/cgit/openstack-dev/devstack">git.openstack.org</a></li>
<li><a href="https://review.openstack.org/#/q/status:open+project:openstack-dev/devstack,n,z">Gerrit</a></li>
</ul>
</div>
diff --git a/doc/source/configuration.html b/doc/source/configuration.html
index 044bafc..88d7476 100644
--- a/doc/source/configuration.html
+++ b/doc/source/configuration.html
@@ -34,7 +34,7 @@
<li><a href="overview.html">Overview</a></li>
<li><a href="changes.html">Changes</a></li>
<li><a href="faq.html">FAQ</a></li>
- <li><a href="http://github.com/openstack-dev/devstack">GitHub</a></li>
+ <li><a href="https://git.openstack.org/cgit/openstack-dev/devstack">git.openstack.org</a></li>
<li><a href="https://review.openstack.org/#/q/status:open+project:openstack-dev/devstack,n,z">Gerrit</a></li>
</ul>
</div>
diff --git a/doc/source/contributing.html b/doc/source/contributing.html
index f3d4b5a..9826fc7 100644
--- a/doc/source/contributing.html
+++ b/doc/source/contributing.html
@@ -34,7 +34,7 @@
<li><a href="overview.html">Overview</a></li>
<li><a href="changes.html">Changes</a></li>
<li><a href="faq.html">FAQ</a></li>
- <li><a href="http://github.com/openstack-dev/devstack">GitHub</a></li>
+ <li><a href="https://git.openstack.org/cgit/openstack-dev/devstack">git.openstack.org</a></li>
<li><a href="https://review.openstack.org/#/q/status:open+project:openstack-dev/devstack,n,z">Gerrit</a></li>
</ul>
</div>
@@ -52,7 +52,7 @@
<h3>Things To Know</h3>
<br /><strong>Where Things Are</strong>
- <p>The official DevStack repository is located at <code>git://github.com/openstack-dev/devstack.git</code> and <code>git://git.openstack.org/openstack-dev/devstack.git</code>, both mirrors of the official repo maintained by Gerrit.</p>
+ <p>The official DevStack repository is located at <code>git://git.openstack.org/openstack-dev/devstack.git</code>, replicated from the repo maintained by Gerrit. GitHub also has a mirror at <code>git://github.com/openstack-dev/devstack.git</code>.</p>
<p>The <a href="https://blueprints.launchpad.net/devstack">blueprint</a> and <a href="https://bugs.launchpad.net/devstack">bug trackers</a> are on Launchpad. It should be noted that DevStack generally does not use these as strongly as other projects, but we're trying to change that.</p>
<p>The <a href="https://review.openstack.org/#/q/project:openstack-dev/devstack,n,z">Gerrit review queue</a> is, however, used for all commits except for the text of this website. That should also change in the near future.</p>
diff --git a/doc/source/eucarc.html b/doc/source/eucarc.html
index df52972..1dd8096 100644
--- a/doc/source/eucarc.html
+++ b/doc/source/eucarc.html
@@ -34,7 +34,7 @@
<li><a href="overview.html">Overview</a></li>
<li><a href="changes.html">Changes</a></li>
<li><a href="faq.html">FAQ</a></li>
- <li><a href="http://github.com/openstack-dev/devstack">GitHub</a></li>
+ <li><a href="https://git.openstack.org/cgit/openstack-dev/devstack">git.openstack.org</a></li>
<li><a href="https://review.openstack.org/#/q/status:open+project:openstack-dev/devstack,n,z">Gerrit</a></li>
</ul>
</div>
diff --git a/doc/source/exerciserc.html b/doc/source/exerciserc.html
index 7e4dd54..313b0a1 100644
--- a/doc/source/exerciserc.html
+++ b/doc/source/exerciserc.html
@@ -34,7 +34,7 @@
<li><a href="overview.html">Overview</a></li>
<li><a href="changes.html">Changes</a></li>
<li><a href="faq.html">FAQ</a></li>
- <li><a href="http://github.com/openstack-dev/devstack">GitHub</a></li>
+ <li><a href="https://git.openstack.org/cgit/openstack-dev/devstack">git.openstack.org</a></li>
<li><a href="https://review.openstack.org/#/q/status:open+project:openstack-dev/devstack,n,z">Gerrit</a></li>
</ul>
</div>
diff --git a/doc/source/faq.html b/doc/source/faq.html
index 2c74a66..7cbb9d2 100644
--- a/doc/source/faq.html
+++ b/doc/source/faq.html
@@ -34,7 +34,7 @@
<li><a href="overview.html">Overview</a></li>
<li><a href="changes.html">Changes</a></li>
<li><a href="faq.html">FAQ</a></li>
- <li><a href="http://github.com/openstack-dev/devstack">GitHub</a></li>
+ <li><a href="https://git.openstack.org/cgit/openstack-dev/devstack">git.openstack.org</a></li>
<li><a href="https://review.openstack.org/#/q/status:open+project:openstack-dev/devstack,n,z">Gerrit</a></li>
</ul>
</div>
@@ -73,7 +73,7 @@
<dd>A: DevStack is optimized for documentation & developers. As some of us use <a href="https://github.com/dellcloudedge/crowbar">Crowbar</a> for production deployments, we hope developers documenting how they setup systems for new features supports projects like Crowbar.</dd>
<dt>Q: I'd like to help!</dt>
- <dd>A: That isn't a question, but please do! The source for DevStack is <a href="http://github.com/openstack-dev/devstack">github</a> and bug reports go to <a href="http://bugs.launchpad.net/devstack/">LaunchPad</a>. Contributions follow the usual process as described in the <a href="http://wiki.openstack.org/HowToContribute">OpenStack wiki</a> even though DevStack is not an official OpenStack project. This site is housed in the CloudBuilder's <a href="http://github.com/cloudbuilders/devstack">github</a> in the gh-pages branch.</dd>
+ <dd>A: That isn't a question, but please do! The source for DevStack is at <a href="https://git.openstack.org/cgit/openstack-dev/devstack">git.openstack.org</a> and bug reports go to <a href="http://bugs.launchpad.net/devstack/">LaunchPad</a>. Contributions follow the usual process as described in the <a href="http://wiki.openstack.org/HowToContribute">OpenStack wiki</a> even though DevStack is not an official OpenStack project. This site is housed in the CloudBuilder's <a href="http://github.com/cloudbuilders/devstack">github</a> in the gh-pages branch.</dd>
<dt>Q: Why not use packages?</dt>
<dd>A: Unlike packages, DevStack leaves your cloud ready to develop - checkouts of the code and services running in screen. However, many people are doing the hard work of packaging and recipes for production deployments. We hope this script serves as a way to communicate configuration changes between developers and packagers.</dd>
diff --git a/doc/source/guides/multinode-lab.html b/doc/source/guides/multinode-lab.html
index 62232ef..6a5f98c 100644
--- a/doc/source/guides/multinode-lab.html
+++ b/doc/source/guides/multinode-lab.html
@@ -34,7 +34,7 @@
<li><a href="../overview.html">Overview</a></li>
<li><a href="../changes.html">Changes</a></li>
<li><a href="../faq.html">FAQ</a></li>
- <li><a href="http://github.com/openstack-dev/devstack">GitHub</a></li>
+ <li><a href="https://git.openstack.org/cgit/openstack-dev/devstack">git.openstack.org</a></li>
<li><a href="https://review.openstack.org/#/q/status:open+project:openstack-dev/devstack,n,z">Gerrit</a></li>
</ul>
</div>
@@ -129,8 +129,8 @@
echo "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCyYjfgyPazTvGpd8OaAvtU2utL8W6gWC4JdRS1J95GhNNfQd657yO6s1AH5KYQWktcE6FO/xNUC2reEXSGC7ezy+sGO1kj9Limv5vrvNHvF1+wts0Cmyx61D2nQw35/Qz8BvpdJANL7VwP/cFI/p3yhvx2lsnjFE3hN8xRB2LtLUopUSVdBwACOVUmH2G+2BWMJDjVINd2DPqRIA4Zhy09KJ3O1Joabr0XpQL0yt/I9x8BVHdAx6l9U0tMg9dj5+tAjZvMAFfye3PJcYwwsfJoFxC8w/SLtqlFX7Ehw++8RtvomvuipLdmWCy+T9hIkl+gHYE4cS3OIqXH7f49jdJf jesse@spacey.local" > ~/.ssh/authorized_keys</pre>
<h3>Download DevStack</h3>
- <p>Grab the latest version of DevStack from github:</p>
- <pre>git clone https://github.com/openstack-dev/devstack.git
+ <p>Grab the latest version of DevStack:</p>
+ <pre>git clone https://git.openstack.org/openstack-dev/devstack
cd devstack</pre>
<p>Up to this point all of the steps apply to each node in the cluster. From here on
diff --git a/doc/source/guides/pxe-boot.html b/doc/source/guides/pxe-boot.html
index 4dc61a3..d52b25f 100644
--- a/doc/source/guides/pxe-boot.html
+++ b/doc/source/guides/pxe-boot.html
@@ -34,7 +34,7 @@
<li><a href="../overview.html">Overview</a></li>
<li><a href="../changes.html">Changes</a></li>
<li><a href="../faq.html">FAQ</a></li>
- <li><a href="http://github.com/openstack-dev/devstack">GitHub</a></li>
+ <li><a href="https://git.openstack.org/cgit/openstack-dev/devstack">git.openstack.org</a></li>
<li><a href="https://review.openstack.org/#/q/status:open+project:openstack-dev/devstack,n,z">Gerrit</a></li>
</ul>
</div>
diff --git a/doc/source/guides/ramdisk.html b/doc/source/guides/ramdisk.html
index eaef16e..23239e2 100644
--- a/doc/source/guides/ramdisk.html
+++ b/doc/source/guides/ramdisk.html
@@ -34,7 +34,7 @@
<li><a href="../overview.html">Overview</a></li>
<li><a href="../changes.html">Changes</a></li>
<li><a href="../faq.html">FAQ</a></li>
- <li><a href="http://github.com/openstack-dev/devstack">GitHub</a></li>
+ <li><a href="https://git.openstack.org/cgit/openstack-dev/devstack">git.openstack.org</a></li>
<li><a href="https://review.openstack.org/#/q/status:open+project:openstack-dev/devstack,n,z">Gerrit</a></li>
</ul>
</div>
@@ -74,7 +74,7 @@
<h3>Install DevStack</h3>
<p>Grab the latest version of DevStack via https:</p>
<pre>sudo apt-get install git -y
-git clone https://github.com/openstack-dev/devstack.git
+git clone https://git.openstack.org/openstack-dev/devstack
cd devstack</pre>
<h3>Prepare the Boot RAMdisk</h3>
diff --git a/doc/source/guides/single-machine.html b/doc/source/guides/single-machine.html
index 9471972..06cc981 100644
--- a/doc/source/guides/single-machine.html
+++ b/doc/source/guides/single-machine.html
@@ -34,7 +34,7 @@
<li><a href="../overview.html">Overview</a></li>
<li><a href="../changes.html">Changes</a></li>
<li><a href="../faq.html">FAQ</a></li>
- <li><a href="http://github.com/openstack-dev/devstack">GitHub</a></li>
+ <li><a href="https://git.openstack.org/cgit/openstack-dev/devstack">git.openstack.org</a></li>
<li><a href="https://review.openstack.org/#/q/status:open+project:openstack-dev/devstack,n,z">Gerrit</a></li>
</ul>
</div>
@@ -79,7 +79,7 @@
<h3>Download DevStack</h3>
<p>We'll grab the latest version of DevStack via https:</p>
<pre>sudo apt-get install git -y || yum install -y git
-git clone https://github.com/openstack-dev/devstack.git
+git clone https://git.openstack.org/openstack-dev/devstack
cd devstack</pre>
<h3>Run DevStack</h3>
diff --git a/doc/source/guides/single-vm.html b/doc/source/guides/single-vm.html
index 2f1990a..d189319 100644
--- a/doc/source/guides/single-vm.html
+++ b/doc/source/guides/single-vm.html
@@ -34,7 +34,7 @@
<li><a href="../overview.html">Overview</a></li>
<li><a href="../changes.html">Changes</a></li>
<li><a href="../faq.html">FAQ</a></li>
- <li><a href="http://github.com/openstack-dev/devstack">GitHub</a></li>
+ <li><a href="https://git.openstack.org/cgit/openstack-dev/devstack">git.openstack.org</a></li>
<li><a href="https://review.openstack.org/#/q/status:open+project:openstack-dev/devstack,n,z">Gerrit</a></li>
</ul>
</div>
@@ -96,7 +96,7 @@
DEBIAN_FRONTEND=noninteractive sudo apt-get install -qqy git || sudo yum install -qy git
sudo chown stack:stack /home/stack
cd /home/stack
- git clone https://github.com/openstack-dev/devstack.git
+ git clone https://git.openstack.org/openstack-dev/devstack
cd devstack
echo '[[local|localrc]]' > local.conf
echo ADMIN_PASSWORD=password >> local.conf
diff --git a/doc/source/guides/usb-boot.html b/doc/source/guides/usb-boot.html
index 75adc6f..2a05f89 100644
--- a/doc/source/guides/usb-boot.html
+++ b/doc/source/guides/usb-boot.html
@@ -34,7 +34,7 @@
<li><a href="../overview.html">Overview</a></li>
<li><a href="../changes.html">Changes</a></li>
<li><a href="../faq.html">FAQ</a></li>
- <li><a href="http://github.com/openstack-dev/devstack">GitHub</a></li>
+ <li><a href="https://git.openstack.org/cgit/openstack-dev/devstack">git.openstack.org</a></li>
<li><a href="https://review.openstack.org/#/q/status:open+project:openstack-dev/devstack,n,z">Gerrit</a></li>
</ul>
</div>
diff --git a/doc/source/index.html b/doc/source/index.html
index dada57d..5f1efd7 100644
--- a/doc/source/index.html
+++ b/doc/source/index.html
@@ -34,7 +34,7 @@
<li><a href="overview.html">Overview</a></li>
<li><a href="changes.html">Changes</a></li>
<li><a href="faq.html">FAQ</a></li>
- <li><a href="http://github.com/openstack-dev/devstack">GitHub</a></li>
+ <li><a href="https://git.openstack.org/cgit/openstack-dev/devstack">git.openstack.org</a></li>
<li><a href="https://review.openstack.org/#/q/status:open+project:openstack-dev/devstack,n,z">Gerrit</a></li>
</ul>
</div>
@@ -55,9 +55,9 @@
<div class="pull-left">
<ol id="getting_started">
<li id="ubuntu">Setup a fresh supported Linux installation.</li>
- <li id="github">
- Clone devstack from devstack.
- <pre>git clone https://github.com/openstack-dev/devstack.git</pre>
+ <li id="git">
+ Clone devstack from git.openstack.org.
+ <pre>git clone https://git.openstack.org/openstack-dev/devstack</pre>
</li>
<li id="install">
Deploy your OpenStack Cloud
@@ -84,7 +84,7 @@
</li>
<li>
<h3>Download DevStack</h3>
- <pre>git clone https://github.com/openstack-dev/devstack.git</pre>
+ <pre>git clone https://git.openstack.org/openstack-dev/devstack</pre>
<p>The <code>devstack</code> repo contains a script that installs OpenStack and templates for configuration files</p>
</li>
<li>
diff --git a/doc/source/local.conf.html b/doc/source/local.conf.html
index ed53adf..2635ac6 100644
--- a/doc/source/local.conf.html
+++ b/doc/source/local.conf.html
@@ -34,7 +34,7 @@
<li><a href="overview.html">Overview</a></li>
<li><a href="changes.html">Changes</a></li>
<li><a href="faq.html">FAQ</a></li>
- <li><a href="http://github.com/openstack-dev/devstack">GitHub</a></li>
+ <li><a href="https://git.openstack.org/cgit/openstack-dev/devstack">git.openstack.org</a></li>
<li><a href="https://review.openstack.org/#/q/status:open+project:openstack-dev/devstack,n,z">Gerrit</a></li>
</ul>
</div>
diff --git a/doc/source/localrc.html b/doc/source/localrc.html
index 0f669bd..40a2004 100644
--- a/doc/source/localrc.html
+++ b/doc/source/localrc.html
@@ -34,7 +34,7 @@
<li><a href="overview.html">Overview</a></li>
<li><a href="changes.html">Changes</a></li>
<li><a href="faq.html">FAQ</a></li>
- <li><a href="http://github.com/openstack-dev/devstack">GitHub</a></li>
+ <li><a href="https://git.openstack.org/cgit/openstack-dev/devstack">git.openstack.org</a></li>
<li><a href="https://review.openstack.org/#/q/status:open+project:openstack-dev/devstack,n,z">Gerrit</a></li>
</ul>
</div>
diff --git a/doc/source/openrc.html b/doc/source/openrc.html
index da6697f..94b253d 100644
--- a/doc/source/openrc.html
+++ b/doc/source/openrc.html
@@ -34,7 +34,7 @@
<li><a href="overview.html">Overview</a></li>
<li><a href="changes.html">Changes</a></li>
<li><a href="faq.html">FAQ</a></li>
- <li><a href="http://github.com/openstack-dev/devstack">GitHub</a></li>
+ <li><a href="https://git.openstack.org/cgit/openstack-dev/devstack">git.openstack.org</a></li>
<li><a href="https://review.openstack.org/#/q/status:open+project:openstack-dev/devstack,n,z">Gerrit</a></li>
</ul>
</div>
diff --git a/doc/source/overview.html b/doc/source/overview.html
index baee400..9cee052 100644
--- a/doc/source/overview.html
+++ b/doc/source/overview.html
@@ -34,7 +34,7 @@
<li><a href="overview.html">Overview</a></li>
<li><a href="changes.html">Changes</a></li>
<li><a href="faq.html">FAQ</a></li>
- <li><a href="http://github.com/openstack-dev/devstack">GitHub</a></li>
+ <li><a href="https://git.openstack.org/cgit/openstack-dev/devstack">git.openstack.org</a></li>
<li><a href="https://review.openstack.org/#/q/status:open+project:openstack-dev/devstack,n,z">Gerrit</a></li>
</ul>
</div>
diff --git a/doc/source/plugins.html b/doc/source/plugins.html
index 3327128..700a209 100644
--- a/doc/source/plugins.html
+++ b/doc/source/plugins.html
@@ -34,7 +34,7 @@
<li><a href="overview.html">Overview</a></li>
<li><a href="changes.html">Changes</a></li>
<li><a href="faq.html">FAQ</a></li>
- <li><a href="http://github.com/openstack-dev/devstack">GitHub</a></li>
+ <li><a href="https://git.openstack.org/cgit/openstack-dev/devstack">git.openstack.org</a></li>
<li><a href="https://review.openstack.org/#/q/status:open+project:openstack-dev/devstack,n,z">Gerrit</a></li>
</ul>
</div>
diff --git a/doc/source/stackrc.html b/doc/source/stackrc.html
index d83fbc1..2df9d38 100644
--- a/doc/source/stackrc.html
+++ b/doc/source/stackrc.html
@@ -34,7 +34,7 @@
<li><a href="overview.html">Overview</a></li>
<li><a href="changes.html">Changes</a></li>
<li><a href="faq.html">FAQ</a></li>
- <li><a href="http://github.com/openstack-dev/devstack">GitHub</a></li>
+ <li><a href="https://git.openstack.org/cgit/openstack-dev/devstack">git.openstack.org</a></li>
<li><a href="https://review.openstack.org/#/q/status:open+project:openstack-dev/devstack,n,z">Gerrit</a></li>
</ul>
</div>
diff --git a/files/apts/general b/files/apts/general
index c308c46..3fe7863 100644
--- a/files/apts/general
+++ b/files/apts/general
@@ -27,3 +27,4 @@
libyaml-dev
libffi-dev
libssl-dev # for pyOpenSSL
+gettext # used for compiling message catalogs
diff --git a/files/rpms/general b/files/rpms/general
index 7a35961..d4a9fcb 100644
--- a/files/rpms/general
+++ b/files/rpms/general
@@ -26,6 +26,7 @@
which
bc
libyaml-devel
+gettext # used for compiling message catalogs
# [1] : some of installed tools have unversioned dependencies on this,
# but others have versioned (<=0.7). So if a later version (0.7.1)
diff --git a/lib/ceilometer b/lib/ceilometer
index db0c457..9046b9d 100644
--- a/lib/ceilometer
+++ b/lib/ceilometer
@@ -155,6 +155,11 @@
iniset $CEILOMETER_CONF DEFAULT verbose True
iniset $CEILOMETER_CONF DEFAULT debug "$ENABLE_DEBUG_LOG_LEVEL"
+ if [[ -n "$CEILOMETER_COORDINATION_URL" ]]; then
+ iniset $CEILOMETER_CONF coordination backend_url $CEILOMETER_COORDINATION_URL
+ iniset $CEILOMETER_CONF compute workload_partitioning True
+ fi
+
# Install the policy file for the API server
cp $CEILOMETER_DIR/etc/ceilometer/policy.json $CEILOMETER_CONF_DIR
iniset $CEILOMETER_CONF DEFAULT policy_file $CEILOMETER_CONF_DIR/policy.json
@@ -242,6 +247,9 @@
git_clone $CEILOMETER_REPO $CEILOMETER_DIR $CEILOMETER_BRANCH
setup_develop $CEILOMETER_DIR
+ if echo $CEILOMETER_COORDINATION_URL | grep -q '^memcached:'; then
+ install_package memcached
+ fi
}
# install_ceilometerclient() - Collect source and prepare
diff --git a/lib/horizon b/lib/horizon
index 755be18..0213948 100644
--- a/lib/horizon
+++ b/lib/horizon
@@ -84,6 +84,14 @@
# configure_horizon() - Set config files, create data dirs, etc
function configure_horizon {
setup_develop $HORIZON_DIR
+
+ # Compile message catalogs.
+ # Horizon is installed as develop mode, so we can compile here.
+ # Message catalog compilation is handled by Django admin script,
+ # so compiling them after the installation avoids Django installation twice.
+ cd $HORIZON_DIR
+ ./run_tests.sh -N --compilemessages
+ cd -
}
# init_horizon() - Initialize databases, etc.
@@ -138,6 +146,13 @@
# install_django_openstack_auth() - Collect source and prepare
function install_django_openstack_auth {
git_clone $HORIZONAUTH_REPO $HORIZONAUTH_DIR $HORIZONAUTH_BRANCH
+
+ # Compile message catalogs before installation
+ _prepare_message_catalog_compilation
+ cd $HORIZONAUTH_DIR
+ python setup.py compile_catalog
+ cd -
+
setup_install $HORIZONAUTH_DIR
}
@@ -160,6 +175,13 @@
stop_apache_server
}
+# NOTE: It can be moved to common functions, but it is only used by compilation
+# of django_openstack_auth catalogs at the moment.
+function _prepare_message_catalog_compilation {
+ local babel_package=$(grep ^Babel $REQUIREMENTS_DIR/global-requirements.txt)
+ pip_install "$babel_package"
+}
+
# Restore xtrace
$XTRACE
diff --git a/lib/ironic b/lib/ironic
index 5f3ebcd..1541dcf 100644
--- a/lib/ironic
+++ b/lib/ironic
@@ -354,6 +354,15 @@
create_ironic_cache_dir
}
+# _ironic_bm_vm_names() - Generates list of names for baremetal VMs.
+function _ironic_bm_vm_names {
+ local idx
+ local num_vms=$(($IRONIC_VM_COUNT - 1))
+ for idx in $(seq 0 $num_vms); do
+ echo "baremetal${IRONIC_VM_NETWORK_BRIDGE}_${idx}"
+ done
+}
+
# start_ironic() - Start running processes, including screen
function start_ironic {
# Start Ironic API server, if enabled.
@@ -449,10 +458,13 @@
else
local log_arg=""
fi
- sudo su $STACK_USER -c "$IRONIC_SCRIPTS_DIR/create-nodes \
- $IRONIC_VM_SPECS_CPU $IRONIC_VM_SPECS_RAM $IRONIC_VM_SPECS_DISK \
- amd64 $IRONIC_VM_COUNT $IRONIC_VM_NETWORK_BRIDGE $IRONIC_VM_EMULATOR \
- $log_arg" >> $IRONIC_VM_MACS_CSV_FILE
+ local vm_name
+ for vm_name in $(_ironic_bm_vm_names); do
+ sudo su $STACK_USER -c "$IRONIC_SCRIPTS_DIR/create-node $vm_name \
+ $IRONIC_VM_SPECS_CPU $IRONIC_VM_SPECS_RAM $IRONIC_VM_SPECS_DISK \
+ amd64 $IRONIC_VM_NETWORK_BRIDGE $IRONIC_VM_EMULATOR \
+ $log_arg" >> $IRONIC_VM_MACS_CSV_FILE
+ done
create_ovs_taps
}
@@ -655,7 +667,12 @@
chmod 0600 $IRONIC_AUTHORIZED_KEYS_FILE
fi
sudo rm -rf $IRONIC_DATA_DIR $IRONIC_STATE_PATH
- sudo su $STACK_USER -c "$IRONIC_SCRIPTS_DIR/cleanup-nodes $IRONIC_VM_COUNT $IRONIC_VM_NETWORK_BRIDGE"
+
+ local vm_name
+ for vm_name in $(_ironic_bm_vm_names); do
+ sudo su $STACK_USER -c "$IRONIC_SCRIPTS_DIR/cleanup-node $vm_name $IRONIC_VM_NETWORK_BRIDGE"
+ done
+
sudo rm -rf /etc/xinetd.d/tftp /etc/init/tftpd-hpa.override
restart_service xinetd
sudo iptables -D INPUT -d $HOST_IP -p udp --dport 69 -j ACCEPT || true
diff --git a/lib/neutron b/lib/neutron
index 2253eda..ca9b16c 100644
--- a/lib/neutron
+++ b/lib/neutron
@@ -148,16 +148,31 @@
# If Q_USE_PROVIDERNET_FOR_PUBLIC=True, use a flat provider network
# for external interface of neutron l3-agent. In that case,
# PUBLIC_PHYSICAL_NETWORK specifies provider:physical_network value
-# used for the network. In case of openvswitch agent, you should
-# add the corresponding entry to your OVS_BRIDGE_MAPPINGS.
+# used for the network. In case of ofagent, you should add the
+# corresponding entry to your OFAGENT_PHYSICAL_INTERFACE_MAPPINGS.
+# For openvswitch agent, you should add the corresponding entry to
+# your OVS_BRIDGE_MAPPINGS.
#
-# eg.
+# eg. (ofagent)
+# Q_USE_PROVIDERNET_FOR_PUBLIC=True
+# Q_USE_PUBLIC_VETH=True
+# PUBLIC_PHYSICAL_NETWORK=public
+# OFAGENT_PHYSICAL_INTERFACE_MAPPINGS=public:veth-pub-int
+#
+# eg. (openvswitch agent)
# Q_USE_PROVIDERNET_FOR_PUBLIC=True
# PUBLIC_PHYSICAL_NETWORK=public
# OVS_BRIDGE_MAPPINGS=public:br-ex
Q_USE_PROVIDERNET_FOR_PUBLIC=${Q_USE_PROVIDERNET_FOR_PUBLIC:-False}
PUBLIC_PHYSICAL_NETWORK=${PUBLIC_PHYSICAL_NETWORK:-public}
+# If Q_USE_PUBLIC_VETH=True, create and use a veth pair instead of
+# PUBLIC_BRIDGE. This is intended to be used with
+# Q_USE_PROVIDERNET_FOR_PUBLIC=True.
+Q_USE_PUBLIC_VETH=${Q_USE_PUBLIC_VETH:-False}
+Q_PUBLIC_VETH_EX=${Q_PUBLIC_VETH_EX:-veth-pub-ex}
+Q_PUBLIC_VETH_INT=${Q_PUBLIC_VETH_INT:-veth-pub-int}
+
# The next two variables are configured by plugin
# e.g. _configure_neutron_l3_agent or lib/neutron_plugins/*
#
@@ -543,12 +558,20 @@
if is_service_enabled q-l3; then
# logic is specific to using the l3-agent for l3
if is_neutron_ovs_base_plugin && [[ "$Q_USE_NAMESPACE" = "True" ]]; then
- # Disable in-band as we are going to use local port
- # to communicate with VMs
- sudo ovs-vsctl set Bridge $PUBLIC_BRIDGE other_config:disable-in-band=true
+ local ext_gw_interface
+
+ if [[ "$Q_USE_PUBLIC_VETH" = "True" ]]; then
+ ext_gw_interface=$Q_PUBLIC_VETH_EX
+ else
+ # Disable in-band as we are going to use local port
+ # to communicate with VMs
+ sudo ovs-vsctl set Bridge $PUBLIC_BRIDGE \
+ other_config:disable-in-band=true
+ ext_gw_interface=$PUBLIC_BRIDGE
+ fi
CIDR_LEN=${FLOATING_RANGE#*/}
- sudo ip addr add $EXT_GW_IP/$CIDR_LEN dev $PUBLIC_BRIDGE
- sudo ip link set $PUBLIC_BRIDGE up
+ sudo ip addr add $EXT_GW_IP/$CIDR_LEN dev $ext_gw_interface
+ sudo ip link set $ext_gw_interface up
ROUTER_GW_IP=`neutron port-list -c fixed_ips -c device_owner | grep router_gateway | awk -F '"' '{ print $8; }'`
die_if_not_set $LINENO ROUTER_GW_IP "Failure retrieving ROUTER_GW_IP"
sudo route add -net $FIXED_RANGE gw $ROUTER_GW_IP
diff --git a/lib/neutron_plugins/cisco b/lib/neutron_plugins/cisco
index 1406e37..95e0ab3 100644
--- a/lib/neutron_plugins/cisco
+++ b/lib/neutron_plugins/cisco
@@ -82,6 +82,7 @@
}
function neutron_plugin_configure_debug_command {
+ :
}
function neutron_plugin_configure_dhcp_agent {
@@ -89,6 +90,7 @@
}
function neutron_plugin_configure_l3_agent {
+ :
}
# Configure n1kv plugin
@@ -111,6 +113,7 @@
}
function neutron_plugin_configure_plugin_agent {
+ :
}
function neutron_plugin_configure_service {
diff --git a/lib/neutron_plugins/ofagent_agent b/lib/neutron_plugins/ofagent_agent
index a5a58f4..1c04f2f 100644
--- a/lib/neutron_plugins/ofagent_agent
+++ b/lib/neutron_plugins/ofagent_agent
@@ -77,6 +77,10 @@
if [[ "$OVS_BRIDGE_MAPPINGS" != "" ]]; then
iniset /$Q_PLUGIN_CONF_FILE ovs bridge_mappings $OVS_BRIDGE_MAPPINGS
fi
+ if [[ "$OFAGENT_PHYSICAL_INTERFACE_MAPPINGS" != "" ]]; then
+ iniset /$Q_PLUGIN_CONF_FILE agent physical_interface_mappings \
+ $OFAGENT_PHYSICAL_INTERFACE_MAPPINGS
+ fi
AGENT_BINARY="$NEUTRON_BIN_DIR/neutron-ofagent-agent"
iniset /$Q_PLUGIN_CONF_FILE agent tunnel_types $Q_TUNNEL_TYPES
diff --git a/lib/neutron_plugins/ovs_base b/lib/neutron_plugins/ovs_base
index d913f7c..f0ef194 100644
--- a/lib/neutron_plugins/ovs_base
+++ b/lib/neutron_plugins/ovs_base
@@ -79,11 +79,20 @@
fi
neutron-ovs-cleanup
- # --no-wait causes a race condition if $PUBLIC_BRIDGE is not up when ip addr flush is called
- sudo ovs-vsctl -- --may-exist add-br $PUBLIC_BRIDGE
- sudo ovs-vsctl br-set-external-id $PUBLIC_BRIDGE bridge-id $PUBLIC_BRIDGE
- # ensure no IP is configured on the public bridge
- sudo ip addr flush dev $PUBLIC_BRIDGE
+ if [[ "$Q_USE_PUBLIC_VETH" = "True" ]]; then
+ ip link show $Q_PUBLIC_VETH_INT > /dev/null 2>&1 ||
+ sudo ip link add $Q_PUBLIC_VETH_INT type veth \
+ peer name $Q_PUBLIC_VETH_EX
+ sudo ip link set $Q_PUBLIC_VETH_INT up
+ sudo ip link set $Q_PUBLIC_VETH_EX up
+ sudo ip addr flush dev $Q_PUBLIC_VETH_EX
+ else
+ # --no-wait causes a race condition if $PUBLIC_BRIDGE is not up when ip addr flush is called
+ sudo ovs-vsctl -- --may-exist add-br $PUBLIC_BRIDGE
+ sudo ovs-vsctl br-set-external-id $PUBLIC_BRIDGE bridge-id $PUBLIC_BRIDGE
+ # ensure no IP is configured on the public bridge
+ sudo ip addr flush dev $PUBLIC_BRIDGE
+ fi
}
function _neutron_ovs_base_configure_nova_vif_driver {
diff --git a/lib/opendaylight b/lib/opendaylight
index cc29deb..374de95 100644
--- a/lib/opendaylight
+++ b/lib/opendaylight
@@ -48,10 +48,10 @@
ODL_DIR=$DEST/opendaylight
# The OpenDaylight Package, currently using 'Hydrogen' release
-ODL_PKG=${ODL_PKG:-distributions-virtualization-0.1.1-osgipackage.zip}
+ODL_PKG=${ODL_PKG:-distribution-karaf-0.2.0-Helium.zip}
# The OpenDaylight URL
-ODL_URL=${ODL_URL:-https://nexus.opendaylight.org/content/repositories/opendaylight.release/org/opendaylight/integration/distributions-virtualization/0.1.1}
+ODL_URL=${ODL_URL:-https://nexus.opendaylight.org/content/groups/public/org/opendaylight/integration/distribution-karaf/0.2.0-Helium}
# Default arguments for OpenDaylight. This is typically used to set
# Java memory options.
@@ -59,11 +59,14 @@
ODL_ARGS=${ODL_ARGS:-"-XX:MaxPermSize=384m"}
# How long to pause after ODL starts to let it complete booting
-ODL_BOOT_WAIT=${ODL_BOOT_WAIT:-60}
+ODL_BOOT_WAIT=${ODL_BOOT_WAIT:-20}
# The physical provider network to device mapping
ODL_PROVIDER_MAPPINGS=${ODL_PROVIDER_MAPPINGS:-physnet1:eth1}
+# Enable OpenDaylight l3 forwarding
+ODL_L3=${ODL_L3:-False}
+
# Entry Points
# ------------
@@ -83,11 +86,26 @@
# configure_opendaylight() - Set config files, create data dirs, etc
function configure_opendaylight {
- # Remove simple forwarder
- rm -f $ODL_DIR/opendaylight/plugins/org.opendaylight.controller.samples.simpleforwarding*
+ # Add odl-ovsdb-openstack if it's not already there
+ local ODLOVSDB=$(cat $ODL_DIR/distribution-karaf-0.2.0-Helium/etc/org.apache.karaf.features.cfg | grep featuresBoot= | grep odl)
+ if [ "$ODLOVSDB" == "" ]; then
+ sed -i '/^featuresBoot=/ s/$/,odl-ovsdb-openstack/' $ODL_DIR/distribution-karaf-0.2.0-Helium/etc/org.apache.karaf.features.cfg
+ fi
- # Configure OpenFlow 1.3
- echo "ovsdb.of.version=1.3" >> $ODL_DIR/opendaylight/configuration/config.ini
+ # Configure OpenFlow 1.3 if it's not there
+ local OFLOW13=$(cat $ODL_DIR/distribution-karaf-0.2.0-Helium/etc/custom.properties | grep ^of.version)
+ if [ "$OFLOW13" == "" ]; then
+ echo "ovsdb.of.version=1.3" >> $ODL_DIR/distribution-karaf-0.2.0-Helium/etc/custom.properties
+ fi
+
+ # Configure L3 if the user wants it
+ if [ "${ODL_L3}" == "True" ]; then
+ # Configure L3 FWD if it's not there
+ local L3FWD=$(cat $ODL_DIR/distribution-karaf-0.2.0-Helium/etc/custom.properties | grep ^ovsdb.l3.fwd.enabled)
+ if [ "$L3FWD" == "" ]; then
+ echo "ovsdb.l3.fwd.enabled=yes" >> $ODL_DIR/distribution-karaf-0.2.0-Helium/etc/custom.properties
+ fi
+ fi
}
function configure_ml2_odl {
@@ -138,9 +156,7 @@
# -of13: runs ODL using OpenFlow 1.3 protocol support.
# -virt ovsdb: Runs ODL in "virtualization" mode with OVSDB support
- # NOTE(chdent): Leaving this as screen_it instead of run_process until
- # the right thing for this service is determined.
- screen_it odl-server "cd $ODL_DIR/opendaylight && JAVA_HOME=$JHOME ./run.sh $ODL_ARGS -of13 -virt ovsdb"
+ run_process odl-server "cd $ODL_DIR/distribution-karaf-0.2.0-Helium && JAVA_HOME=$JHOME bin/karaf"
# Sleep a bit to let OpenDaylight finish starting up
sleep $ODL_BOOT_WAIT
diff --git a/lib/tempest b/lib/tempest
index d677c7e..3c37918 100644
--- a/lib/tempest
+++ b/lib/tempest
@@ -64,8 +64,10 @@
# Cinder/Volume variables
TEMPEST_VOLUME_DRIVER=${TEMPEST_VOLUME_DRIVER:-default}
-TEMPEST_VOLUME_VENDOR=${TEMPEST_VOLUME_VENDOR:-"Open Source"}
-TEMPEST_STORAGE_PROTOCOL=${TEMPEST_STORAGE_PROTOCOL:-iSCSI}
+TEMPEST_DEFAULT_VOLUME_VENDOR="Open Source"
+TEMPEST_VOLUME_VENDOR=${TEMPEST_VOLUME_VENDOR:-$TEMPEST_DEFAULT_VOLUME_VENDOR}
+TEMPEST_DEFAULT_STORAGE_PROTOCOL="iSCSI"
+TEMPEST_STORAGE_PROTOCOL=${TEMPEST_STORAGE_PROTOCOL:-$TEMPEST_DEFAULT_STORAGE_PROTOCOL}
# Neutron/Network variables
IPV6_ENABLED=$(trueorfalse True $IPV6_ENABLED)
@@ -369,8 +371,12 @@
iniset $TEMPEST_CONFIG volume backend2_name "LVM_iSCSI_2"
fi
- if [ $TEMPEST_VOLUME_DRIVER != "default" ]; then
+ if [ $TEMPEST_VOLUME_DRIVER != "default" -o \
+ $TEMPEST_VOLUME_VENDOR != $TEMPEST_DEFAULT_VOLUME_VENDOR ]; then
iniset $TEMPEST_CONFIG volume vendor_name "$TEMPEST_VOLUME_VENDOR"
+ fi
+ if [ $TEMPEST_VOLUME_DRIVER != "default" -o \
+ $TEMPEST_STORAGE_PROTOCOL != $TEMPEST_DEFAULT_STORAGE_PROTOCOL ]; then
iniset $TEMPEST_CONFIG volume storage_protocol $TEMPEST_STORAGE_PROTOCOL
fi
diff --git a/tools/ironic/scripts/cleanup-node b/tools/ironic/scripts/cleanup-node
new file mode 100755
index 0000000..c4e4e70
--- /dev/null
+++ b/tools/ironic/scripts/cleanup-node
@@ -0,0 +1,25 @@
+#!/usr/bin/env bash
+
+# **cleanup-nodes**
+
+# Cleans up baremetal poseur nodes and volumes created during ironic setup
+# Assumes calling user has proper libvirt group membership and access.
+
+set -exu
+
+LIBVIRT_STORAGE_POOL=${LIBVIRT_STORAGE_POOL:-"default"}
+LIBVIRT_CONNECT_URI=${LIBVIRT_CONNECT_URI:-"qemu:///system"}
+
+NAME=$1
+NETWORK_BRIDGE=$2
+
+export VIRSH_DEFAULT_CONNECT_URI=$LIBVIRT_CONNECT_URI
+
+VOL_NAME="$NAME.qcow2"
+virsh list | grep -q $NAME && virsh destroy $NAME
+virsh list --inactive | grep -q $NAME && virsh undefine $NAME
+
+if virsh pool-list | grep -q $LIBVIRT_STORAGE_POOL ; then
+ virsh vol-list $LIBVIRT_STORAGE_POOL | grep -q $VOL_NAME &&
+ virsh vol-delete $VOL_NAME --pool $LIBVIRT_STORAGE_POOL
+fi
diff --git a/tools/ironic/scripts/cleanup-nodes b/tools/ironic/scripts/cleanup-nodes
deleted file mode 100755
index adeca5c..0000000
--- a/tools/ironic/scripts/cleanup-nodes
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/usr/bin/env bash
-
-# **cleanup-nodes**
-
-# Cleans up baremetal poseur nodes and volumes created during ironic setup
-# Assumes calling user has proper libvirt group membership and access.
-
-set -exu
-
-LIBVIRT_STORAGE_POOL=${LIBVIRT_STORAGE_POOL:-"default"}
-LIBVIRT_CONNECT_URI=${LIBVIRT_CONNECT_URI:-"qemu:///system"}
-
-VM_COUNT=$1
-NETWORK_BRIDGE=$2
-
-export VIRSH_DEFAULT_CONNECT_URI=$LIBVIRT_CONNECT_URI
-
-for (( idx=0; idx<$VM_COUNT; idx++ )); do
- NAME="baremetal${NETWORK_BRIDGE}_${idx}"
- VOL_NAME="baremetal${NETWORK_BRIDGE}-${idx}.qcow2"
- virsh list | grep -q $NAME && virsh destroy $NAME
- virsh list --inactive | grep -q $NAME && virsh undefine $NAME
-
- if virsh pool-list | grep -q $LIBVIRT_STORAGE_POOL ; then
- virsh vol-list $LIBVIRT_STORAGE_POOL | grep -q $VOL_NAME &&
- virsh vol-delete $VOL_NAME --pool $LIBVIRT_STORAGE_POOL
- fi
-done
diff --git a/tools/ironic/scripts/create-node b/tools/ironic/scripts/create-node
new file mode 100755
index 0000000..25b53d4
--- /dev/null
+++ b/tools/ironic/scripts/create-node
@@ -0,0 +1,79 @@
+#!/usr/bin/env bash
+
+# **create-nodes**
+
+# Creates baremetal poseur nodes for ironic testing purposes
+
+set -ex
+
+# Keep track of the devstack directory
+TOP_DIR=$(cd $(dirname "$0")/.. && pwd)
+
+NAME=$1
+CPU=$2
+MEM=$(( 1024 * $3 ))
+# extra G to allow fuzz for partition table : flavor size and registered size
+# need to be different to actual size.
+DISK=$(( $4 + 1))
+
+case $5 in
+ i386) ARCH='i686' ;;
+ amd64) ARCH='x86_64' ;;
+ *) echo "Unsupported arch $4!" ; exit 1 ;;
+esac
+
+BRIDGE=$6
+EMULATOR=$7
+LOGDIR=$8
+
+LIBVIRT_NIC_DRIVER=${LIBVIRT_NIC_DRIVER:-"e1000"}
+LIBVIRT_STORAGE_POOL=${LIBVIRT_STORAGE_POOL:-"default"}
+LIBVIRT_CONNECT_URI=${LIBVIRT_CONNECT_URI:-"qemu:///system"}
+
+export VIRSH_DEFAULT_CONNECT_URI=$LIBVIRT_CONNECT_URI
+
+if ! virsh pool-list --all | grep -q $LIBVIRT_STORAGE_POOL; then
+ virsh pool-define-as --name $LIBVIRT_STORAGE_POOL dir --target /var/lib/libvirt/images >&2
+ virsh pool-autostart $LIBVIRT_STORAGE_POOL >&2
+ virsh pool-start $LIBVIRT_STORAGE_POOL >&2
+fi
+
+pool_state=$(virsh pool-info $LIBVIRT_STORAGE_POOL | grep State | awk '{ print $2 }')
+if [ "$pool_state" != "running" ] ; then
+ [ ! -d /var/lib/libvirt/images ] && sudo mkdir /var/lib/libvirt/images
+ virsh pool-start $LIBVIRT_STORAGE_POOL >&2
+fi
+
+if [ -n "$LOGDIR" ] ; then
+ mkdir -p "$LOGDIR"
+fi
+
+PREALLOC=
+if [ -f /etc/debian_version ]; then
+ PREALLOC="--prealloc-metadata"
+fi
+
+if [ -n "$LOGDIR" ] ; then
+ VM_LOGGING="--console-log $LOGDIR/${NAME}_console.log"
+else
+ VM_LOGGING=""
+fi
+VOL_NAME="${NAME}.qcow2"
+
+if ! virsh list --all | grep -q $NAME; then
+ virsh vol-list --pool $LIBVIRT_STORAGE_POOL | grep -q $VOL_NAME &&
+ virsh vol-delete $VOL_NAME --pool $LIBVIRT_STORAGE_POOL >&2
+ virsh vol-create-as $LIBVIRT_STORAGE_POOL ${VOL_NAME} ${DISK}G --format qcow2 $PREALLOC >&2
+ volume_path=$(virsh vol-path --pool $LIBVIRT_STORAGE_POOL $VOL_NAME)
+ # Pre-touch the VM to set +C, as it can only be set on empty files.
+ sudo touch "$volume_path"
+ sudo chattr +C "$volume_path" || true
+ $TOP_DIR/scripts/configure-vm \
+ --bootdev network --name $NAME --image "$volume_path" \
+ --arch $ARCH --cpus $CPU --memory $MEM --libvirt-nic-driver $LIBVIRT_NIC_DRIVER \
+ --emulator $EMULATOR --network $BRIDGE $VM_LOGGING >&2
+
+fi
+
+# echo mac
+virsh dumpxml $NAME | grep "mac address" | head -1 | cut -d\' -f2
diff --git a/tools/ironic/scripts/create-nodes b/tools/ironic/scripts/create-nodes
deleted file mode 100755
index 140bffe..0000000
--- a/tools/ironic/scripts/create-nodes
+++ /dev/null
@@ -1,84 +0,0 @@
-#!/usr/bin/env bash
-
-# **create-nodes**
-
-# Creates baremetal poseur nodes for ironic testing purposes
-
-set -ex
-
-# Keep track of the devstack directory
-TOP_DIR=$(cd $(dirname "$0")/.. && pwd)
-
-CPU=$1
-MEM=$(( 1024 * $2 ))
-# extra G to allow fuzz for partition table : flavor size and registered size
-# need to be different to actual size.
-DISK=$(( $3 + 1))
-
-case $4 in
- i386) ARCH='i686' ;;
- amd64) ARCH='x86_64' ;;
- *) echo "Unsupported arch $4!" ; exit 1 ;;
-esac
-
-TOTAL=$(($5 - 1))
-BRIDGE=$6
-EMULATOR=$7
-LOGDIR=$8
-
-LIBVIRT_NIC_DRIVER=${LIBVIRT_NIC_DRIVER:-"e1000"}
-LIBVIRT_STORAGE_POOL=${LIBVIRT_STORAGE_POOL:-"default"}
-LIBVIRT_CONNECT_URI=${LIBVIRT_CONNECT_URI:-"qemu:///system"}
-
-export VIRSH_DEFAULT_CONNECT_URI=$LIBVIRT_CONNECT_URI
-
-if ! virsh pool-list --all | grep -q $LIBVIRT_STORAGE_POOL; then
- virsh pool-define-as --name $LIBVIRT_STORAGE_POOL dir --target /var/lib/libvirt/images >&2
- virsh pool-autostart $LIBVIRT_STORAGE_POOL >&2
- virsh pool-start $LIBVIRT_STORAGE_POOL >&2
-fi
-
-pool_state=$(virsh pool-info $LIBVIRT_STORAGE_POOL | grep State | awk '{ print $2 }')
-if [ "$pool_state" != "running" ] ; then
- [ ! -d /var/lib/libvirt/images ] && sudo mkdir /var/lib/libvirt/images
- virsh pool-start $LIBVIRT_STORAGE_POOL >&2
-fi
-
-if [ -n "$LOGDIR" ] ; then
- mkdir -p "$LOGDIR"
-fi
-
-PREALLOC=
-if [ -f /etc/debian_version ]; then
- PREALLOC="--prealloc-metadata"
-fi
-
-DOMS=""
-for idx in $(seq 0 $TOTAL) ; do
- NAME="baremetal${BRIDGE}_${idx}"
- if [ -n "$LOGDIR" ] ; then
- VM_LOGGING="--console-log $LOGDIR/${NAME}_console.log"
- else
- VM_LOGGING=""
- fi
- DOMS="$DOMS $NAME"
- VOL_NAME="baremetal${BRIDGE}-${idx}.qcow2"
- (virsh list --all | grep -q $NAME) && continue
-
- virsh vol-list --pool $LIBVIRT_STORAGE_POOL | grep -q $VOL_NAME &&
- virsh vol-delete $VOL_NAME --pool $LIBVIRT_STORAGE_POOL >&2
- virsh vol-create-as $LIBVIRT_STORAGE_POOL ${VOL_NAME} ${DISK}G --format qcow2 $PREALLOC >&2
- volume_path=$(virsh vol-path --pool $LIBVIRT_STORAGE_POOL $VOL_NAME)
- # Pre-touch the VM to set +C, as it can only be set on empty files.
- sudo touch "$volume_path"
- sudo chattr +C "$volume_path" || true
- $TOP_DIR/scripts/configure-vm \
- --bootdev network --name $NAME --image "$volume_path" \
- --arch $ARCH --cpus $CPU --memory $MEM --libvirt-nic-driver $LIBVIRT_NIC_DRIVER \
- --emulator $EMULATOR --network $BRIDGE $VM_LOGGING >&2
-done
-
-for dom in $DOMS ; do
- # echo mac
- virsh dumpxml $dom | grep "mac address" | head -1 | cut -d\' -f2
-done