Commit Graph

54 Commits

Author SHA1 Message Date
Jeffrey Zhang
e7441a4212 Configure the rabbitmq ha policy in config file
Closes-Bug: #1580884
Change-Id: Ief5917d48dbf6abe4a5861e73b24d534b889bd52
2016-05-23 10:27:33 +08:00
Davanum Srinivas
48b4b15828 Avoid _ in rabbitmq_clusterer.config
Trying to use ConfigMap's in Kubernetes leads to an interesting
problem. We use the file name as the key and the contents of the
file as the text value. The ConfigMap is mounted on the container
as a volume and the key is then used as the name of the file. The
problem is that kubernetes has a limitation on the name of the
key

https://github.com/kubernetes/kubernetes/blob/release-1.2/docs/design/identifiers.md

Which means we cannot use '_' in the name of the file.

Closes-Bug: #1581162
Change-Id: I2d9ec80f989c30893b019954fe18b3623d27a076
2016-05-13 07:39:12 -04:00
Jeffrey Zhang
0fcee87549 map the host localtime to the container
Closes-Bug: #1577148
Change-Id: I636cefc63cf532434a41af3898b63dffa711e280
2016-05-03 09:27:51 +08:00
Jenkins
34460c37c6 Merge "Rabbitmq Upgrade restarts container only when image was changed." 2016-04-12 14:39:29 +00:00
Martin André
ed1c71837f Clarify comment about binding erlang to IPv4
The comment was confusing and not explaining what the real issue is
when binding erlang to an IPv4 address.

Change-Id: I819ea137fa37c0b2711efb1e7cb1e518ae26b9ab
Related-Bug: #1562701
2016-04-11 11:16:37 +02:00
Vikram Hosakote
915d3f12b5 Fix rabbitmq crash in centos gate
Please refer to the Closes-Bug identifier for detailed information
pertaining to this issue.

Closes-Bug: #1562701

Change-Id: I77563930e14e11ea48e7edfef0bff80002279381
2016-04-11 06:28:19 +00:00
Serguei Bezverkhi
d73ee4a856 Rabbitmq Upgrade restarts container only when image was changed.
This fix adds a check of Rabbitmq's image version during the upgrade.
The container gets restarted only when the image version is different.

Change-Id: Ie038845c0c8fff1ac51b7cbf21e1b593229c2c0e
Closes-Bug: #1558832
2016-04-10 16:21:48 -04:00
Jenkins
3424aefe4b Merge "Add quotes for RBMQ nodes definition" 2016-04-10 03:25:14 +00:00
Proskurin Kirill
7829aa27b3 Add quotes for RBMQ nodes definition
erlang parser, cant parse hostname with minus symbol, it returns:
Ignoring external configuration due to error: {1,erl_parse,"bad term"}

Adding single quotes fix this issue.

Co-Authored-By: weiyu <weiyu@unitedstack.com>
Closes-Bug: #1540234
Change-Id: I80e0789aa31febd552a851e6dc3a835d89c0e9d1
2016-04-08 17:29:13 +00:00
Jenkins
05e92db2ad Merge "Playbook for rabbitmq upgrade" 2016-04-05 13:48:34 +00:00
Jenkins
17781afa52 Merge "Fix IP resolve check for RabbitMQ on AIO" 2016-04-01 17:19:18 +00:00
Michal Rostecki
5aa2dcce30 Fix IP resolve check for RabbitMQ on AIO
On AIO installation we cannot assume that the public IP address
will be the first entry in "getent ahostsv4" result, because
it may be also a localhost address. To make this check positive
in AIO, we should look for the public IP in the whole output.

Change-Id: I1da7b95d7f00c7f87ff68ead46bf55fdea812599
Closes-Bug: 1564564
2016-04-01 07:57:14 +02:00
Jeffrey Zhang
0ae14ebb07 Restrict the rabbitmq only start on rabbitmq group
Change-Id: I375d637eff76dd3d00e61e521c0d68a19e5da9a3
Closes-Bug: #1562261
2016-03-28 04:06:30 +00:00
Steven Dake
7a9d1a3cb9 Fix problem where ipv6 address causes failure
If an IPV6 address is assigned to the interface as well as IPv4,
Kolla bombs out during deployment.

