1054 Commits

Author SHA1 Message Date
Swapnil Kulkarni (coolsvap)
44251da0c6 Drop root for ironic
Updates to ensure commands run in the ironic containers
are done as the 'ironic' user rather than root.

Change-Id: I491041ce02fb5dd3eb60c6ae9169f26d8a8919dd
Partially-Implements: blueprint drop-root
2015-11-24 21:28:38 +05:30
Swapnil Kulkarni (coolsvap)
e61b917bb8 Added ironic-common to ironic base container
Change-Id: I5e167fc2e1363eb407016a059acc868e7cf73563
Closes-Bug:#1519409
2015-11-24 21:28:12 +05:30
Jenkins
6f648105fe Merge "Switch find_disks to use a decent python lib" 2015-11-23 22:42:48 +00:00
Swapnil Kulkarni (coolsvap)
d3efbd07dc Drop root for ceilometer
Updates to ensure commands run in the ceilometer containers
are done as the 'ceilometer' user rather than root.

Change-Id: Ic94b876a002d4413f2038c29ffdb275c68323065
Partially-Implements: blueprint drop-root
2015-11-23 22:45:27 +05:30
Swapnil Kulkarni (coolsvap)
d14666a51d Update ceilometer dockerfiles
Updated ceilometer-base dockerfile to include commons package

Change-Id: Ieff651f0b7e9716b1b73e2e192f22e2e39dbe5a6
Closes-Bug:#1484002
2015-11-23 22:43:42 +05:30
Jenkins
7f2d46278f Merge "Remove hardcoded MAINTAINER in Dockerfiles" 2015-11-23 14:12:33 +00:00
Swapnil Kulkarni (coolsvap)
59a1c8b9fb Remove hardcoded MAINTAINER in Dockerfiles
Added new option in kolla-build.conf

Change-Id: I45fe51966bcb59ea19d112281ba3d5a1ba091a56
Closes-Bug:#1514304
2015-11-23 11:03:47 +00:00
Swapnil Kulkarni (coolsvap)
17f1d9177f Drop root for gnocchi
Updates to ensure commands run in the gnocchi containers
are done as the 'gnocchi' user rather than root.

Change-Id: I2e24300e05d1b2eeaa52bdc6ed3ec4599791136e
Partially-Implements: blueprint drop-root
2015-11-23 09:04:06 +05:30
Sam Yaple
dd16395ae1 Switch find_disks to use a decent python lib
Now /dev/loop devices will work!

Change-Id: Icb8efe4f9bc3a21a72eb04bfd03452c26f13fd70
Closes-Bug: #1518438
2015-11-20 23:24:53 +00:00
Jenkins
6bbd4bf1ca Merge "Fix gate" 2015-11-20 21:23:08 +00:00
Sam Yaple
ea17c2db72 Fix gate
A previous commit [1] removed the glance data container. Although this
worked at the time (as evident by it passing the gate) the drop root
patches merged after the gate patch causing the glance service to
not have the proper permissions to create this needed directory

[1] I7f2f5979b01807275908699d1243756cb97d3588

