Fix typos discovered by codespell (#1997)

This commit is contained in:
Christian Clauss
2021-07-06 10:01:30 +02:00
committed by GitHub
parent 62aa1333cd
commit 75e52226a8
19 changed files with 32 additions and 32 deletions
+1 -1
View File
@@ -119,7 +119,7 @@ For example, the command in order to install Patroni together with dependencies
pip install patroni[etcd,aws]
Note that external tools to call in the replica creation or custom bootstap scripts (i.e. WAL-E) should be installed independently of Patroni.
Note that external tools to call in the replica creation or custom bootstrap scripts (i.e. WAL-E) should be installed independently of Patroni.
=======================
Running and Configuring
+1 -1
View File
@@ -166,7 +166,7 @@ When connecting from an application, always use a non-superuser. Patroni require
Testing Your HA Solution
--------------------------------------
Testing an HA solution is a time consuming process, with many variables. This is particularly true considering a cross-platform application. You need a trained system administrator or a consultant to do this work. It is not something we can cover in depth in the documentaiton.
Testing an HA solution is a time consuming process, with many variables. This is particularly true considering a cross-platform application. You need a trained system administrator or a consultant to do this work. It is not something we can cover in depth in the documentation.
That said, here are some pieces of your infrastructure you should be sure to test:
+1 -1
View File
@@ -228,7 +228,7 @@ Raft
- Q: Where to get the ``syncobj_admin`` utility?
A: It is installed together with ``pysyncobj`` module (python RAFT implementation), which is Patroni dependancy.
A: It is installed together with ``pysyncobj`` module (python RAFT implementation), which is Patroni dependency.
- Q: it is possible to run Patroni node without adding in to the consensus?
+11 -11
View File
@@ -682,7 +682,7 @@ Version 1.6.1
- Some improvements in logging infrastructure (Alexander Kukushkin)
Previously threre was a possibility to loose the last few log lines on shutdown because the logging thread was a ``daemon`` thread.
Previously there was a possibility to loose the last few log lines on shutdown because the logging thread was a ``daemon`` thread.
- Use ``spawn`` multiprocessing start method on python 3.4+ (Maciej Kowalczyk)
@@ -732,7 +732,7 @@ Version 1.6.1
If the method is executed from the REST API thread, it requires a separate cursor object to be created.
- Fix the problem of not promoting the sync standby that had a name contaning upper case letters (Alexander Kukushkin)
- Fix the problem of not promoting the sync standby that had a name containing upper case letters (Alexander Kukushkin)
We converted the name to the lower case because Postgres was doing the same while comparing the ``application_name`` with the value in ``synchronous_standby_names``.
@@ -1008,7 +1008,7 @@ Compatibility and bugfix release.
- Fix broken compatibility with postgres 9.3 (Alexander)
When opening a replication connection we should specify replication=1, beacuse 9.3 does not understand replication='database'
When opening a replication connection we should specify replication=1, because 9.3 does not understand replication='database'
- Make sure we refresh Consul session at least once per HA loop and improve handling of consul sessions exceptions (Alexander)
@@ -1093,7 +1093,7 @@ This version enables Patroni HA cluster to operate in a standby mode, introduces
- Immediately reserve the WAL position upon creation of the replication slot (Alexander Kukushkin)
Starting from 9.6, `pg_create_physical_replication_slot` function provides an additional boolean parameter `immediately_reserve`. When it is set to `false`, which is also the default, the slot doesn't reserve the WAL position until it receives the first client connection, potentially losing some segments required by the client in a time window between the slot creation and the intiial client connection.
Starting from 9.6, `pg_create_physical_replication_slot` function provides an additional boolean parameter `immediately_reserve`. When it is set to `false`, which is also the default, the slot doesn't reserve the WAL position until it receives the first client connection, potentially losing some segments required by the client in a time window between the slot creation and the initial client connection.
- Fix bug in strict synchronous replication (Alexander Kukushkin)
@@ -1333,7 +1333,7 @@ This version adds support for using Kubernetes as a DCS, allowing to run Patroni
**Upgrade notice**
Installing Patroni via pip will no longer bring in dependencies for (such as libraries for Etcd, Zookeper, Consul or Kubernetes, or support for AWS). In order to enable them one need to list them in pip install command explicitely, for instance `pip install patroni[etcd,kubernetes]`.
Installing Patroni via pip will no longer bring in dependencies for (such as libraries for Etcd, Zookeper, Consul or Kubernetes, or support for AWS). In order to enable them one need to list them in pip install command explicitly, for instance `pip install patroni[etcd,kubernetes]`.
**Kubernetes support**
@@ -1352,7 +1352,7 @@ In addition to using Endpoints, Patroni supports ConfigMaps. You can find more i
- Remove leader key on shutdown only when we have the lock (Ants)
Unconditional removal was generating unnecessary and missleading exceptions.
Unconditional removal was generating unnecessary and misleading exceptions.
**Improvements in patronictl**
@@ -1383,7 +1383,7 @@ In addition to using Endpoints, Patroni supports ConfigMaps. You can find more i
- Alter the behavior of ``patronictl failover`` (Alexander)
It will work even if there is no leader, but in that case you will have to explicitely specify a node which should become the new leader.
It will work even if there is no leader, but in that case you will have to explicitly specify a node which should become the new leader.
**Expose information about timeline and history**
@@ -1399,7 +1399,7 @@ In addition to using Endpoints, Patroni supports ConfigMaps. You can find more i
- Add new /sync and /async endpoints (Alexander, Oleksii Kliukin)
Those endpoints (also accessible as /synchronous and /asynchronous) return 200 only for synchronous and asynchornous replicas correspondingly (exclusing those marked as `noloadbalance`).
Those endpoints (also accessible as /synchronous and /asynchronous) return 200 only for synchronous and asynchronous replicas correspondingly (exclusing those marked as `noloadbalance`).
**Allow multiple hosts for Etcd**
@@ -1487,7 +1487,7 @@ Version 1.3.4
- Pass the consul token as a header (Andrew Colin Kissa)
Headers are now the prefered way to pass the token to the consul `API <https://www.consul.io/api/index.html#authentication>`__.
Headers are now the preferred way to pass the token to the consul `API <https://www.consul.io/api/index.html#authentication>`__.
- Advanced configuration for Consul (Alexander Kukushkin)
@@ -1805,7 +1805,7 @@ In addition, patronictl supports new ``pause`` and ``resume`` commands to toggle
Originally, ping_timeout and connect_timeout values were calculated from the negotiated session timeout. Patroni loop_wait was not taken into account. As
a result, a single retry could take more time than the session timeout, forcing Patroni to release the lock and demote.
This change set ping and connect timeout to half of the value of loop_wait, speeding up detection of connection issues and leaving enough time to retry the connection attempt before loosing the lock.
This change set ping and connect timeout to half of the value of loop_wait, speeding up detection of connection issues and leaving enough time to retry the connection attempt before losing the lock.
- Update Etcd topology only after original request succeed (Alexander)
@@ -1883,7 +1883,7 @@ When upgrading from v0.90 or below, always upgrade all replicas before the maste
See the :ref:`dynamic configuration <dynamic_configuration>` for the details on which parameters can be changed and the order of processing difference configuration sources.
The configuration file format *has changed* since the v0.90. Patroni is still compatible with the old configuration files, but in order to take advantage of the bootstrap parameters one needs to change it. Users are encourage to update them by referring to the :ref:`dynamic configuraton documentation page <dynamic_configuration>`.
The configuration file format *has changed* since the v0.90. Patroni is still compatible with the old configuration files, but in order to take advantage of the bootstrap parameters one needs to change it. Users are encourage to update them by referring to the :ref:`dynamic configuration documentation page <dynamic_configuration>`.
**More flexible configuration***
+1 -1
View File
@@ -57,7 +57,7 @@ For all health check ``GET`` requests Patroni returns a JSON document with the s
- ``GET /liveness``: always returns HTTP status code **200** what only indicates that Patroni is running. Could be used for ``livenessProbe``.
- ``GET /readiness``: returns HTTP status code **200** when the Patroni node is running as the leader or when PostgreSQL is up and running. The endpoint could be used for ``readinessProbe`` when it is not possible to use Kubenetes endpoints for leader elections (OpenShift).
- ``GET /readiness``: returns HTTP status code **200** when the Patroni node is running as the leader or when PostgreSQL is up and running. The endpoint could be used for ``readinessProbe`` when it is not possible to use Kubernetes endpoints for leader elections (OpenShift).
Both, ``readiness`` and ``liveness`` endpoints are very light-weight and not executing any SQL. Probes should be configured in such a way that they start failing about time when the leader key is expiring. With the default value of ``ttl``, which is ``30s`` example probes would look like:
+1 -1
View File
@@ -869,7 +869,7 @@ class WatchdogMonitor(object):
return triggered
# actions to execute on start/stop of the tests and before running invidual features
# actions to execute on start/stop of the tests and before running individual features
def before_all(context):
os.environ.update({'PATRONI_RESTAPI_USERNAME': 'username', 'PATRONI_RESTAPI_PASSWORD': 'password'})
context.ci = any(a in os.environ for a in ('TRAVIS_BUILD_NUMBER', 'BUILD_NUMBER', 'GITHUB_ACTIONS'))
+1 -1
View File
@@ -473,7 +473,7 @@ class RestApiHandler(BaseHTTPRequestHandler):
if not cluster.failover:
return 503, action.title() + ' failed'
except Exception as e:
logger.debug('Exception occured during polling %s result: %s', action, e)
logger.debug('Exception occurred during polling %s result: %s', action, e)
return 503, action.title() + ' status unknown'
def is_failover_possible(self, cluster, leader, candidate, action):
+1 -1
View File
@@ -232,7 +232,7 @@ class Config(object):
for name, value in (value or {}).items():
if name in self.__DEFAULT_CONFIG['standby_cluster']:
config['standby_cluster'][name] = deepcopy(value)
elif name in config: # only variables present in __DEFAULT_CONFIG allowed to be overriden from DCS
elif name in config: # only variables present in __DEFAULT_CONFIG allowed to be overridden from DCS
if name in ('synchronous_mode', 'synchronous_mode_strict'):
config[name] = value
else:
+1 -1
View File
@@ -634,7 +634,7 @@ class AbstractDCS(object):
_HISTORY = 'history'
_MEMBERS = 'members/'
_OPTIME = 'optime'
_STATUS = 'status' # JSON, containts "leader_lsn" and confirmed_flush_lsn of logical "slots" on the leader
_STATUS = 'status' # JSON, contains "leader_lsn" and confirmed_flush_lsn of logical "slots" on the leader
_LEADER_OPTIME = _OPTIME + '/' + _LEADER # legacy
_SYNC = 'sync'
+1 -1
View File
@@ -111,7 +111,7 @@ class HTTPClient(object):
# According to the documentation a small random amount of additional wait time is added to the
# supplied maximum wait time to spread out the wake up time of any concurrent requests. This adds
# up to wait / 16 additional time to the maximum duration. Since our goal is actually getting a
# response rather read timeout we will add to the timeout a sligtly bigger value.
# response rather read timeout we will add to the timeout a slightly bigger value.
kwargs['timeout'] = timeout + max(timeout/15.0, 1)
else:
kwargs['timeout'] = self._read_timeout
+1 -1
View File
@@ -84,7 +84,7 @@ class Ha(object):
self._disable_sync = 0
# We need following property to avoid shutdown of postgres when join of Patroni to the postgres
# already running as replica was aborted due to cluster not beeing initialized in DCS.
# already running as replica was aborted due to cluster not being initialized in DCS.
self._join_aborted = False
# used only in backoff after failing a pre_promote script
+1 -1
View File
@@ -53,7 +53,7 @@ class Bootstrap(object):
error_handler('Error when parsing {0} option {1}: value should be string value'
' or a single key-value pair'.format(tool, opt))
else:
error_handler('{0} options must be list ot dict'.format(tool))
error_handler('{0} options must be list or dict'.format(tool))
return user_options
def _initdb(self, config):
+1 -1
View File
@@ -36,7 +36,7 @@ class CancellableExecutor(object):
with self._lock:
if self._process is not None and self._process.is_running() and not self._process_children:
try:
self._process.suspend() # Suspend the process before getting list of childrens
self._process.suspend() # Suspend the process before getting list of children
except psutil.Error as e:
logger.info('Failed to suspend the process: %s', e.msg)
+3 -3
View File
@@ -353,7 +353,7 @@ class ConfigHandler(object):
def save_configuration_files(self, check_custom_bootstrap=False):
"""
copy postgresql.conf to postgresql.conf.backup to be able to retrive configuration files
copy postgresql.conf to postgresql.conf.backup to be able to retrieve configuration files
- originally stored as symlinks, those are normally skipped by pg_basebackup
- in case of WAL-E basebackup (see http://comments.gmane.org/gmane.comp.db.postgresql.wal-e/239)
"""
@@ -403,7 +403,7 @@ class ConfigHandler(object):
f.write_param(name, value)
# when we are doing custom bootstrap we assume that we don't know superuser password
# and in order to be able to change it, we are opening trust access from a certain address
# therefore we need to make sure that hba_file is not overriden
# therefore we need to make sure that hba_file is not overridden
# after changing superuser password we will "revert" all these "changes"
if self._postgresql.bootstrap.running_custom_bootstrap or 'hba_file' not in self._server_parameters:
f.write_param('hba_file', self._pg_hba_conf)
@@ -884,7 +884,7 @@ class ConfigHandler(object):
unix_local_address = {'port': port}
unix_socket_directories = self._server_parameters.get('unix_socket_directories')
if unix_socket_directories is not None:
# fallback to tcp if unix_socket_directories is set, but there are no sutable values
# fallback to tcp if unix_socket_directories is set, but there are no suitable values
unix_local_address['host'] = self._get_unix_local_address(unix_socket_directories) or tcp_local_address
tcp_local_address = {'host': tcp_local_address, 'port': port}
+1 -1
View File
@@ -37,7 +37,7 @@ def postgres_version_to_int(pg_version):
raise PostgresException('Invalid PostgreSQL version format: X.Y or X.Y.Z is accepted: {0}'.format(pg_version))
if len(components) == 2:
# new style verion numbers, i.e. 10.1 becomes 100001
# new style version numbers, i.e. 10.1 becomes 100001
components.insert(1, 0)
return int(''.join('{0:02d}'.format(c) for c in components))
+1 -1
View File
@@ -68,7 +68,7 @@ class Rewind(object):
def _get_checkpoint_end(self, timeline, lsn):
"""The checkpoint record size in WAL depends on postgres major version and platform (memory alignment).
Hence, the only reliable way to figure out where it ends, read the record from file with the help of pg_waldump
and parse the output. We are trying to read two records, and expect that it wil fail to read the second one:
and parse the output. We are trying to read two records, and expect that it will fail to read the second one:
`pg_waldump: fatal: error in WAL record at 0/182E220: invalid record length at 0/182E298: wanted 24, got 0`
The error message contains information about LSN of the next record, which is exactly where checkpoint ends."""
+2 -2
View File
@@ -250,7 +250,7 @@ class WALERestore(object):
diff_in_bytes = 0
break
# if the size of the accumulated WAL segments is more than a certan percentage of the backup size
# if the size of the accumulated WAL segments is more than a certain percentage of the backup size
# or exceeds the pre-determined size - pg_basebackup is chosen instead.
is_size_thresh_ok = diff_in_bytes < int(threshold_megabytes) * 1048576
threshold_pct_bytes = backup_size * threshold_percent / 100.0
@@ -308,7 +308,7 @@ class WALERestore(object):
try:
os.mkdir(path)
except OSError:
logger.exception("coud not create missing %s directory path", dirname)
logger.exception("could not create missing %s directory path", dirname)
return False
return True
+1 -1
View File
@@ -701,7 +701,7 @@ class TestHa(PostgresInit):
def test_evaluate_scheduled_restart(self):
self.p.postmaster_start_time = Mock(return_value=str(postmaster_start_time))
# restart already in progres
# restart already in progress
with patch('patroni.async_executor.AsyncExecutor.busy', PropertyMock(return_value=True)):
self.assertIsNone(self.ha.evaluate_scheduled_restart())
# restart while the postmaster has been already restarted, fails