1219 Commits

Author SHA1 Message Date
Zuul
73201cc12d Merge "Deprecate expirer options" 2025-02-08 02:26:03 +00:00
Clay Gerrard
b69a2bef45 Deprecate expirer options
The following configuration options are deprecated:

 * expiring_objects_container_divisor
 * expiring_objects_account_name

The upstream maintainers are not aware of any clusters where these have
been configured to non-default values.

UpgradeImpact:

Operators are encouraged to remove their "container_divisor" setting and
use the default value of 86400.

If a cluster was deployed with a non-standard "account_name", operators
should remove the option from all configs so they are using a supported
configuration going forward, but will need to deploy stand-alone expirer
processes with legacy expirer config to clean-up old expiration tasks
from the previously configured account name.

Co-Authored-By: Alistair Coles <alistairncoles@gmail.com>
Co-Authored-By: Jianjian Huo <jhuo@nvidia.com>
Change-Id: I5ea9e6dc8b44c8c5f55837debe24dd76be7d6248
2025-02-07 08:33:34 -08:00
Tim Burke
0dfa38d025 docs: Fix version call-out for stale_worker_timeout
Related-Change: I8227939d04fda8db66fb2f131f2c71ce8741c7d9
Change-Id: I149a2df2d942bba02049947865b000c9cf1a89bc
2025-01-16 14:21:55 -08:00
Tim Burke
ae6300af86 wsgi: Reap stale workers (after a timeout) following a reload
Add a new tunable, `stale_worker_timeout`, defaulting to 86400 (i.e. 24
hours). Once this time elapses following a reload, the manager process
will issue SIGKILLs to any remaining stale workers.

This gives operators a way to configure a limit for how long old code
and configs may still be running in their cluster.

To enable this, the temporary reload child (which waits for the reload
to complete then closes the accept socket on all the old workers) has
grown the ability to send state to the re-exec'ed manager. Currently,
this is limited to just the set of pre-re-exec child PIDs and their
reload times, though it was designed to be reasonably extensible.

This allows the new manager to recognize stale workers as they exit
instead of logging

   Ignoring wait() result from unknown PID ...

With the improved knowledge of subprocesses, we can kick the log level
for the above message up from info to warning; we no longer expect it
to trigger in practice.

Drive-by: Add logging to ServersPerPortStrategy.register_worker_exit
that's comparable to what WorkersStrategy does.

Change-Id: I8227939d04fda8db66fb2f131f2c71ce8741c7d9
2025-01-16 13:44:21 +11:00
Tim Burke
128124cdd8 Remove py2-only code paths
Change-Id: Ic66b9ae89837afe31929ce07cc625dfc28314ea3
2025-01-13 13:36:41 -08:00
Zuul
06e09b9ece Merge "Drop py2 support" 2025-01-01 07:20:05 +00:00
Tim Burke
7367907c58 Drop py2 support
* Remove py2 gate jobs.
* Build non-universal, py3-only wheels.
* Specify minimum python version in package metadata.
* Clean up requirements/constraints/bindep (a little, anyway).

Change-Id: I53153c4fde043e964e1daa7bbf2089e0471dede2
2024-12-20 09:11:14 -08:00
ngcjny
17f77b2d76 docs: Changed OS version to RHEL 9 and CentOS Stream 9.
Changed OS version from RHEL 7 and CentOS 7 to RHEL 9 and
CentOS Stream 9.
Changed python to python3.
Changed yum command to dnf command.

Change-Id: Ie1e815c0434255e77ef5e9103576f85d9d6490ae
2024-12-20 16:11:33 +00:00
Zuul
71696d3a83 Merge "Remove PrefixLoggerAdapter and SwiftLoggerAdapter" 2024-11-14 12:51:08 +00:00
Shreeya Deshpande
f88efdb4df Remove PrefixLoggerAdapter and SwiftLoggerAdapter
In order to modernize swift's statsd configuration we're working to
separate it from logging. This change is a pre-requisite for the
Related-Change in order to simplfy the stdlib base logger instance
wrapping in a single extended SwiftLogAdapter (previously LogAdapter)
which supports all the features swift's servers/daemons need
from our logger instance interface.

Related-Change-Id: I44694b92264066ca427bb96456d6f944e09b31c0

