94 Commits

Author SHA1 Message Date
Gabriel Assis Bezerra
a688bc6510 Fix the way Apache site configuration files are used, to improve OS portability
On Ubuntu 14.04, the site configuration file must have a .conf suffix for a2ensite and a2dissite to
recognise it. a2ensite and a2dissite ignore the .conf suffix used as parameter. The default sites'
files are 000-default.conf and default-ssl.conf.

On Ubuntu 12.04, the site configuration file may have any format, as long as it is in
/etc/apache2/sites-available/. a2ensite and a2dissite need the entire file name to work. The default
sites' files are default and default-ssl.

On Fedora, any file in /etc/httpd/conf.d/ whose name ends with .conf is enabled.

On RHEL and CentOS, things should hopefully work as in Fedora.

This change puts all distribution-related site configuration file name differences in lib/apache and
the other services gets the file name for its sites using the new exported function
apache_site_config_for <sitename>.

It also makes Fedora disabled sites use the .conf.disabled suffix instead of removing the .conf from
the file name.

The table below summarizes what should happen on each distribution:
+----------------------+--------------------+--------------------------+--------------------------+
| Distribution         | File name          | Site enabling command    | Site disabling command   |
+----------------------+--------------------+--------------------------+--------------------------+
| Ubuntu 12.04         | site               | a2ensite site            | a2dissite site           |
| Ubuntu 14.04         | site.conf          | a2ensite site            | a2dissite site           |
| Fedora, RHEL, CentOS | site.conf.disabled | mv site.conf{.disabled,} | mv site.conf{,.disabled} |
+----------------------+--------------------+--------------------------+--------------------------+

Change-Id: Ia2ba3cb7caccb6e9b65380f9d51d9d21180b894e
Closes-bug: #1313765
2014-05-30 12:07:24 +00:00
Julien Vey
63024d9125 Add an option in lib/swift to increase max_header_size
With the increasing number of entries in the service_catalog header,
some projects will have a header bigger than 8192 and Swift cannot
handle headers of this size. Solum is the first one to have this issue

As a temporary hack to fix Solum's gate, we are increasing
the value of the max_header_size parameter in our "lib" script.

This patch makes this settings global to all projects using devstack,
so that in a near future, if a project has a service_catalog header
bigger than 8192, it doesn't have the same problems we had.

Closes bug 1316585

Change-Id: I5c15f8f9531839353c3d99e46d920688058ec33c
2014-05-06 15:18:47 +02:00
Yves-Gwenael Bourhis
f894c2ab80 Do not modify rsyslog files if rsyslog is not used.
Swift was missing an 'if [[ $SYSLOG != "False" ]]' statement which is used
by other services, and therefor failed with a 'No such file or directory'
error when 'SYSLOG=False' was set in localrc.

Closes-Bug: 1308461

Change-Id: I8655a955ebb322516d92bee418b93d4cc23bdc5c
2014-04-17 14:07:51 +02:00
Longgeek
fd034f0085 Increase in the full path to mkfs.xfs(/sbin/mkfs.xfs).
Xfsprogs package has been installed. This is the cause of the error stack does not have
permission to perform mkfs.xfs command rather mkfs.xfs command in /sbin/
path, stack in order to perform mkfs.xfs must add the full path or use
the sudo command mode.

Fixed bug #1292466

Change-Id: I488133539331b4a0034a2afb4e75665904754245
2014-03-25 22:44:56 +08:00
Jenkins
52e165af79 Merge "move the rsyslogd restart" 2014-03-21 06:30:42 +00:00
Sean Dague
ad7e8c63e6 move the rsyslogd restart
it's not clear why swift start is the place where an rsyslogd start
is happening, we should really only make this change when we actually
change a file on disk.

Also, use rsyslogd's -HUP signal directly instead of the system init
scripts which are typically doing a stop and start, and apparently
racing under some circumstances.

Change-Id: I1b9891313d67b1da2ca2582e532b2536a81f9b25
Closes-Bug: #1262906
2014-03-19 19:13:20 -04:00
Joe Gordon
c381a54db1 Disable ceilometer's swift middleware
This middleware is spamming rsyslog with rabbitmq debug logs, making
this middleware practically unusable in combination with rsyslog. Because of
this, the rsyslog logs now account for 35% percent of the logs we store
in logstash. Until the underlying problem is solved disable the
offending code.