Change-Id: Ic161c52825e0642e261d22418569d0f7667c6bd1
Closes-Bug: #1560137
2016-03-21 13:23:19 -04:00
Michal (inc0) Jastrzebski
d2f828a134 Add check if all the hostnames are resolvable
Rabbitmq can't work with IPs, so we need to make sure that all
rabbit cluster hosts can resolve each others hostnames. We
should also require that in docs.

DocImpact
Closes-Bug: #1559158

Change-Id: I2418187138988d21da3dc3624e9cdbda891d4894
2016-03-19 04:24:41 +00:00
Michal (inc0) Jastrzebski
23e7f6c292 Playbook for rabbitmq upgrade
Main issue with rabbitmq clusterer setup is to shut down gospel node
as last one, which is bulk of this change

Co-Authored-By: Sam Yaple <sam@yaple.net>
Change-Id: I88e566a19ed813b0e3eef65ef7139ccfaa0c2700
Implements: blueprint upgrade-rabbitmq
Partially-implements: blueprint upgrade-kolla
2016-03-18 14:11:29 +00:00
Jenkins
439188cedb Merge "Use ubuntu Mitaka repo" 2016-03-15 02:35:47 +00:00
SamYaple
8b3f0d0857 Use ubuntu Mitaka repo
The rabbitmq-server package is upgraded to 3.5.7 in cloud-archive
so we update centos to match

The xen-utils package now needs an explict version, xen-utils-4.6 is
what is provided by cloud-archive mitaka

Libvirt 1.3 is in the ubuntu cloud-archive. This has a new daemon for
logging that needs further implementation in newton. For now, it has
been disabled within the qemu.conf

Co-Authored-By: Jeffrey Zhang <jeffrey.zhang@99cloud.net>
TrivialFix
Change-Id: I84217824817c484b6800a64cbd7767b127a3098e
2016-03-14 15:52:48 +00:00
Vikram Hosakote
b82b72bb20 Reconfigure rabbitmq service
Change-Id: I8228c010577bd01a7dcac18a5455e11b0e6f569a
Closes-Bug: #1553521
2016-03-11 16:12:42 +00:00
Jeffrey Zhang
d26c259754 Add the default empty reconfigure.yml file to all roles
DocImpact

Partially-implements: bp kolla-reconfig
Change-Id: I9738e80960bcfbef18d1ef1b7942f81c45684e85
2016-02-25 09:32:53 +08:00
Éric Lemoine
1ded68d2d3 Make Heka collect RabbitMQ logs
Partially implements: blueprint heka
Change-Id: I8fd3324daf15e52712591c2b3cbec613d82b73b3
2016-02-19 20:32:25 +00:00
Jeffrey Zhang
29765a3e3e Do not pull rabbitmq-data image
Rabbitmq container has moved to named volume. No need pull rabbitmq-data
image.

TrivialFix

Change-Id: I83776ce626a7e398add0f07bd855924b8632b1ae
2016-02-12 08:39:25 +08:00
Sam Yaple
84540a0632 Revert "fix miss rabbitmq config when hostname include special character"
This change breaks ubuntu

This reverts commit 04992a3de0.

Change-Id: I5e38d4c4a37ee90603ad04ab4b9d03298b6b2eb2
2016-02-04 11:47:28 +00:00
weiyu
04992a3de0 fix miss rabbitmq config when hostname include special character
Change-Id: I46db4d3547b120d1ccd87a48e31b699bdd1aa1a0
Closes-Bug: #1540234
2016-02-02 18:37:44 +08:00
SamYaple
64a767db4d Convert rabbitmq to named volume
Change-Id: I81413ffcaa4efb881d13fef62823d60b676e871d
Implements: blueprint docker-named-volumes
2016-01-29 20:39:55 +00:00
SamYaple
6d8959a962 Update all bootstraps to use Label
Add bootstrap label to all bootstrap containers to ensure that when
the a new container is launched a difference is seen between it and
the bootstrap container since we cannot rely on ENV variables for
this. This only affects mariadb at this stage, but it is needed to
ensure rabbitmq works when we switch to named volumes.

