Commit Graph

11 Commits

Author SHA1 Message Date
Dirk Mueller 5259c08c09 Always close all passed in fds beyond sensible_fd_limit on launch
Change Idd98c183eca3e2df8648fc0f37d27fe9cc6d0563 stopped closing
filedescriptors beyond the sensible_fd_limit. With this patch
the previous behavior is restored. We can close the fds more efficiently
by just iterating over /proc/self/fd on Linux and only change
the rlimit/MAXFD setting when successful.

Change-Id: I3b481ddd14ae2b948270d715aad157cf3996def7
2019-03-23 11:30:30 +01:00
Dirk Mueller c0a8699820 Run rootwrap with lower fd ulimit by default
On Python 2.x, a subprocess.Popen() with close_fds=True will
fork and then close filedescriptors range(3..os.sysconf("SC_OPEN_MAX")),
which thanks to Kernel PTI (Kaiser patches) is significantly slower
in 2018 when the range is very large. With a soft limit of 1048576,
benchmark.py reports an overhead of ~ 400ms without this patch and 2ms
with the patch applied. This patch adds a configuration option and
sets a more sensible default of 1024 file descriptor limit by default.

Closes-Bug: 1796267
Change-Id: Idd98c183eca3e2df8648fc0f37d27fe9cc6d0563
2018-10-09 12:12:46 +02:00
IWAMOTO Toshihiro 6285b63572 Allow rootwrap-daemon to timeout and exit
If the client side abnormally exits, its rootwrap daemon cannot
receive a shutdown message and will be left forever. Let it timeout
and exit to save such cases.

Change-Id: I783717b5fa019371747b98bf92965b6e689603f6
Related-bug: #1658973
Related-bug: #1658977
Related-bug: #1663458
2017-03-02 10:58:04 +09:00
Ronald Bradford 6d104a3b41 Remove unused use-syslog-rfc-format option
Remove this option that appears ignored. For reference by similar name
only, this option is marked as deprecated and to be removed from oslo.log
in Mitaka. Refer to I9b77899fe437d359df2a15961866b194b564ca48.

Change-Id: I9a97b53d829a9ca6b92ee4b545f616a3bc5b25be
2016-02-04 18:37:40 +00:00
Bogdan Dobrelya 1649ed1725 To honor RFC5424 add use_syslog_rfc_format config option
Since the rootwrap code was graduated to a separate library,
This change completes one from oslo-incubator:
Backport 'ident' from python 3.3 for Oslo's SysLogHandler
(with commit 79e8a9a08daf563aa8a8d9280c9a6a27dcafc8f2)

To honor RFC5424 add use_syslog_rfc_format config option
(default False, would be deprecated in J after existing
syslog format deprecation) which adds APP-NAME to syslog message
before MSG part to reflect application or service name.
Usable only with use_syslog, otherwise ignored.

During J, the default logging format for syslog should be changed
to always provide APP-NAME, thus use_syslog_rfc_format could be
deprecated in J as well.

Closes-bug: #904307

Change-Id: Icff9db07d543738e092a8826e8a0d2e4b213fc38
Signed-off-by: Bogdan Dobrelya <bdobrelia@mirantis.com>
2014-02-25 19:18:13 +02:00
Thierry Carrez 42255ccae8 Discontinue usage of oslo-rootwrap
Rootwrap should be used from specific console_scripts calling into
oslo.rootwrap.cmd:main, rather than using the specific oslo-rootwrap
wrapper. This matches how nova and cinder now consume oslo.rootwrap,
and ensures a smooth upgrade path.

This change aligns the documentation and shipped files to match how
oslo.rootwrap should be used now.

Change-Id: If01b8840c971d1c6d5c88c7698f5d6a2bf8fd5f0
2014-01-28 09:50:36 +01:00
Stanislav Kudriashev 79b4316942 Fix spelling errors in comments
Change-Id: Icc8f26d8df00e52ef10781c91071356daa799afa
2013-12-27 13:41:04 +02:00
Thierry Carrez d9edf600e7 Use oslo-rootwrap in config directory names
Use oslo-rootwrap rather than oslo.rootwrap in directory names
(/etc/oslo-rootwrap and /usr/share/oslo-rootwrap), as suggested by
Chuck. Since this package is actually consumed through its binary
(oslo-rootwrap) rather than its library (oslo.rootwrap), this is
probably more appropriate.

Change-Id: I0e249d70937307b5fe116750923c20d487506c97
2013-12-03 15:51:57 +01:00
Thierry Carrez b94ef1a017 Ship with etc/oslo.rootwrap instead of etc/oslo
Ship default configuration file in etc/oslo.rootwrap to encourage best
packaging practices (packagers should deploy rootwrap.conf in
/etc/oslo.rootwrap rather than /etc/oslo/rootwrap or /etc/oslo).

Also change default filters_path directory from
/etc/oslo.rootwrap/rootwrap.d to /etc/oslo.rootwrap/filters.d
as it avoids redundancy and is more self-explanatory.

Change-Id: Iadf623571283cba1886bb27a5f55c59ba66c522f
2013-12-02 17:11:20 +01:00
Mark McLoughlin 0bfccbbc02 Remove unused etc/openstack-common.conf.test
This is unused since commit e0f57e92 removed the extensions module.

Change-Id: Ia24d01c42fc9fb2e12eea697d217b30d7d6b2a51
2013-01-21 13:10:53 +00:00
Thierry Carrez 9bb74cba08 Move rootwrap code to openstack.common
Copies current nova-rootwrap code to openstack.common, so that it
can be reused by Cinder and Quantum.

Implements blueprint common-rootwrap.

Before it can be used in projects, update.py needs to grow the
capability to deploy files in bin/ and etc/, as well as replacing
a placeholder text by the destination project name in source files
and binary names.

In this proposed version, the placeholder text is "oslo".

Change-Id: I8655d5b3cccacd1cc2225aa539339fb478615422
2012-12-19 14:06:12 +01:00