Change-Id: I5044de8d348e401a50970fd77671a79d35d2d595
2015-11-20 20:29:06 +00:00
Andrey Shestakov
df02ffe1c5 Fix /etc files location for ironic-base building from sources
Ironic config files should be palced to /etc/ironic/*

Closes-Bug: #1518433
Change-Id: Ic82dbb9a28ed3adb6bfca2d0f715da3a7bbc4698
2015-11-20 21:46:42 +02:00
Paul Bourke
2e50ead57e Fix missing policy.json in Magnum
The magnum api falls over on a request without this file in place

Change-Id: Ic7ff8af22c3142d93e0dcf2b2ed5455685dec658
Closes-Bug: #1517152
2015-11-18 12:10:38 +00:00
Jenkins
4cddefe7d7 Merge "Fix namespace regression for neutron" 2015-11-18 02:14:16 +00:00
Jenkins
3e97fdf4d8 Merge "Drop root for Magnum" 2015-11-18 00:50:40 +00:00
Jenkins
e63c0458f5 Merge "Remove old config-external.sh scripts for magnum" 2015-11-18 00:48:10 +00:00
Jenkins
bfcbdc41f8 Merge "Use pip upper-constraints in magnum-base" 2015-11-17 22:20:35 +00:00
Jenkins
cb96171ef8 Merge "Fix issues in Glance filesystem backend" 2015-11-17 19:36:03 +00:00
Paul Bourke
1a536124ad Drop root for Magnum
This change ensures commands run in the magnum containers are done as the
'magnum' user rather than root.

Change-Id: I18e2febae98aae6d6fc6c61cc2817442f408cb75
Partially-Implements: blueprint drop-root
2015-11-17 18:02:18 +00:00
Paul Bourke
9f6106c8f5 Remove old config-external.sh scripts for magnum
These are no longer used.

Trivial-Fix

Change-Id: Ia4dced3b8ac8512097f5cafbb1b06661c6f3eb88
2015-11-17 17:39:25 +00:00
Paul Bourke
1d0b8afa8b Use pip upper-constraints in magnum-base
Change-Id: Ibb5636d897c2b9177c54dfc13f6193e00107776b
Closes-Bug: #1517144
2015-11-17 17:13:15 +00:00
Paul Bourke
988c4f23f1 Fix issues in Glance filesystem backend
The drop root change for Glance highlighted the fact that we were
binding volumes from glance_data into the wrong container - it was
glance_registry whereas it should be glance_api. This would result in
all images being lost if the glance_api container happens to restart.

Also, we need a sudoers file to chown the file backend dir to the glance
user.

Change-Id: If04337045bb94b3126e48d1f5bf0ea29e20373ae
Closes-Bug: #1516729
2015-11-17 09:42:39 +00:00
Angus Salkeld
2f1c00a467 Add support for loading kolla config from ENV
Implements: blueprint zookeeper

Change-Id: Ibabcb5d6d304be9290633338c513f16651d4479a
2015-11-17 07:51:32 +00:00
Sam Yaple
baf9d93358 Fix namespace regression for neutron
Due the to way network namespaces work, they will not survive a
container restart. This is not an issue related to Kolla or Neutron
but rather an issue with how network namespaces work.

This is putting back into place a workaround that was in correctly
removed in the past. We simply cleanup the namespace cruft when the
neutron-agents container restarts thus avoiding this issue.

Change-Id: Ic16f2f766b4fa46347ea14a1ece5a4653c69d779
Closes-Bug: #1511216
2015-11-16 20:56:39 +00:00
Britt Houser
e9c47f3d64 Add usermod to Zaqar container
When we dropped root, we forgot the usermod.  Updated.

Change-Id: I72a452c9b3b6a9aac0a8edd073887a1b79c34e8e
2015-11-14 12:17:48 -05:00
Jenkins
fb06344aee Merge "drop root on memcached" 2015-11-14 17:11:23 +00:00
Britt Houser
66c15ce55e drop root on memcached
This patch add the USER directive to the memcached container.
It also removes the -u from the command line to launch
memcached, since it will already be run as that use.

Change-Id: I87d782a424df99fe1b5694debafa3c0c4a9aba27
Partially-Implements: blueprint drop-root
2015-11-14 11:38:30 -05:00
Jenkins
a27e1f895b Merge "Revert "Drop root for Horizon service"" 2015-11-13 22:06:20 +00:00
Jenkins
f54c5bee3a Merge "Drop root for Zaqar service" 2015-11-13 20:14:01 +00:00
Jenkins
4650d81341 Merge "Add ZooKeeper support in kolla-ansible" 2015-11-13 19:28:01 +00:00
Josh Lothian
63d5e9b552 Drop root for Zaqar service
Change-Id: I59797a8539406e478f6953a9aa0c933e73eb5892
Partially-Implements: blueprint drop-root
2015-11-13 13:20:36 -06:00
Michal Rostecki
1dfb791116 Add ZooKeeper support in kolla-ansible
In kolla-mesos, ZK will be used for storing information about
actions done in bootstrap.

Change-Id: Id7067a493b457cf7b73eb007852df7b13f4363b3
Partially-Implements: blueprint zookeeper
2015-11-13 19:39:07 +01:00
Jenkins
84b6f7edc4 Merge "Add Ansible support for Magnum" 2015-11-13 17:01:04 +00:00
Michal Rostecki
2cd5d9ed74 Add Ansible support for Magnum
Change-Id: Idb25ac4d3148c9b9400cf675ac2e47d35cce6224
Implements: blueprint ansible-magnum
2015-11-13 11:31:34 +01:00
Sam Yaple
6ec1fabf65 Revert "Drop root for Horizon service"
This reverts commit f9ccb1c8829cef551b875c7c387530e7980414a7.

There are many issues with this patch that prevents it from working
under numerous circumstances. The implementation is entirely busted
on Ubuntu. Additionally, best practice for apache is to run as root.
Apache itself does the privlege dropping.

Change-Id: I4395debb7d32223fb3752a6d3e7c4d7672d29916
2015-11-13 08:53:49 +00:00
Jenkins
52bd56e686 Merge "Drop root privileges for rabbitmq" 2015-11-13 07:53:06 +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
ea9d5cd067 Move USER operation after footer
The USER operation affects all docker commands after it. This causes a
problem with our {{ include_footer }} implementation since commands in
that footer may require elevated permissions to perform.

In the current implementation I can no longer remove my proxy settings
once the USER has been changed.

Change-Id: I9b2bab5a15f595f6d52a46c64ddf59ba5608b938
Partially-Implements: blueprint drop-root
2015-11-12 14:34:09 +00:00
Steven Dake
4c9e15b94e Drop root privileges for mariadb
Drop root privileges for mariadb.  This isn't perfect.  If somemone
breaks out of the container and can run sudo within the contianer,
it would be possible to replace the root credentials of the database.

Any container that uses sudo suffers from some extra attack vector
related to the sudo command.  That said, the sudo commands are
locked down to minimize harm.

Change-Id: I4b3573725d940bb8aa90d43a6235d8cf7d30fc64
Partially-Implements: blueprint drop-root
2015-11-12 03:12:40 -05:00
Steven Dake
09e9b1be33 Move the mariadb expect code to a script
Atleast in a script, sudo can be made to only allow the script to
run from the mysql process in the future, versus all the proceesses
being able to be executed as root presently.

Change-Id: I030b57086e37e4dc8f668f98c04335d94ab9d2b0
Partially-Implements: blueprint drop-root
2015-11-11 18:42:07 -05:00
Steven Dake
f9ccb1c882 Drop root for Horizon service
Drop root privileges for Horizon service.  It is necesssary to set
a capability on the filesystem to allow binding to port 80 as a
non-root user.  I have tested this works correctly from a registry
on both CentOS and Ubuntu.

Change-Id: I4c26f28bb28b6633784e6842f3423a2425332c27
Partially-Implements: blueprint drop-root
2015-11-11 18:41:56 -05:00
Jenkins
b6212875d3 Merge "Install keystoneauthv1 in openstack-base image" 2015-11-11 22:59:19 +00:00
Jenkins
d9f49d1026 Merge "Drop root for kolla-ansible" 2015-11-11 22:36:36 +00:00
Jenkins
1a6050e5e5 Merge "Clean up horizon httpd pid files for RPM distros" 2015-11-11 22:34:26 +00:00
Steven Dake
87c5b6b86b Install keystoneauthv1 in openstack-base image
Lots of tools rqeuire keystoneeauthv1 not just horizon

TrivialFix

Change-Id: I35eb958e35500b04657679371019f2e6f3c2f2dd
2015-11-11 13:49:54 -07:00
Steven Dake
d11b8f260b Drop root for heat
Drop root user for heat containers.

Change-Id: Ib07c0193f97bb18cc6154b4015b4056fd983f6c1
Partially-Implements: blueprint drop-root
2015-11-11 14:50:02 -05:00
Steven Dake
5e15ee16de install openstack-heat-common in heat-base
the openstack-heat-common package installs the Heat UID/GID.
This is necessary pre-work for drop-root for heat services.

Change-Id: I247b0209248de144d20f5245973833be5cd8f14f
Partially-Implements: blueprint drop-root
2015-11-11 14:50:02 -05:00
Jenkins
d4379a5cde Merge "Drop root for designate" 2015-11-11 18:35:33 +00:00
Paul Bourke
0f315a0ed0 Drop root for kolla-ansible
This change ensures commands run in the kolla-ansible container are done
as the 'ansible' user rather than root.

By default Ansible tries to write it's temporary files to $HOME/.ansible
on the target, which in most cases won't exist when run as the new user.
Hence we now supply the kolla-ansible container with an ansible.cfg, to
tweak the remote_dir option to /tmp.

Change-Id: I838a8c8cd0c7dc1aeca4d12e38c346f252170e7c
Partially-Implements: blueprint drop-root
2015-11-11 18:04:02 +00:00
Paul Bourke
bac1235ed2 Clean up horizon httpd pid files for RPM distros
(apply same fix that we did for keystone, to horizon)

In some cases we're seeing httpd not cleaning up properly after itself,
which results in the horizon container failing to restart. This is
confirmed to happen on rpm based distros, but have not had any reports
on Ubuntu.

Change-Id: I8ece6da1a8a1180730d68be0d129a656ddcede07
Closes-Bug: #1515214
backport: liberty
2015-11-11 11:46:24 +00:00