Change-Id: I50a73ae6beb1a11c41225340779fe8d7a1081e46
Related-Bug: #1294789
2014-03-19 11:09:31 -07:00
Samuel Merritt
f19ccb6359 Take tempurl out of Swift pipeline additions
Swift commit 165dd44 added tempurl to the sample config, so now it
appears twice in the default devstack-installed configuration. This
commit removes tempurl from $SWIFT_EXTRAS_MIDDLEWARE so that it only
appears once in the generated proxy pipeline.

Change-Id: I4204b2a444312ab87c17f5fb296a43818a4528a6
2014-03-10 13:12:55 +01:00
Dean Troyer
1eae3e155a Make stop_swift() more robust for Grenade
stop_swift() wasn't calling screen_stop() so the pid files and screen
sessions were not being cleaned up.  DevStack doesn't really care but
Grenade does for the 'base' copy of DevStack.  This should be backported
to stable/havana for this reason.

Change-Id: Ib5afb321cef2b7ad74e69a3fd0d1dad469f78b11
2014-03-06 11:49:30 -06:00
Attila Fazekas
0e57b967e5 Devstack install can fail on missing xinetd.d/rsync config
Assuming if the system does not have the xinetd.d/rsync,
the dedicated service is the prefered way.

Change-Id: Ic42651c5c3fb5bf0099786ca81a7bd06ace896a8
2014-02-28 17:31:39 +01:00
Ian Wienand
aee18c749b Enforce function declaration format in bash8
Check that function calls look like ^function foo {$ in bash8, and fix
all existing failures of that check.  Add a note to HACKING.rst

Change-Id: Ic19eecb39e0b20273d1bcd551a42fe400d54e938
2014-02-28 07:59:03 +11:00
Ian Wienand
f8e86bb312 Un-nest generate_swift_config
I think this got accidentally nested during some code refactorizing?

Change-Id: Ie486cf3395b6acf3a10eb32e116d39ca56134b9f
2014-02-21 15:40:19 +11:00
Steve Martinelli
19685428e3 Change most keystoneclient commands to openstacklient in libs
migrated most keystoneclient commands from the following libs:
 ceilometer
 cinder
 ironic
 keystone
 marconi
 neutron
 nova
 savanna
 swift
 trove

Also need to set and unset openstackclient specific environment
variables from stack.sh

Change-Id: I725f30bc08e1df5a4c5770576c19ad1ddaeb843a
2014-02-14 21:30:57 -06:00
Sahid Orentino Ferdjaoui
1814e671d3 Fix bug "Invalid OpenStack Nova credentials." on the gate
During the process, when create_userrc.sh tries to creates
certificates and sourcable rc, it assumes that all users have
the same password.

Change-Id: Ifb57a43aad439ffe041e98465719a8a8eceae544
Closes-Bug: #1260723
2014-02-12 17:36:35 +01:00
Jenkins
7719d4aca8 Merge "Begin is_service_enabled() cleanup" 2014-02-12 07:19:11 +00:00
Jenkins
34b81e7a39 Merge "s3_token has been moved to keystoneclient." 2014-02-11 11:16:20 +00:00
Dean Troyer
e4fa721322 Begin is_service_enabled() cleanup
This converts the special cases in the is_service_enabled() function to call
individual functions declared by the projects.  This allows projects that
are not in the DevStack repo and called via the extras.d plugin to handle
an equivalent service alias.

* Ceilometer
* Cinder
* Glance
* Neutron
* Nova
* Swift

TODO: remove the tests from is_service_enabled() after a transition period

Patch Set 2: Rebased

Change-Id: Ic78be433f93a9dd5f46be548bdbd4c984e0da6e7
2014-02-07 10:06:21 -06:00
Chmouel Boudjnah
f36a9b2136 No need to loop over with pkill -f
I guess four times is better than one but if we need four times to kill
swift processes there is something pretty bad with it.

Change-Id: Id2ea2f4ca60feb9fddc7b3181063760d2044b421
2014-02-03 23:44:47 +01:00
Chmouel Boudjnah
891277fbbd s3_token has been moved to keystoneclient.
Change-Id: I6ffe756d517d11f323bd0c5d3b877d9a9f739a3b
2014-02-03 21:07:03 +00:00
Jenkins
9b4fe5d0ce Merge "Copy container-sync-realms.conf in /etc/swift" 2014-01-31 17:06:38 +00:00
Dean Troyer
4237f590b7 Generate Tempest service list rather than hard-code it
The list of services that Tempest used to set its 'service_available'
config values was hard-coded. To be plugin-friendly have each
service (project) add its name to the TEMPEST_SERVICES variable
and use that for setting the 'service_avilable' values.

Change-Id: I208efd7fd0798b18ac2e6353ee70b773e84a2683
2014-01-29 17:25:45 -06:00
Chmouel Boudjnah
f2c1a712e8 Copy container-sync-realms.conf in /etc/swift
We need the new container-sync realms configuration or we will get a
nasty harmless error opening file at swift proxy startup.

Change-Id: If939da305dcb9403c418219032ac6b50b0099bd3
Closes-Bug: 1274295
2014-01-29 21:40:26 +00:00
Dean Troyer
bb8227ce69 Fix Swift process kill
stop_swift() was not killing all swift processes properly.  Change to
manually clean up all screen services with pkill.

Closes-bug: 1268794
Change-Id: Ibb7a2e0dd10a313609f05963264087f82f6f00e2
2014-01-27 16:03:53 -06:00
Dirk Mueller
25049cd23d Use --tenant-id, not --tenant_id
Change-Id: I0e3d65d5b69ac82cbf7ee6ffc41ead369af8c126
2014-01-09 13:55:28 +01:00
Chmouel Boudjnah
63d9f3e550 Fix bad copy and paste in lib/swift
Change-Id: I3b7526b52867525b1d7aa634aa8163c520a92f97
2013-12-21 01:21:59 -08:00
Jenkins
ae3f335626 Merge "Fix the amount of workers spawned for non proxies" 2013-12-12 19:29:12 +00:00
Chmouel Boudjnah
86d9aed67d Fix the amount of workers spawned for non proxies
We were running as auto so swift would spawn a lot of processes
consuming memory and CPU which are not really neeeded in a devstack env
(and bad for the jenkins vm).

Closes-Bug: 1259548
Change-Id: I6b5266186168fe99568dda5453b436c2f9cfedb3
2013-12-10 15:38:51 +00:00
Jenkins
02ef0dbfb0 Merge "add assertions for blind grep" 2013-12-05 00:19:49 +00:00
Jenkins
bddaf0afb6 Merge "Allow deploying keystone with SSL certificates" 2013-12-04 05:36:40 +00:00
Peter Portante
8afc893536 Use the swift logging adapter for txn IDs
Change-Id: I2b2308eb9606279cffc1965fc3b86e9597d63e87
Signed-off-by: Peter Portante <peter.portante@redhat.com>
2013-11-26 11:53:57 -05:00
Peter Portante
cee4b3bddf Shorten PKI token logging
Log only the first 12 characters of auth-token for the Swift
API, since PKI based auth-tokens from keystone can huge (>> 2K).

Also tidy up a comment.

Change-Id: Ib784e8ecdcb7e371fe03458c7fd82b4460fa82b9
Signed-off-by: Peter Portante <peter.portante@redhat.com>
2013-11-26 11:53:57 -05:00
Jamie Lennox
bd24a8d0f8 Allow deploying keystone with SSL certificates
Allow providing certificates through environment variables to be used
for keystone, and provide the basis for doing this for other services.
It cannot be used in conjunction with tls-proxy as the service provides
it's own encrypted endpoint.

Impletmenting: blueprint devstack-https
Change-Id: I8cf4c9c8c8a6911ae56ebcd14600a9d24cca99a0
2013-11-25 22:27:51 +00:00
Jenkins
e2ebd2315e Merge "Make use of STACK_USER instead of relying on USER" 2013-11-22 13:47:12 +00:00
Joe Gordon
d254da5213 Set swift timeouts higher
Devstack is commonly run in a small slow environment, so bump the
timeouts up.

node_timeout is how long between read operations a node takes to
respond to the proxy server
conn_timeout is all about how long it takes a connect() system call to
return

Change-Id: Ib437466a3fc9274b8aa49b19e4fe7fa26f553419
Co-Authored-By: Peter Portante <peter.portante@redhat.com>
Related-Bug: #1252514
2013-11-20 11:29:33 -08:00
Stephan Renatus
e578effb33 Make use of STACK_USER instead of relying on USER
Quite easily one ends up calling ./stack.sh in an environment that,
albeit being user "stack" (for example), doesn't quite meet the
expectations of devstack.  The errors that follow can be rather hard to
track down, as the dependency on `USER` is not mentioned.

To remedy this situation, this commit

- uses STACK_USER instead of USER and
- mentions that dependency in the script headers of lib/*

Change-Id: If4cdc39b922ea64b4c0893a0e695ec06349fccc5
2013-11-19 13:39:58 +01:00
Joe Gordon
66c5424980 Bump SWIFT_LOOPBACK_DISK_SIZE_DEFAULT over swift max_file_size
Swift is returning 50x error codes because its disk is too small, set
size bigger then max_file_size in an attempt to fix the problem, or at
least reduce it.

"we create a 4GB device, but swift thinks it can write 5GB, hence fail"
--sdague

This patch based off of Iccd6368e4df71abb5ccfe7d361c64d86e1071d35

Change-Id: Ib56a98cd74e7edf1fa90facc25c72632d43180f1
Related-Bug: #1225664
2013-11-12 16:38:02 -08:00
Jenkins
b7c11a0f98 Merge "Fix some Markdown formatting issues" 2013-10-31 14:19:15 +00:00
Jenkins
8e285072c9 Merge "Fix shocco errors and warnings" 2013-10-31 14:18:32 +00:00
Jenkins
04067ca16d Merge "Enables Swift crossdomain middleware by default" 2013-10-31 13:35:46 +00:00
Joe H. Rahme
1ce2ffd15f Enables Swift crossdomain middleware by default
This step is needed to enable its testing in Tempest. The patch adds a
variable SWIFT_EXTRAS_MIDDLEWARE_NO_AUTH that holds a list of
middlewares inserted in the pipeline before authentication middlewares
(tempauth, keystoneauth, ...).

Change-Id: I1927103feff997a354ccf82ccf12aa77db083ad3
2013-10-25 17:26:47 +02:00
Adam Spiers
6a5aa7c6a2 Fix some Markdown formatting issues
Address miscellaneous issues with Markdown formatting in comments which
are consumed by shocco when generating the online documentation.

Change-Id: I953075cdbddbf1f119c6c7e35f039e2e54b79078
2013-10-24 17:38:19 +01:00
Adam Spiers
cb961597cc Fix shocco errors and warnings
A few Markdown-oriented issues were causing Docutils errors to
leak into the end-user docs on http://devstack.org

Change-Id: I51fa9698afb1bfb48596478d83bd1fdcd84ac52e
2013-10-24 15:43:05 +01:00
DennyZhang
23178a997a add assertions for blind grep
blind grep is error-prone.
Add assertions for errors we can not handle

Change-Id: Ibe19085545ecc848498506e8b8ee14e71825b273
2013-10-22 17:12:18 -05:00
Sean Dague
101b424842 fix whitespace in the rest of lib/*
this brings this in line with bash8 checker

Change-Id: Ib34a2292dd5bc259069457461041ec9cd4fd2957
2013-10-22 13:02:23 -04:00
Jenkins
d248502331 Merge "lib/swift variable changes and dd replaced by truncate" 2013-10-14 18:47:21 +00:00
Attila Fazekas
e6024413ae lib/swift variable changes and dd replaced by truncate
- ${SWIFT_DATA_DIR}/drives/images/swift.img replaced by
${SWIFT_DISK_IMAGE}.

- using truncate -s command instead of dd over seeking

Change-Id: I0dd29af3247ba7819ef0c74775412074b6b62017
2013-10-04 08:58:26 +02:00
Cyril Roelandt
d9883407e9 Revert "Revert "Swift: configure Ceilometer when it is enabled""
Commit 6650fda680310e71b5dda7764bf4033f670d90f0 is no longer needed:
https://review.openstack.org/#/c/46048 has been merged.

This reverts commit 6650fda680310e71b5dda7764bf4033f670d90f0.

Change-Id: I47d28a292667eb8ece2061c0ef19c7c925e5747c
2013-09-27 15:21:23 +00:00
Jamie Lennox
5470701e10 Fix swift httpd on fedora
Implements a fedora equivalent of ubuntu's sites-enabled and moves
enabling of mod_wsgi to the installation period so that it doesn't have
to be handled in a platform dependant way later.

Fixes: bug 1226363
Change-Id: I85325179f1792d985b0375572abfe8c8a82fecc3
2013-09-24 10:48:01 +10:00
Jenkins
e4bf7fd239 Merge "Remove change_apache_user_group function" 2013-09-23 16:30:41 +00:00
Jenkins
9c3b0cc4e4 Merge "Allow replacing a user variable in a swift template" 2013-09-18 14:57:28 +00:00