Change-Id: Ia022af26212d2e5445c06149848831037a508407
Closes-Bug: #1538136
2016-01-28 20:26:41 +00:00
Michal Jastrzebski
375965ddfb Add stub upgrade.yml
After introduction of pull action and turing every main.yml into
{{action}}.yml we lost ability to perform upgrade

Change-Id: Ie9fa2cd083b061033abc733fba53d54f9c55e393
Fixes-Bug: #1538210
2016-01-26 11:52:19 -06:00
SamYaple
bfcc849a40 Allow rabbitmq role to pull images
Change-Id: I184aabfbbd9fcd0b87080d044b0d286f0deac14c
Partially-Implements: blueprint pre-pull-images
2016-01-06 14:44:13 +00:00
SamYaple
de8188a7d9 Convert rabbitmq to kolla_docker
Change-Id: Idd3528fe739f30e0251137966512ecc05dd715a7
Partially-Implements: blueprint kolla-docker-module
2015-12-31 16:38:56 +00:00
SamYaple
ed82afa8e9 Simplify config creation
Convert config creation from a playbook to an action_plugin. This
reduces the complexity and confusion while retaining the same augment
structure and flexibility.

This allows us to remove the 0-byte files as requirements. They will
still be used if they are present (this means we require additional
documentation around them).

DocImpact
Closes-Bug: #1528430
Change-Id: I2c789f6be9f195c7771ca093a6d59499564b4740
2015-12-22 04:28:53 +00:00
Sam Yaple
970617b80a Make the database json variable more readable
Additionally remove tty from the container cleanup docker section. It
was added in a sed in a previous patchset by serves no purpose.

Change-Id: Ib617870616bca687f72ffaa44b2e9a3a11ef1011
Partially-Implements: blueprint cleanup-playbooks
2015-11-23 17:24:22 +00:00
Ryan Hallisey
22def41d37 Drop root privileges for rabbitmq
Drop root privileges for rabbitmq.  Only the rabbitmq user
will be able to execute chown of /var/lib/rabbitmq.

Change-Id: I546e6b475a8462bfbc75972854e1fee64f96d9cb
Partially-Implements: blueprint drop-root
2015-11-12 11:38:17 -05:00
Sam Yaple
d01e9a43dd Use rabbitmq-clusterer when deploying
Change-Id: I2a9c6fa16444a2142ab77f58d188eda84a2e59fd
Partially-Implements: blueprint rabbitmq-clusterer
2015-11-03 04:51:45 +00:00
Sam Yaple
b2ac6e80cd Add tty to containers
sudo requires a tty to function by default on centos. Instead of
tweaking the sudo conf we can just add a tty. This has the added
advantage of making the containers more friendly if you have to
`docker exec -i <container> bash` into them.

Change-Id: If97a02ca1d37c243a787d98ade54bde8d641aecd
backport: liberty
Partially-Implements: blueprint functional-testing-gate
2015-10-14 10:54:33 +00:00
Sam Yaple
5f200e0446 Fix issue with su and bad kernels
Long story short, some kernels before 3.15 had an issue with using su
in a container when the network namespace was --net=host. The gate
has a 3.10 and a 3.13 kernel and has a problem with this. This changes
everything to use sudo

backport: liberty
Partially-Implements: blueprint functional-testing-gate
Change-Id: I4d79ccaa1cddffcc8393f64e7e1be2538efe33e5
2015-10-13 15:13:55 +00:00
Sam Yaple
c5be228be8 Bump ansible to 1.9.2
Ansible 1.9.2 contains the fix needed for docker-py >1.2.0

This is needed for some gate reasons, but it is also a good version
bump because it fixes a few issues with delegate_to.

Change-Id: Iafbabb3b0232620849d0548c5cd9d8d316c2b0f3
backport: liberty
Partially-Implements: blueprint functional-testing-gate
2015-10-13 15:13:34 +00:00
Sam Yaple
94162bd08f Bring Kolla inline with FHS
This brings Kolla images inline with FHS and should make finding
locations of things more consistent and reliable with the linux world
at large.