Change-Id: I8988c0add6bb4a65cc8be38f0bf527f141aac48a
2024-11-13 15:40:41 -05:00
Zuul
38556600d7 Merge "docs: add new utils modules to source doc" 2024-11-04 13:06:51 +00:00
Clay Gerrard
df22032d79 object-expirer: add round_robin_cache_size option
Drive-Bys:
 * DRY out redundent configuration examples in expiring objects overview
   documentation.
 * Add missing delay_reaping man page docs.

Co-Authored-By: Alistair Coles <alistairncoles@gmail.com>

Change-Id: I8879dbd13527233c878dff764ec411ce9619ee39
2024-11-01 09:54:54 +00:00
Alistair Coles
c877efb7ec docs: add new utils modules to source doc
Some submodules have previously been broken out of the utils
module. This patch adds automodule directives for the new modules to
the source documentation.

Change-Id: I985205fda95f01d226e81dcbfe0d6dbbb5b69c96
Related-Change:  Ic4b5005e3efffa8dba17d91a41e46d5c68533f9a
2024-10-29 12:48:25 +00:00
Takashi Natsume
29b0e478a7 Replace deprecated datetime.utcfromtimestamp()
The datetime.utcfromtimestamp() is deprecated in Python 3.12.
Replace datetime.utcfromtimestamp() with datetime.fromtimestamp().

Change-Id: I01d6b94de394413aa13a045ab2c36504e65a6f5a
Signed-off-by: Takashi Natsume <takanattie@gmail.com>
2024-10-01 21:53:46 +09:00
Zuul
6a0153f545 Merge "docs: Simplify reload-process-tree SVGs" 2024-08-27 23:00:04 +00:00
Tim Burke
2e11ac32da docs: Simplify reload-process-tree SVGs
Those were so unwieldy as to be uneditable before.

Change-Id: Ic9f4a0ea6b8e18e1624c516890ab69884a299773
2024-08-27 14:23:39 -07:00
Zuul
82debd2cda Merge "docs: Add tempurl/formpost metrics" 2024-05-28 02:36:47 +00:00
Tim Burke
a3ee04152d docs: Update further-reading URL for cross-domain policies
The old one now just redirects to https://developer.adobe.com/

Change-Id: Iba281bb8dceedef9bbb702abf0b93473bf91d9f7
2024-05-15 08:28:03 -07:00
indianwhocodes
11eb17d3b2 support x-open-expired header for expired objects
If the global configuration option 'enable_open_expired' is set
to true in the config, then the client will be able to make a
request with the header 'x-open-expired' set to true in order
to access an object that has expired, provided it is in its
grace period. If this config flag is set to false, the client
will not be able to access any expired objects, even with the
header, which is the default behavior unless the flag is set.

When a client sets a 'x-open-expired' header to a true value for a
GET/HEAD/POST request the proxy will forward x-backend-open-expired to
storage server. The storage server will allow clients that set
x-backend-open-expired to open and read an object that has not yet
been reaped by the object-expirer, even after the x-delete-at time
has passed.

The header is always ignored when used with temporary URLs.

Co-Authored-By: Anish Kachinthaya <akachinthaya@nvidia.com>
Related-Change: I106103438c4162a561486ac73a09436e998ae1f0
Change-Id: Ibe7dde0e3bf587d77e14808b169c02f8fb3dddb3
2024-04-26 10:13:40 +01:00
Mandell Degerness
5961ba0ca7 expirer: account and container level delay_reaping
The object expirer can be configured to delay the reaping of
objects from disk after their expiration time using account
and container level delay_reaping values. The delay_reaping
value of accounts and containers in seconds is configured in
the object server config. The object expirer references these
configured values to only reap objects from specified accounts
and containers after their corresponding delays.

The goal of the delay_reaping feature is to prevent accidental or
premature data loss if an object marked for deletion with the
'x-delete-at' feature should not be reaped immediately, for
whatever reason.

Configuring the delay_reaping value at a granular account and
container level is beneficial for being able to keep storage
capacity consumption in control while maintaining a desired
data recovery window.

This patch also adds a sample configuration, documentation, and
tests for bad configurations and grace period functionality.

Co-Authored-By: Anish Kachinthaya <akachinthaya@nvidia.com>
Change-Id: I106103438c4162a561486ac73a09436e998ae1f0
2024-04-25 13:59:36 -07:00
Alistair Coles
cc27780042 docs: add discussion of content-type metadata
Change-Id: I2aa13e2b23bda86c51ef6aaa69ea3fd0075bb9ad
2024-03-06 11:02:15 +00:00
Clay Gerrard
5af7719ef3 Support swift.proxy_logging_status in request env
When logging a request, if the request environ has a
swift.proxy_logging_status item then use its value for the log
message status int.

