527 Commits

Author SHA1 Message Date
Pranav Salunke
dc0a6d4bdb labs: Remove labs section
* Deletes content in labs section since the code is located in the new
  repository under training-labs.

  * Also update the Readme's.

Change-Id: I5eef76349a1b1e245c4ae9d7e2c38a3fa81d1a21
Implements: blueprint training-labs
2015-11-27 15:36:47 +01:00
Jenkins
4f9a469d9c Merge "Remove ineffective assignment in subcommand" 2015-11-05 08:55:04 +00:00
Zhao Lei
ca65a27b28 Remove ineffective assignment in subcommand
No need to assign return value to $rc in subcommand,
value in subcommand can not pass to parent process, plus,
it is never used.

Change-Id: I5f478813c7472d3709e09ff88f2165d5f1cd9097
Signed-off-by: Zhao Lei <zhaolei@cn.fujitsu.com>
2015-09-23 20:15:03 +08:00
Zhao Lei
6d2553ef2e Remove quotes from subshell call in bash script
Always no quotes for $() statement.

We don't need quotes to hold blanks in result:
 # i=$(echo 1 2 3)
 # echo $i
 1 2 3
 #

These quotes can make something wrong in some case:
 # i=$(echo '!')
 #
 # i="$(echo '!')"
 -bash: !: event not found
 #

No real problem for current code, only to use a better code style.

Change-Id: Ib31b49680286600c9a182875122a0a752d3f8a33
Signed-off-by: Zhao Lei <zhaolei@cn.fujitsu.com>
2015-09-23 17:34:07 +08:00
Jenkins
1cc1dba016 Merge "Fix URLs in setup_neutron_controller.sh" 2015-08-05 14:35:42 +00:00
Jenkins
517869059c Merge "Keep additional logs files" 2015-08-04 19:02:31 +00:00
sayalilunkad
c1f547e9f4 Fix URLs in setup_neutron_controller.sh
Two URLs in setup_neutron_controller.sh differ from the install-guides.
Fixed.

Change-Id: I0220692179f551bae161bd257f311cec5bd1364f
2015-08-04 18:17:50 +02:00
Jenkins
6844ce9427 Merge "launch_instance.sh: return error if nova-compute fails" 2015-08-03 17:45:07 +00:00
Roger Luethi
aa5748681c Keep additional logs files
Make repeat-test.sh keep additional log files.

Change-Id: I7e438e463ad1d8edf6bb0ce83c1ef2a110ef4a68
2015-08-02 20:24:30 +02:00
Roger Luethi
14f806dee6 launch_instance.sh: return error if nova-compute fails
If the nova-compute service is up but remains offline (XXX) in
nova-manage service list, the script gives up, returning 0 (success) as
the exit code.

This patch makes this case return 1 (error) instead which is consistent
with similar cases in the script.

Change-Id: Ia6945569255a7cd9796930edff21ffcfc333cc1d
2015-08-02 10:40:26 +02:00
Roger Luethi
56669b506d Wait for floating IP to turn up
Since Juno, the floating IP often takes a long time to become pingable.
Hopefully, this will be fixed, but for the time being we just ping the
floating IP until we get a reply (or we reach a time limit and give up).

This patch makes the test script wait longer for the floating IP.

Change-Id: I8838aa7dc9b29274ea98401ce8d3ba3033a0dd0d
2015-08-02 09:49:53 +02:00
Roger Luethi
18830c3b45 Fix variable increment syntax
With bash, the i++ syntax does not quite work the way one might expect.
Use POSIX standard syntax instead, consistent with the rest of the code.

Change-Id: Ic98ee03290dc46f4cfa1284672e9b4f9052739ef
2015-07-25 21:12:04 +02:00
Roger Luethi
2c2cc78fed Fix patch "Wait for external bridge"
An inactive version of the patch "Wait for external bridge" got somehow
submitted for review and merged. This patch enables the code.