Change-Id: Iece5b4da4bace0fb8b1f41a65ab2c852ec73e6f8
Closes-Bug: #1485742
2015-10-06 03:30:53 +00:00
rthallisey
a0bffb2581 Replace config-external with a JSON file for Rabbitmq
Change-Id: Ibb30af44a9362278eff012ff1145374788b06cd5
Partially-Implements: blueprint replace-config-external
2015-09-18 15:19:06 -04:00
Steven Dake
327d89bd38 Fix rabbitmq from failure during startup
Stagger the start times of the rabbitmq daemon so rabbitmq neither
crashes and also properly forms a cluster.  This problem exists in
the latest rabbitmq 3.5.4 available on rabbitmq.com for download.

Change-Id: Iac4186b3c3b586de38467294399c7ed9415244de
Closes-Bug: #1490780
2015-09-08 20:38:11 -07:00
Sam Yaple
f42528acaf Properly check failed status
No need for a new task.

Change-Id: I958f87ac9a1434a2f6052e0271f37e5f3109775e
Closes-Bug: #1492337
2015-09-06 11:21:44 +00:00
Vladislav Belogrudov
7f81dbc85b Check exit status of bootstrap containers
Currently bootstrap containers are waited to exit but are not
checked for exit status and ansible runs further tasks. If
bootstrapping fails we notice it at much later time.

Change-Id: I137fc11b0f9d1f03d2ded08a213e8dbd62741f92
Closes-Bug: #1492337
2015-09-04 19:47:54 +03:00
Sam Yaple
1e963d124a Fix rabbitmq part 2
Change-Id: I69a5ace61dd621a7fc0354d4deb5e8937505e13e
Partial-Bug: #1480496
2015-09-02 15:33:18 +00:00
Sam Yaple
77466a292d Fix rabbitmq perms
If a bootstrap fails at some stage and leaves a rabbitmq_data
container on a host, it will not bootstrap again and rabbitmq
fails to start due to root permissions on /var/lib/rabbitmq.

This patch improves the check for a valid, existing
rabbitmq_data

Closes-Bug: #1490602
Change-Id: I6a00aaef38b4ab6a60dcfb5ed2f808513b9f8c84
2015-09-02 13:31:05 +00:00
Paul Bourke
f5c996e77d Fix typo in task bootstrap task names
Not quite halloween yet...

Change-Id: Ib1973eea0b2dddc0e0845731d1212c4d4447cca5
Closes-Bug: #1490502
2015-08-31 11:27:10 +01:00
Jenkins
b9f0cdbe38 Merge "Rabbitmq servers fail to start due to wrong permissions" 2015-08-23 02:58:23 +00:00
Vladislav Belogrudov
dd9986cf0a Rabbitmq servers fail to start due to wrong permissions
Rabbitmq containers mount /var/lib/rabbitmq from 'data'
containers with 'root:root' permissions because
ansible does not wait for rabbitmq bootstrap container -
the latter corrects access rights but sometimes gets
killed just after start.

Change-Id: I5cd1ce9810a1fd457dd34a1283e448204964c17d
Closes-Bug: #1487422
2015-08-21 16:16:37 +00:00
Sam Yaple
fe2e454f26 Fix RabbitMQ for Ubuntu
In rabbitmq we removed the requirement for hostname since that is
already installed.

Change-Id: Ia2355e332d53763db630d19663c2ddc8bf3aa425
Paritially-Implements: blueprint install-from-ubuntu
2015-08-20 14:43:32 +00:00
Sam Yaple
b408bd531d Fix small typo in task name
Change-Id: I80e183985560404455443e6fa22e661bea3c0fa3
Closes-Bug: #1486516
2015-08-19 11:04:51 +00:00
Steven Dake
bd5e5bbb64 Use one data container for all data volumes
The previous method of using the API image for a data container
worked, but resulted in more data being bindmounted and copied
into the system.  This patch resolves that by essentially using
a distro-type as a FROM in a Dockerfile to generate
distro-type-data.  Further all of the data containers used
throughout ansible are modified to use this new data container.

Change-Id: I8846573d4f2d4b98d4f46c770bfefc6d4c5cd0b5
Partially-Implements: blueprint one-data-container
2015-08-18 20:52:27 -07:00
Sam Yaple
8419902e8e Remove bootstrap.yml abstraction for rabbitmq
Change-Id: I5b163b6a5c0e084deec5937e4fbf04d11fdde01f
Partially-Implements: blueprint remove-abstraction-ansible
2015-08-13 17:41:47 -07:00