The swift.proxy_logging_status hint may be used by other middlewares
when the desired logged status is different from the wire_status_int.

If the proxy_logging middleware detects a client disconnect then any
swift.proxy_logging_status item is ignored and a 499 status int is
logged, as per current behaviour. i.e.:

  * client disconnect overrides swift.proxy_logging_status and the
    response status
  * swift.proxy_logging_status overrides the response status

If the proxy_logging middleware catches an exception then the logged
status int will be 500 regardless of any swift.proxy_logging_status
item.

Co-Authored-By: Alistair Coles <alistairncoles@gmail.com>
Change-Id: I9b5cc6d5fb69a2957b8c4846ce1feed8c115e6b6
2023-12-20 17:31:06 +00:00
Zuul
966340aeed Merge "Remove per-service auto_create_account_prefix" 2023-12-01 01:48:57 +00:00
Takashi Kajinami
49b19613d2 Remove per-service auto_create_account_prefix
The per-service option was deprecated almost 4 years ago[1].

[1] 4601548dabdec0a4dc89cefba11e963217255be3

Change-Id: I45f7678c9932afa038438ee841d1b262d53c9da8
2023-11-22 01:58:03 +09:00
Tim Burke
c94e1c1513 docs: Document WSGI server process management
Talk about graceful shutdowns, seamless reloads, and the swift-reload helper.

Change-Id: I9c86d1ce9853840d73e2107a6d79b2454c21438a
2023-11-09 14:09:48 -08:00
Jake Yip
8a2c8b128b Update doc for include_service_catalog with app cred
If swift is used with an Application Credential with access_rules [1],
the catalog needs to be sent with the token for it to be evaluated by
keystonemiddleware.

[1]: https://docs.openstack.org/keystone/2023.1/user/application_credentials.html#access-rules

Change-Id: I0b02821722ffc819bc8a97281a33391072242ffc
2023-08-11 13:30:34 +10:00
Tim Burke
0c9b545ea7 docs: Clean up proxy logging docs
Change-Id: I6ef909e826d3901f24d3c42a78d2ab1e4e47bb64
2023-08-04 11:30:42 -07:00
Pete Zaitcev
dd664c47db doc/SAIO: Update the Fedora section
The never ending changes in package names march on.
This is for Fedora 38.

Change-Id: Idffd1df7e2f23681eb7d7bf1717471b594612dbc
2023-08-03 15:00:06 -05:00
Alistair Coles
8e051c5b8e docs: Fix link to sphinx project page
Change-Id: I5e75a359660315a34ec36f5cb748808257f4185a
2023-07-21 10:19:49 +01:00
Jianjian Huo
cb1e584e64 Object-server: keep SLO manifest files in page cache.
Currently, SLO manifest files will be evicted from page cache
after reading it, which cause hard drives very busy when user
requests a lot of parallel byte range GETs for a particular
SLO object.

This patch will add a new config 'keep_cache_slo_manifest', and
try keeping the manifest files in page cache by not evicting them
after reading if config settings allow so.

Co-Authored-By: Tim Burke <tim.burke@gmail.com>
Co-Authored-By: Clay Gerrard <clay.gerrard@gmail.com>
Co-Authored-By: Alistair Coles <alistairncoles@gmail.com>
Change-Id: I557bd01643375d7ad68c3031430899b85908a54f
2023-07-07 12:48:24 -07:00
Tim Burke
9b8e5a5c95 docs: Add tempurl/formpost metrics
Change-Id: I04478c44957032e911069bcd4859caf3baaddb63
2023-05-30 11:38:42 -07:00
Tim Burke
1f298714af docs: Format metrics in fixed-width font, not italics
Change-Id: I6fc9eaf0903bdbe4ccb82c4e7647478a1eef9785
2023-05-30 11:38:42 -07:00
Tim Burke
307315bde2 docs: Move metric name/description tables out to separate page(s)
Offer it both by service and as a single, more easily searchable, page.

That admin guide is *still* too long, but this should help a bit.