Change-Id: I1212d2a4c9bc899c258941acc0022207c4370db3
2015-07-19 16:35:48 +02:00
Roger Luethi
29efa4a3e7 Labs: Wait for external bridge
If we change configuration files right after installing service
packages, automatically started services may pick up changed
configuration files rather than the default files they were packaged
with.

If the neutron-l3-agent starts with our custom configuration file which
refers to the external bridge br-ex while that bridge is not there
(yet), the port is permanently marked as unavailable (vlan tag=4095).

In such a case, a line like this can be found in /etc/openvswitch/conf.db:
{"_date":1435514607570,
"Port":{"20b0e96c-6103-46e6-a234-a4d5439eece7":{"tag":4095}}, "_comment":"
ovs-vsctl: /usr/bin/ovs-vsctl --timeout=10 set Port qr-4be1ab91-60 tag=4095"
,"Open_vSwitch":{"e00f3d6f-e55a-419a-a605-141021026dee":{"next_cfg":15}}}

For additional information, check this neutron bug:
Neutron openvswitch-agent doesn't recover ports from binding_failed status
https://bugs.launchpad.net/neutron/+bug/1399249

This is another race -- waiting for a few seconds before changing the
configuration files fixes the problem. The alternative used in this
patch is to stop the neutron-l3-agent before editing the configuration
files and to start it only once the bridge is ready.

Change-Id: I55762d17817e5e1cdb4c0420374c9fbc314bdff1
Co-Authored-By: Vigneshvar.A.S <vigneshvar.a.s@gmail.com>
Co-Authored-By: sayalilunkad <sayali.92720@gmail.com>
2015-06-29 16:50:32 +00:00
Jenkins
a920424dec Merge "labs: Disable telemetry service" 2015-05-28 09:15:28 +00:00
Pranav Salunke
22394d6fb4 labs: Disable telemetry service
Telemetry service comes with high overhead by consuming higher
resources than expected for the default minimal cluster configuration
for training labs.

Commented out the telementry related scripts under the config folder.
To re-enable it, just uncomment the required lines.

Change-Id: I6d53c4aefe689100c0315a366430a34ff1a807fe
2015-05-27 11:27:35 +02:00
Jenkins
e85557671b Merge "labs: move lbaas_controller script to ubuntu folder." 2015-05-27 06:31:00 +00:00
Jenkins
21155d91de Merge "labs: repeat test from snapshot" 2015-05-27 06:30:52 +00:00
Jenkins
9f436e3af4 Merge "colorize osbash scripts using lib-color.sh" 2015-05-18 18:24:24 +00:00
utsav
a4bb9d9a12 colorize osbash scripts using lib-color.sh
It colorizes the output of osbash.sh using
the conventions given in lib-color.sh.

Implements: blueprint osbash-color-support
Closes-Bug: #1443136
Change-Id: I42ca96454fdab47b283222e2deaf3e9b51d03106
2015-05-11 21:15:34 +05:30
Pranav Salunke
93fdc6cdcd labs: move lbaas_controller script to ubuntu folder.
Although lbaas controller script does not install any package(s), it
still has ubuntu oriented workflow.

Change-Id: If8ff129c796cca0cea3198bd31830c135be2c351
2015-05-10 19:49:00 +02:00
Pranav Salunke
5b9891d5d5 Fixes cinder races
Cinder is failing after upgrade to Juno. This is because of the
following race conditions:

  - Cinder takes time to update the current status of the services.
  - Cinder sometimes gets stuck at creating block device.
  - While creating block device, deleting that device is not allowed.
    This creates error and stops the script from running.

Fixes include some helper functions which adds to the robustness of
cinder test cases.

Co-Authored-By: Roger Luethi <rl@patchworkscience.org>
Change-Id: I3254438fdac0bd4a7f927f0f203c51ab6e45b9c0
2015-05-10 15:07:13 +00:00
Jenkins
a2eff15285 Merge "[labs] Minor fix" 2015-05-10 14:52:48 +00:00
Pranav Salunke
7c8d4ecf8f Updates base disk size
Adding orchestration and telementry services require more disk size.
The current base disk size may not be sufficient for newely added
services.

