mirror of
https://github.com/outbackdingo/patroni.git
synced 2026-08-30 16:19:24 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
442bd3f434 | ||
|
|
e3e4ad0ada |
@@ -3,6 +3,16 @@
|
|||||||
Release notes
|
Release notes
|
||||||
=============
|
=============
|
||||||
|
|
||||||
|
Version 2.1.7
|
||||||
|
-------------
|
||||||
|
|
||||||
|
**Bugfixes**
|
||||||
|
|
||||||
|
- Fixed little incompatibilities with legacy python modules (Alexander Kukushkin)
|
||||||
|
|
||||||
|
They prevented from building/running Patroni on Debian buster/Ubuntu bionic.
|
||||||
|
|
||||||
|
|
||||||
Version 2.1.6
|
Version 2.1.6
|
||||||
-------------
|
-------------
|
||||||
|
|
||||||
|
|||||||
@@ -441,7 +441,7 @@ class AbstractEtcdController(AbstractDcsController):
|
|||||||
self._client_cls = client_cls
|
self._client_cls = client_cls
|
||||||
|
|
||||||
def _start(self):
|
def _start(self):
|
||||||
return subprocess.Popen(["etcd", "--data-dir", self._work_directory],
|
return subprocess.Popen(["etcd", "--enable-v2=true", "--data-dir", self._work_directory],
|
||||||
stdout=self._log, stderr=subprocess.STDOUT)
|
stdout=self._log, stderr=subprocess.STDOUT)
|
||||||
|
|
||||||
def _is_running(self):
|
def _is_running(self):
|
||||||
|
|||||||
+1
-1
@@ -143,7 +143,7 @@ option_insecure = click.option('-k', '--insecure', is_flag=True, help='Allow con
|
|||||||
@click.group()
|
@click.group()
|
||||||
@click.option('--config-file', '-c', help='Configuration file',
|
@click.option('--config-file', '-c', help='Configuration file',
|
||||||
envvar='PATRONICTL_CONFIG_FILE', default=CONFIG_FILE_PATH)
|
envvar='PATRONICTL_CONFIG_FILE', default=CONFIG_FILE_PATH)
|
||||||
@click.option('--dcs-url', '--dcs', '-d', help='The DCS connect url', envvar='DCS_URL')
|
@click.option('--dcs-url', '--dcs', '-d', 'dcs_url', help='The DCS connect url', envvar='DCS_URL')
|
||||||
@option_insecure
|
@option_insecure
|
||||||
@click.pass_context
|
@click.pass_context
|
||||||
def ctl(ctx, config_file, dcs_url, insecure):
|
def ctl(ctx, config_file, dcs_url, insecure):
|
||||||
|
|||||||
+1
-1
@@ -1 +1 @@
|
|||||||
__version__ = '2.1.6'
|
__version__ = '2.1.7'
|
||||||
|
|||||||
+1
-1
@@ -39,7 +39,7 @@ class TestCtl(unittest.TestCase):
|
|||||||
self.assertRaises(PatroniCtlException, load_config, './non-existing-config-file', None)
|
self.assertRaises(PatroniCtlException, load_config, './non-existing-config-file', None)
|
||||||
|
|
||||||
with patch('os.path.exists', Mock(return_value=True)), \
|
with patch('os.path.exists', Mock(return_value=True)), \
|
||||||
patch('patroni.config.Config._load_config_path', Mock(return_value={})):
|
patch('patroni.config.Config._load_config_path', Mock(return_value={})):
|
||||||
load_config(CONFIG_FILE_PATH, None)
|
load_config(CONFIG_FILE_PATH, None)
|
||||||
mock_logger_debug.assert_called_once()
|
mock_logger_debug.assert_called_once()
|
||||||
self.assertEqual(('Ignoring configuration file "%s". It does not exists or is not readable.',
|
self.assertEqual(('Ignoring configuration file "%s". It does not exists or is not readable.',
|
||||||
|
|||||||
@@ -1,11 +1,12 @@
|
|||||||
import base64
|
import base64
|
||||||
import datetime
|
import datetime
|
||||||
import json
|
import json
|
||||||
|
import mock
|
||||||
import socket
|
import socket
|
||||||
import time
|
import time
|
||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
from mock import call, Mock, PropertyMock, mock_open, patch
|
from mock import Mock, PropertyMock, mock_open, patch
|
||||||
from patroni.dcs.kubernetes import k8s_client, k8s_config, K8sConfig, K8sConnectionFailed,\
|
from patroni.dcs.kubernetes import k8s_client, k8s_config, K8sConfig, K8sConnectionFailed,\
|
||||||
K8sException, K8sObject, Kubernetes, KubernetesError, KubernetesRetriableException,\
|
K8sException, K8sObject, Kubernetes, KubernetesError, KubernetesRetriableException,\
|
||||||
Retry, RetryFailedError, SERVICE_HOST_ENV_NAME, SERVICE_PORT_ENV_NAME
|
Retry, RetryFailedError, SERVICE_HOST_ENV_NAME, SERVICE_PORT_ENV_NAME
|
||||||
@@ -134,7 +135,7 @@ class TestK8sConfig(unittest.TestCase):
|
|||||||
mock_atexit.assert_called_once()
|
mock_atexit.assert_called_once()
|
||||||
mock_remove.side_effect = OSError
|
mock_remove.side_effect = OSError
|
||||||
mock_atexit.call_args[0][0]() # call _cleanup_temp_files
|
mock_atexit.call_args[0][0]() # call _cleanup_temp_files
|
||||||
mock_remove.assert_has_calls([call('1.tmp'), call('2.tmp')])
|
mock_remove.assert_has_calls([mock.call('1.tmp'), mock.call('2.tmp')])
|
||||||
|
|
||||||
|
|
||||||
@patch('urllib3.PoolManager.request')
|
@patch('urllib3.PoolManager.request')
|
||||||
|
|||||||
Reference in New Issue
Block a user