Change-Id: I946c72f40dce2f33ef845a0ca816038727848b3a
2023-05-30 11:38:42 -07:00
Zuul
a0c5ac29a1 Merge "docs: Remove references to out-dated install guides" 2023-05-17 00:20:06 +00:00
Tim Burke
cff092b682 docs: Update versions in Getting Started doc
Change-Id: Ibed9dc0afbdb922d06f7798bdac01db7c55b19f1
2023-05-16 15:36:00 -07:00
Tim Burke
ca0dd8d703 docs: Remove references to out-dated install guides
Change-Id: Idbff951506ee2f3b288eda00217c902314393877
2023-05-16 15:31:13 -07:00
Tim Burke
716ae48eb8 docs: Fix broken paste/pastedeploy links
Closes-Bug: #2016463
Change-Id: Id500a2429b7412823970a06e3e82b1d1646c70b8
2023-04-27 13:52:55 -07:00
Tim Burke
ed1f5193e5 docs: Clean up cross-domain doc formatting; call out CWE-942
Change-Id: I7ab605d48972e8dc06e630d160c745baeea91355
2023-04-19 12:03:27 +01:00
Wei LingFei
5032b42b10 Update url
The OpenStack project is currently maintained on opendev.org, with github.com serving as a mirror repository.

Replace the source code repository address for the python-swiftclient project from github.com to opendev.org.

Change-Id: I650a80cb45febc457c42360061faf3a9799e6131
2023-03-24 14:44:18 +08:00
Tim Burke
cbba65ac91 quotas: Add account-level per-policy quotas
Reseller admins can set new headers on accounts like

   X-Account-Quota-Bytes-Policy-<policy-name>: <quota>

This may be done to limit consumption of a faster, all-flash policy, for
example.

This is independent of the existing X-Account-Meta-Quota-Bytes header, which
continues to limit the total storage for an account across all policies.

Change-Id: Ib25c2f667e5b81301f8c67375644981a13487cfe
2023-03-21 17:27:31 +00:00
Zuul
2a90eadc0d Merge "docs: Add memcache.conf config doc" 2023-02-28 22:44:07 +00:00
Alexander Fadeev
49ba1bc33a Present pytest steps in development guidelines
Explain how to prepare venv with `tox devenv`

Closes-Bug: #2003984
Change-Id: Idc536034a36646de9c1880c8d0bc0a387b130ac2
2023-02-25 02:01:07 +02:00
Matthew Oliver
2edd3e65da docs: Add memcache.conf config doc
Change-Id: I29d00e939a3842bd064382575955fa3e255242eb
2023-02-22 16:18:37 +11:00
Tim Burke
ef155bd74a Switch to pytest
nose has not seen active development for many years now. With py310, we
can no longer use it due to import errors.

Also update lower contraints

Closes-Bug: #1993531
Change-Id: I215ba0d4654c9c637c3b97953d8659ac80892db8
2022-12-09 11:38:02 -08:00
Tim Burke
5c6407bf59 proxy: Add a chance to skip memcache for get_*_info calls
If you've got thousands of requests per second for objects in a single
container, you basically NEVER want that container's info to ever fall
out of memcache. If it *does*, all those clients are almost certainly
going to overload the container.

Avoid this by allowing some small fraction of requests to bypass and
refresh the cache, pushing out the TTL as long as there continue to be
requests to the container. The likelihood of skipping the cache is
configurable, similar to what we did for shard range sets.

Change-Id: If9249a42b30e2a2e7c4b0b91f947f24bf891b86f
Closes-Bug: #1883324
2022-08-30 18:49:48 +10:00
Zuul
24acc6e56b Merge "Add backend rate limiting middleware" 2022-08-30 07:18:57 +00:00
Zuul
d8af3d7a0d Merge "Various doc formatting cleanups" 2022-08-15 19:51:39 +00:00
Zuul
fc6555d9f3 Merge "Update "Getting Started" requirements" 2022-08-10 10:52:16 +00:00
jiaqi07
3a71df1335 Stop using unicode literals in docs conf.py
Change-Id: I8ce6749c3d634c68e5d4a15d812a046514cc35f5
2022-08-03 00:01:30 +00:00
Tim Burke
52a4fe37aa Various doc formatting cleanups
* Get rid of a bunch of accidental blockquote formatting
* Always declare a lexer to use for ``.. code::`` blocks

Change-Id: I8940e75b094843e542e815dde6b6be4740751813
2022-08-02 14:28:36 -07:00