Change-Id: Id8fc90a434cade6e1c9833935938869f6a84252a
2015-05-10 14:22:53 +00:00
Roger Luethi
4749e620b6 labs: repeat test from snapshot
With this changeset, the cluster build can be tested starting from a
specific snapshot. This is mostly useful for testing client scripts
without having to go through the whole cluster build every time.

For instance, to rebuild the cluster from snapshot neuntron_configured:

./tools/repeat-test.sh -b -t neutron_configured -s "controller compute"

This will restore the appropriate snapshot on each node, boot nodes
controller and compute, and continue the cluster build from the named
snapshot onward.

Note: this procedure restores, boots, and continues in short order which
uncovers new shortcomings (races) in scripts that assume a service is
available when they should check and wait for the service.

If you just want to restore all nodes to the appropriate snapshots:
./tools/restore-cluster.sh -t <snapshot>

Change-Id: I0b7888d02de6eb50760d421d6d897f516f8c7718
2015-05-10 16:14:52 +02:00
Jenkins
f8df591df5 Merge "Fix apache2 error" 2015-05-10 14:06:24 +00:00
Pranav Salunke
6fa0fa5cd9 Fix apache2 error
Apache2 service was not restarting properly since Ubuntu14.04
which resulted in race conditions. This is explained in detail in the
script. Adds a work around to fix apache2 race invoked by lack of
www-browser virtual package linking to a basic text browser. Adding
w3m before hand to avoid any future issues. Ofcourse lynx or links
works here too.

Also provides more systematic stopping and starting of apache service
for eliminating restart/start-stop race issues.

Change-Id: I541d5b27bbfdda9b9f3eda72a0f13e9e8333faa2
2015-05-10 15:54:29 +02:00
Pranav Salunke
e05cafe19b Changes exit status for heat_network unit test
If the test fails, it should exit the script not the cluster. Just
reporting this error and gracefully exiting the script should be
sufficient. My reasons for this are:

    * The tests are not completely reliable to say if the cluster is
      broken for sure.
    * The tests are not meant to fix the issues with the cluster, it
      could be a packaging issue or bug in the product. Our aim is
      not to catch them.
    * If there is a problem with heat, the other servies are still
      running fine. And the cluster is still usable.

Change-Id: I246bd3144189eba69a64ad545e6fe123e310595e
2015-05-10 15:50:50 +02:00
sayalilunkad
2fe7df2835 labs: Adds telemetry service to osbash
Following actions are performed by this patch:
1) Adds the ceilometer packages to the pre-download script.
2) Adds telemetry services on controller node.
3) Configures glance, cinder to send notification to the telemetry module.
4) Adds ceilometer compute agent on compute node.

Co-authored-by: Pranav Salunke <dguitarbite@gmail.com>
Change-Id: I82e8f4799e724e09748bb9c743ec8b77e82af39a
2015-05-10 13:07:44 +00:00
Jenkins
527399d26b Merge "Rename Bash scripts" 2015-05-10 13:04:28 +00:00
Jenkins
9619a30df2 Merge "labs: print stack-list in error case" 2015-05-10 13:03:14 +00:00
Jenkins
d5622cefc6 Merge "Fix MD5 verification for fedora-20-x86_64" 2015-05-10 12:58:17 +00:00
Jenkins
02b4b06cf8 Merge "labs: protect downloader.js from deletion" 2015-05-10 12:45:05 +00:00
sayalilunkad
195698212f labs: Adds functions to edit config files
This patch adds a function to edit config files without a section parameter.
Current functions need a [section] to edit the config file. It also modifies
the iniset_sudo function to call this function when section is not specified.

Change-Id: Idc213676077622a438b5d96f831b77da5bd32528
2015-05-08 13:14:40 +00:00
Pranav Salunke
1a661940b6 [labs] Minor fix
Changes print output from 'k' to '.'.

Change-Id: I26121097170dc6840b04138fde1367de0e62fea7
2015-05-08 11:14:19 +02:00
Erwan Gallen
21df3c8691 Fix MD5 verification for fedora-20-x86_64
Adding the missing ISO_MD5 variable in the fedora-20-x86_64 lib

Change-Id: I94d90a0373fb8d7b6f57a1252d44e96e76b7e4af
Closes-Bug: #1451434
2015-05-04 15:54:31 +02:00
utsav dusad
cf3b1fa923 Rename Bash scripts
Rename scripts in /labs/lib with proper naming convention.

Bug #1451071

Change-Id: I3a1f096414866846a7f9572804c5db852d76a36e
2015-05-03 22:44:56 +05:30
Roger Luethi
d9c55d0f60 labs: print stack-list in error case
setup_heat_network.sh aborts if the status is not CREATE_COMPLETE after
60 seconds. With this patch, the script prints the current stack list
before aborting so the user can see the current status of the stack
(which might be CREATE_IN_PROGRESS or CREATE_FAILED).

Change-Id: I23484ef5dfcc6e5681931b58fba0edef1003ff77
2015-04-26 12:26:29 +02:00
Pranav Salunke
0590e95f40 Change apache service to restart
After fixing the apache service issue with Ubuntu14.04, restart
command should work better that manual stop/start. While stopping
and starting a service using scripts, it can sometimes be too fast
to give time to the service to respond properly and cause error
status and more races.

Change-Id: I84b2271f07a10ce1a29403312736272221895c35
2015-04-21 16:41:11 +02:00
Roger Luethi
49231a7bde labs: protect downloader.js from deletion
In its current location, the download helper for Window batch scripts,
downloader.js, gets deleted when the Windows batch scripts are generated
(due to a call to clean_dir).

This patch moves downloader.js to the tools directory where it remains
safe from clean_dir.

Change-Id: I48f3daf613e8517dfb9256af298e9e43f76289bc
2015-04-19 17:57:35 +02:00
sayalilunkad
e33ba8229e labs: Renames snapshot
This patch renames the last snapshot of controller and network node so as to
not cause confusion when new services are added.

Change-Id: Iecd8ffb51808028ad24af389d73522586bda76c4
2015-04-19 17:37:52 +05:30
Jenkins
a327d33f16 Merge "Updates README for labs/img section" 2015-04-19 11:49:25 +00:00
Jenkins
b7af56907a Merge "labs: Adds orchestration service to osbash" 2015-04-19 11:38:28 +00:00
sayalilunkad
46e71fee16 labs: Adds orchestration service to osbash
Following actions are performed by this patch:
1) Adds the heat packages to the pre-download script
2) Adds OpenStack orchestration service - heat on controller node
3) Adds verification steps for heat installation

Change-Id: Id9241b64af010c314a107330ef39f0ffcc9211b7
2015-04-19 17:02:45 +05:30
Pranav Salunke
0e094bf80e Updates README for labs/img section
Refactor some stuff and add an URL for Windows users to download the
distro ISOs. It is difficult to copy the URL from the Windows command
prompt.

Change-Id: I12cc40ed733fd36feac4f4d6ae31a9b85999fff9
2015-04-18 06:08:59 +00:00
Roger Luethi
c992ae3e21 labs: Automatically download install ISO in Windows
With this patch, the Windows batch scripts attempt to automatically
download the install ISO image (this is already the case on Linux, OS X).

Change-Id: I080b593f2b627801845f18587521ad64d53b3504
2015-04-15 19:28:18 +00:00
Jenkins
212ef71d6f Merge "labs: update apt pre-download for nova compute" 2015-04-05 16:49:06 +00:00
Jenkins
5772352a02 Merge "labs: reformat osbash.sh usage text" 2015-04-05 16:27:52 +00:00
Jenkins
e1bcbb7c04 Merge "labs: fix HTTP_EXCEPTIONS check" 2015-04-05 16:27:13 +00:00
Jenkins
7121f3d28e Merge "labs: fix cp on OS X" 2015-04-05 16:26:49 +00:00