Closed mcankck closed 2 years ago
Please attach the Patroni log
sudo journalctl -u patroni
-- Logs begin at Fri 2022-01-14 13:21:10 UTC, end at Sun 2022-01-16 21:41:09 UTC. --
Jan 14 14:38:22 prdpostgres01 systemd[1]: Started Runners to orchestrate a high-availability PostgreSQL - patroni.
Jan 14 14:38:23 prdpostgres01 patroni[59252]: 2022-01-14 14:38:23,064 INFO: Selected new etcd server http://172.23.24.32:2379
Jan 14 14:38:23 prdpostgres01 patroni[59252]: 2022-01-14 14:38:23,069 INFO: No PostgreSQL configuration items changed, nothing to reload.
Jan 14 14:38:23 prdpostgres01 patroni[59252]: Traceback (most recent call last):
Jan 14 14:38:23 prdpostgres01 patroni[59252]: File "/usr/local/lib/python3.8/dist-packages/patroni/utils.py", line 469, in validate_directory
Jan 14 14:38:23 prdpostgres01 patroni[59252]: fd, tmpfile = tempfile.mkstemp(dir=d)
Jan 14 14:38:23 prdpostgres01 patroni[59252]: File "/usr/lib/python3.8/tempfile.py", line 470, in mkstemp
Jan 14 14:38:23 prdpostgres01 patroni[59252]: return _mkstemp_inner(dir, prefix, suffix, flags, output_type)
Jan 14 14:38:23 prdpostgres01 patroni[59252]: File "/usr/lib/python3.8/tempfile.py", line 389, in _mkstemp_inner
Jan 14 14:38:23 prdpostgres01 patroni[59252]: fd = _os.open(file, flags, 0o600)
Jan 14 14:38:23 prdpostgres01 patroni[59252]: PermissionError: [Errno 13] Permission denied: '/var/lib/pgsql/tmp8e80gnd_'
Jan 14 14:38:23 prdpostgres01 patroni[59252]: During handling of the above exception, another exception occurred:
Jan 14 14:38:23 prdpostgres01 patroni[59252]: Traceback (most recent call last):
Jan 14 14:38:23 prdpostgres01 patroni[59252]: File "/usr/local/bin/patroni", line 8, in <module>
Jan 14 14:38:23 prdpostgres01 patroni[59252]: sys.exit(main())
Jan 14 14:38:23 prdpostgres01 patroni[59252]: File "/usr/local/lib/python3.8/dist-packages/patroni/__init__.py", line 182, in main
Jan 14 14:38:23 prdpostgres01 patroni[59252]: return patroni_main()
Jan 14 14:38:23 prdpostgres01 patroni[59252]: File "/usr/local/lib/python3.8/dist-packages/patroni/__init__.py", line 140, in patroni_main
Jan 14 14:38:23 prdpostgres01 patroni[59252]: abstract_main(Patroni, schema)
Jan 14 14:38:23 prdpostgres01 patroni[59252]: File "/usr/local/lib/python3.8/dist-packages/patroni/daemon.py", line 98, in abstract_main
Jan 14 14:38:23 prdpostgres01 patroni[59252]: controller = cls(config)
Jan 14 14:38:23 prdpostgres01 patroni[59252]: File "/usr/local/lib/python3.8/dist-packages/patroni/__init__.py", line 34, in __init__
Jan 14 14:38:23 prdpostgres01 patroni[59252]: self.postgresql = Postgresql(self.config['postgresql'])
Jan 14 14:38:23 prdpostgres01 patroni[59252]: File "/usr/local/lib/python3.8/dist-packages/patroni/postgresql/__init__.py", line 79, in __init__
Jan 14 14:38:23 prdpostgres01 patroni[59252]: self.config.check_directories()
Jan 14 14:38:23 prdpostgres01 patroni[59252]: File "/usr/local/lib/python3.8/dist-packages/patroni/postgresql/config.py", line 341, in check_directories
Jan 14 14:38:23 prdpostgres01 patroni[59252]: self.try_to_create_dir(os.path.dirname(self._pgpass),
Jan 14 14:38:23 prdpostgres01 patroni[59252]: File "/usr/local/lib/python3.8/dist-packages/patroni/postgresql/config.py", line 331, in try_to_create_dir
Jan 14 14:38:23 prdpostgres01 patroni[59252]: validate_directory(d, msg)
Jan 14 14:38:23 prdpostgres01 patroni[59252]: File "/usr/local/lib/python3.8/dist-packages/patroni/utils.py", line 473, in validate_directory
Jan 14 14:38:23 prdpostgres01 patroni[59252]: raise PatroniException(msg.format(d, "the directory is not writable"))
Jan 14 14:38:23 prdpostgres01 patroni[59252]: patroni.exceptions.PatroniException: "'/var/lib/pgsql' is defined in `postgresql.pgpass`, the directory is not writable"
Jan 14 14:38:23 prdpostgres01 systemd[1]: patroni.service: Main process exited, code=exited, status=1/FAILURE
Jan 14 14:38:23 prdpostgres01 systemd[1]: patroni.service: Failed with result 'exit-code'.
Jan 16 21:09:54 prdpostgres01 systemd[1]: Started Runners to orchestrate a high-availability PostgreSQL - patroni.
Jan 16 21:09:54 prdpostgres01 patroni[532322]: 2022-01-16 21:09:54,539 INFO: Selected new etcd server http://172.23.24.32:2379
Jan 16 21:09:54 prdpostgres01 patroni[532322]: 2022-01-16 21:09:54,543 INFO: No PostgreSQL configuration items changed, nothing to reload.
Jan 16 21:09:54 prdpostgres01 patroni[532322]: Traceback (most recent call last):
Jan 16 21:09:54 prdpostgres01 patroni[532322]: File "/usr/local/lib/python3.8/dist-packages/patroni/utils.py", line 469, in validate_directory
Jan 16 21:09:54 prdpostgres01 patroni[532322]: fd, tmpfile = tempfile.mkstemp(dir=d)
Jan 16 21:09:54 prdpostgres01 patroni[532322]: File "/usr/lib/python3.8/tempfile.py", line 470, in mkstemp
Jan 16 21:09:54 prdpostgres01 patroni[532322]: return _mkstemp_inner(dir, prefix, suffix, flags, output_type)
Jan 16 21:09:54 prdpostgres01 patroni[532322]: File "/usr/lib/python3.8/tempfile.py", line 389, in _mkstemp_inner
Jan 16 21:09:54 prdpostgres01 patroni[532322]: fd = _os.open(file, flags, 0o600)
Jan 16 21:09:54 prdpostgres01 patroni[532322]: PermissionError: [Errno 13] Permission denied: '/var/lib/pgsql/tmpa34u91zk'
Jan 16 21:09:54 prdpostgres01 patroni[532322]: During handling of the above exception, another exception occurred:
Jan 16 21:09:54 prdpostgres01 patroni[532322]: Traceback (most recent call last):
Jan 16 21:09:54 prdpostgres01 patroni[532322]: File "/usr/local/bin/patroni", line 8, in <module>
Jan 16 21:09:54 prdpostgres01 patroni[532322]: sys.exit(main())
Jan 16 21:09:54 prdpostgres01 patroni[532322]: File "/usr/local/lib/python3.8/dist-packages/patroni/__init__.py", line 182, in main
Jan 16 21:09:54 prdpostgres01 patroni[532322]: return patroni_main()
Jan 16 21:09:54 prdpostgres01 patroni[532322]: File "/usr/local/lib/python3.8/dist-packages/patroni/__init__.py", line 140, in patroni_main
Jan 16 21:09:54 prdpostgres01 patroni[532322]: abstract_main(Patroni, schema)
Jan 16 21:09:54 prdpostgres01 patroni[532322]: File "/usr/local/lib/python3.8/dist-packages/patroni/daemon.py", line 98, in abstract_main
Jan 16 21:09:54 prdpostgres01 patroni[532322]: controller = cls(config)
Jan 16 21:09:54 prdpostgres01 patroni[532322]: File "/usr/local/lib/python3.8/dist-packages/patroni/__init__.py", line 34, in __init__
Jan 16 21:09:54 prdpostgres01 patroni[532322]: self.postgresql = Postgresql(self.config['postgresql'])
Jan 16 21:09:54 prdpostgres01 patroni[532322]: File "/usr/local/lib/python3.8/dist-packages/patroni/postgresql/__init__.py", line 79, in __init__
Jan 16 21:09:54 prdpostgres01 patroni[532322]: self.config.check_directories()
Jan 16 21:09:54 prdpostgres01 patroni[532322]: File "/usr/local/lib/python3.8/dist-packages/patroni/postgresql/config.py", line 341, in check_directories
Jan 16 21:09:54 prdpostgres01 patroni[532322]: self.try_to_create_dir(os.path.dirname(self._pgpass),
Jan 16 21:09:54 prdpostgres01 patroni[532322]: File "/usr/local/lib/python3.8/dist-packages/patroni/postgresql/config.py", line 331, in try_to_create_dir
Jan 16 21:09:54 prdpostgres01 patroni[532322]: validate_directory(d, msg)
Jan 16 21:09:54 prdpostgres01 patroni[532322]: File "/usr/local/lib/python3.8/dist-packages/patroni/utils.py", line 473, in validate_directory
Jan 16 21:09:54 prdpostgres01 patroni[532322]: raise PatroniException(msg.format(d, "the directory is not writable"))
Jan 16 21:09:54 prdpostgres01 patroni[532322]: patroni.exceptions.PatroniException: "'/var/lib/pgsql' is defined in `postgresql.pgpass`, the directory is not writable"
Jan 16 21:09:54 prdpostgres01 systemd[1]: patroni.service: Main process exited, code=exited, status=1/FAILURE
Jan 16 21:09:54 prdpostgres01 systemd[1]: patroni.service: Failed with result 'exit-code'.
Jan 16 21:19:54 prdpostgres01 systemd[1]: Started Runners to orchestrate a high-availability PostgreSQL - patroni.
Jan 16 21:19:55 prdpostgres01 patroni[547798]: 2022-01-16 21:19:55,236 INFO: Selected new etcd server http://172.23.24.30:2379
Jan 16 21:19:55 prdpostgres01 patroni[547798]: 2022-01-16 21:19:55,239 INFO: No PostgreSQL configuration items changed, nothing to reload.
Jan 16 21:19:55 prdpostgres01 patroni[547798]: Traceback (most recent call last):
Jan 16 21:19:55 prdpostgres01 patroni[547798]: File "/usr/local/lib/python3.8/dist-packages/patroni/utils.py", line 469, in validate_directory
Jan 16 21:19:55 prdpostgres01 patroni[547798]: fd, tmpfile = tempfile.mkstemp(dir=d)
Jan 16 21:19:55 prdpostgres01 patroni[547798]: File "/usr/lib/python3.8/tempfile.py", line 470, in mkstemp
Jan 16 21:19:55 prdpostgres01 patroni[547798]: return _mkstemp_inner(dir, prefix, suffix, flags, output_type)
Jan 16 21:19:55 prdpostgres01 patroni[547798]: File "/usr/lib/python3.8/tempfile.py", line 389, in _mkstemp_inner
Jan 16 21:19:55 prdpostgres01 patroni[547798]: fd = _os.open(file, flags, 0o600)
Jan 16 21:19:55 prdpostgres01 patroni[547798]: PermissionError: [Errno 13] Permission denied: '/var/lib/pgsql/tmpo2eqaqn8'
Jan 16 21:19:55 prdpostgres01 patroni[547798]: During handling of the above exception, another exception occurred:
Jan 16 21:19:55 prdpostgres01 patroni[547798]: Traceback (most recent call last):
Jan 16 21:19:55 prdpostgres01 patroni[547798]: File "/usr/local/bin/patroni", line 8, in <module>
Jan 16 21:19:55 prdpostgres01 patroni[547798]: sys.exit(main())
Jan 16 21:19:55 prdpostgres01 patroni[547798]: File "/usr/local/lib/python3.8/dist-packages/patroni/__init__.py", line 182, in main
Jan 16 21:19:55 prdpostgres01 patroni[547798]: return patroni_main()
Jan 16 21:19:55 prdpostgres01 patroni[547798]: File "/usr/local/lib/python3.8/dist-packages/patroni/__init__.py", line 140, in patroni_main
Jan 16 21:19:55 prdpostgres01 patroni[547798]: abstract_main(Patroni, schema)
Jan 16 21:19:55 prdpostgres01 patroni[547798]: File "/usr/local/lib/python3.8/dist-packages/patroni/daemon.py", line 98, in abstract_main
Jan 16 21:19:55 prdpostgres01 patroni[547798]: controller = cls(config)
Jan 16 21:19:55 prdpostgres01 patroni[547798]: File "/usr/local/lib/python3.8/dist-packages/patroni/__init__.py", line 34, in __init__
Jan 16 21:19:55 prdpostgres01 patroni[547798]: self.postgresql = Postgresql(self.config['postgresql'])
Jan 16 21:19:55 prdpostgres01 patroni[547798]: File "/usr/local/lib/python3.8/dist-packages/patroni/postgresql/__init__.py", line 79, in __init__
Jan 16 21:19:55 prdpostgres01 patroni[547798]: self.config.check_directories()
Jan 16 21:19:55 prdpostgres01 patroni[547798]: File "/usr/local/lib/python3.8/dist-packages/patroni/postgresql/config.py", line 341, in check_directories
Jan 16 21:19:55 prdpostgres01 patroni[547798]: self.try_to_create_dir(os.path.dirname(self._pgpass),
Jan 16 21:19:55 prdpostgres01 patroni[547798]: File "/usr/local/lib/python3.8/dist-packages/patroni/postgresql/config.py", line 331, in try_to_create_dir
Jan 16 21:19:55 prdpostgres01 patroni[547798]: validate_directory(d, msg)
Jan 16 21:19:55 prdpostgres01 patroni[547798]: File "/usr/local/lib/python3.8/dist-packages/patroni/utils.py", line 473, in validate_directory
Jan 16 21:19:55 prdpostgres01 patroni[547798]: raise PatroniException(msg.format(d, "the directory is not writable"))
Jan 16 21:19:55 prdpostgres01 patroni[547798]: patroni.exceptions.PatroniException: "'/var/lib/pgsql' is defined in `postgresql.pgpass`, the directory is not writable"
Jan 16 21:19:55 prdpostgres01 systemd[1]: patroni.service: Main process exited, code=exited, status=1/FAILURE
Jan 16 21:19:55 prdpostgres01 systemd[1]: patroni.service: Failed with result 'exit-code'.
Jan 16 21:36:46 prdpostgres01 systemd[1]: Started Runners to orchestrate a high-availability PostgreSQL - patroni.
Jan 16 21:36:46 prdpostgres01 patroni[564926]: 2022-01-16 21:36:46,692 INFO: Selected new etcd server http://172.23.24.32:2379
Jan 16 21:36:46 prdpostgres01 patroni[564926]: 2022-01-16 21:36:46,695 INFO: No PostgreSQL configuration items changed, nothing to reload.
Jan 16 21:36:46 prdpostgres01 patroni[564926]: Traceback (most recent call last):
Jan 16 21:36:46 prdpostgres01 patroni[564926]: File "/usr/local/lib/python3.8/dist-packages/patroni/utils.py", line 469, in validate_directory
Jan 16 21:36:46 prdpostgres01 patroni[564926]: fd, tmpfile = tempfile.mkstemp(dir=d)
Jan 16 21:36:46 prdpostgres01 patroni[564926]: File "/usr/lib/python3.8/tempfile.py", line 470, in mkstemp
Jan 16 21:36:46 prdpostgres01 patroni[564926]: return _mkstemp_inner(dir, prefix, suffix, flags, output_type)
Jan 16 21:36:46 prdpostgres01 patroni[564926]: File "/usr/lib/python3.8/tempfile.py", line 389, in _mkstemp_inner
Jan 16 21:36:46 prdpostgres01 patroni[564926]: fd = _os.open(file, flags, 0o600)
Jan 16 21:36:46 prdpostgres01 patroni[564926]: PermissionError: [Errno 13] Permission denied: '/var/lib/pgsql/tmp5_dbsysu'
Jan 16 21:36:46 prdpostgres01 patroni[564926]: During handling of the above exception, another exception occurred:
Jan 16 21:36:46 prdpostgres01 patroni[564926]: Traceback (most recent call last):
Jan 16 21:36:46 prdpostgres01 patroni[564926]: File "/usr/local/bin/patroni", line 8, in <module>
Jan 16 21:36:46 prdpostgres01 patroni[564926]: sys.exit(main())
Jan 16 21:36:46 prdpostgres01 patroni[564926]: File "/usr/local/lib/python3.8/dist-packages/patroni/__init__.py", line 182, in main
Jan 16 21:36:46 prdpostgres01 patroni[564926]: return patroni_main()
Jan 16 21:36:46 prdpostgres01 patroni[564926]: File "/usr/local/lib/python3.8/dist-packages/patroni/__init__.py", line 140, in patroni_main
Jan 16 21:36:46 prdpostgres01 patroni[564926]: abstract_main(Patroni, schema)
Jan 16 21:36:46 prdpostgres01 patroni[564926]: File "/usr/local/lib/python3.8/dist-packages/patroni/daemon.py", line 98, in abstract_main
Jan 16 21:36:46 prdpostgres01 patroni[564926]: controller = cls(config)
Jan 16 21:36:46 prdpostgres01 patroni[564926]: File "/usr/local/lib/python3.8/dist-packages/patroni/__init__.py", line 34, in __init__
Jan 16 21:36:46 prdpostgres01 patroni[564926]: self.postgresql = Postgresql(self.config['postgresql'])
Jan 16 21:36:46 prdpostgres01 patroni[564926]: File "/usr/local/lib/python3.8/dist-packages/patroni/postgresql/__init__.py", line 79, in __init__
Jan 16 21:36:46 prdpostgres01 patroni[564926]: self.config.check_directories()
Jan 16 21:36:46 prdpostgres01 patroni[564926]: File "/usr/local/lib/python3.8/dist-packages/patroni/postgresql/config.py", line 341, in check_directories
Jan 16 21:36:46 prdpostgres01 patroni[564926]: self.try_to_create_dir(os.path.dirname(self._pgpass),
Jan 16 21:36:46 prdpostgres01 patroni[564926]: File "/usr/local/lib/python3.8/dist-packages/patroni/postgresql/config.py", line 331, in try_to_create_dir
Jan 16 21:36:46 prdpostgres01 patroni[564926]: validate_directory(d, msg)
Jan 16 21:36:46 prdpostgres01 patroni[564926]: File "/usr/local/lib/python3.8/dist-packages/patroni/utils.py", line 473, in validate_directory
Jan 16 21:36:46 prdpostgres01 patroni[564926]: raise PatroniException(msg.format(d, "the directory is not writable"))
Jan 16 21:36:46 prdpostgres01 patroni[564926]: patroni.exceptions.PatroniException: "'/var/lib/pgsql' is defined in `postgresql.pgpass`, the directory is not writable"
Jan 16 21:36:46 prdpostgres01 systemd[1]: patroni.service: Main process exited, code=exited, status=1/FAILURE
Jan 16 21:36:46 prdpostgres01 systemd[1]: patroni.service: Failed with result 'exit-code'.
"'/var/lib/pgsql' is defined in
postgresql.pgpass
, the directory is not writable"
Very strange, because this is the postgres home directory. The postgres user must have rights to this directory
please show the result of the command: \
ls -la /var/lib/pgsql
ls -la;
root@prdpostgres01:~/postgresql_cluster# ls -la /var/lib/pgsql
total 4
drwx------ 3 postgres postgres 16 Jan 16 22:13 .
drwxr-xr-x 48 root root 4096 Jan 14 14:38 ..
drwx------ 4 postgres postgres 70 Jan 16 22:13 14
this empty expression caught my attention;
TASK [patroni : Prepare PostgreSQL | make sure the data directory "/var/lib/pgsql/14/main" is empty] ***********************************************************************************************************
changed: [172.23.24.30] => (item=absent)
changed: [172.23.24.32] => (item=absent)
changed: [172.23.24.31] => (item=absent)
changed: [172.23.24.32] => (item=directory)
changed: [172.23.24.30] => (item=directory)
changed: [172.23.24.31] => (item=directory)
Why not just main it? the file is dated.
root@prdpostgres01:/var/lib/pgsql/14# ls -la
total 4
drwx------ 3 postgres postgres 38 Jan 16 22:19 .
drwx------ 3 postgres postgres 16 Jan 16 22:13 ..
drwx------ 19 postgres postgres 4096 Jan 16 22:13 main_2022-01-16-22-13-31
Everything is fine with the rights
please specify the version of the Linux distribution, I will try to reproduce the problem
root@prdpostgres01:~# cat /etc/os-release
NAME="Ubuntu"
VERSION="20.04.3 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.3 LTS"
VERSION_ID="20.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal
I'm confused, because /var/lib/pgsql
for Red Hat based distributions this, and for ubuntu should have /var/lib/postgresql
Example (from the last test)
TASK [patroni : Prepare PostgreSQL | make sure PostgreSQL data directory "/var/lib/postgresql/14/main" exists] ***
758
changed: [10.172.0.20]
759
changed: [10.172.0.21]
760
761
TASK [patroni : Prepare PostgreSQL | check that data directory "/var/lib/postgresql/14/main" is not initialized] ***
762
ok: [10.172.0.20]
763
ok: [10.172.0.21]
please send the result of the command
ansible master -m setup
root@prdpostgres01:~/postgresql_cluster# ansible master -m setup
172.23.24.30 | SUCCESS => {
"ansible_facts": {
"ansible_all_ipv4_addresses": [
"172.23.24.30",
"172.23.24.33"
],
"ansible_all_ipv6_addresses": [
"fe80::250:56ff:fe01:105e"
],
"ansible_apparmor": {
"status": "enabled"
},
"ansible_architecture": "x86_64",
"ansible_bios_date": "12/12/2018",
"ansible_bios_vendor": "Phoenix Technologies LTD",
"ansible_bios_version": "6.00",
"ansible_board_asset_tag": "NA",
"ansible_board_name": "440BX Desktop Reference Platform",
"ansible_board_serial": "None",
"ansible_board_vendor": "Intel Corporation",
"ansible_board_version": "None",
"ansible_chassis_asset_tag": "No Asset Tag",
"ansible_chassis_serial": "None",
"ansible_chassis_vendor": "No Enclosure",
"ansible_chassis_version": "N/A",
"ansible_cmdline": {
"BOOT_IMAGE": "/vmlinuz-5.4.0-94-generic",
"maybe-ubiquity": true,
"ro": true,
"root": "/dev/mapper/ubuntu--vg-ubuntu--lv"
},
"ansible_date_time": {
"date": "2022-01-17",
"day": "17",
"epoch": "1642408981",
"epoch_int": "1642408981",
"hour": "11",
"iso8601": "2022-01-17T08:43:01Z",
"iso8601_basic": "20220117T114301303181",
"iso8601_basic_short": "20220117T114301",
"iso8601_micro": "2022-01-17T08:43:01.303181Z",
"minute": "43",
"month": "01",
"second": "01",
"time": "11:43:01",
"tz": "+03",
"tz_dst": "+03",
"tz_offset": "+0300",
"weekday": "Monday",
"weekday_number": "1",
"weeknumber": "03",
"year": "2022"
},
"ansible_default_ipv4": {
"address": "172.23.24.30",
"alias": "ens160",
"broadcast": "172.23.24.255",
"gateway": "172.23.24.254",
"interface": "ens160",
"macaddress": "00:50:56:01:10:5e",
"mtu": 1500,
"netmask": "255.255.255.0",
"network": "172.23.24.0",
"type": "ether"
},
"ansible_default_ipv6": {},
"ansible_device_links": {
"ids": {
"dm-0": [
"dm-name-ubuntu--vg-ubuntu--lv",
"dm-uuid-LVM-WD4w1FHGHoa1lXL4hUt3jWnkXrgxr7cgexG8VJm2unZbPPYtidf3kJLEtrK09cOG"
],
"sda3": [
"lvm-pv-uuid-XA2TOD-CCmw-fS3Q-Ygu0-B0zb-vsP5-1Pcs4O"
],
"sr0": [
"ata-VMware_Virtual_IDE_CDROM_Drive_00000000000000000001"
]
},
"labels": {},
"masters": {
"sda3": [
"dm-0"
]
},
"uuids": {
"dm-0": [
"821fb9cb-bcc7-4802-8808-49a687a15988"
],
"sda2": [
"5e77b9ec-0b97-4825-8fcb-d010da1ce0a8"
],
"sdb": [
"e7951008-edfa-4715-be71-018a02d9b8a1"
]
}
},
"ansible_devices": {
"dm-0": {
"holders": [],
"host": "",
"links": {
"ids": [
"dm-name-ubuntu--vg-ubuntu--lv",
"dm-uuid-LVM-WD4w1FHGHoa1lXL4hUt3jWnkXrgxr7cgexG8VJm2unZbPPYtidf3kJLEtrK09cOG"
],
"labels": [],
"masters": [],
"uuids": [
"821fb9cb-bcc7-4802-8808-49a687a15988"
]
},
"model": null,
"partitions": {},
"removable": "0",
"rotational": "1",
"sas_address": null,
"sas_device_handle": null,
"scheduler_mode": "",
"sectors": "123723776",
"sectorsize": "512",
"size": "59.00 GB",
"support_discard": "1048576",
"vendor": null,
"virtual": 1
},
"fd0": {
"holders": [],
"host": "",
"links": {
"ids": [],
"labels": [],
"masters": [],
"uuids": []
},
"model": null,
"partitions": {},
"removable": "1",
"rotational": "1",
"sas_address": null,
"sas_device_handle": null,
"scheduler_mode": "mq-deadline",
"sectors": "8",
"sectorsize": "512",
"size": "4.00 KB",
"support_discard": "0",
"vendor": null,
"virtual": 1
},
"loop0": {
"holders": [],
"host": "",
"links": {
"ids": [],
"labels": [],
"masters": [],
"uuids": []
},
"model": null,
"partitions": {},
"removable": "0",
"rotational": "1",
"sas_address": null,
"sas_device_handle": null,
"scheduler_mode": "mq-deadline",
"sectors": "61200",
"sectorsize": "512",
"size": "29.88 MB",
"support_discard": "4096",
"vendor": null,
"virtual": 1
},
"loop1": {
"holders": [],
"host": "",
"links": {
"ids": [],
"labels": [],
"masters": [],
"uuids": []
},
"model": null,
"partitions": {},
"removable": "0",
"rotational": "1",
"sas_address": null,
"sas_device_handle": null,
"scheduler_mode": "mq-deadline",
"sectors": "112552",
"sectorsize": "512",
"size": "54.96 MB",
"support_discard": "4096",
"vendor": null,
"virtual": 1
},
"loop2": {
"holders": [],
"host": "",
"links": {
"ids": [],
"labels": [],
"masters": [],
"uuids": []
},
"model": null,
"partitions": {},
"removable": "0",
"rotational": "1",
"sas_address": null,
"sas_device_handle": null,
"scheduler_mode": "mq-deadline",
"sectors": "145968",
"sectorsize": "512",
"size": "71.27 MB",
"support_discard": "4096",
"vendor": null,
"virtual": 1
},
"loop3": {
"holders": [],
"host": "",
"links": {
"ids": [],
"labels": [],
"masters": [],
"uuids": []
},
"model": null,
"partitions": {},
"removable": "0",
"rotational": "1",
"sas_address": null,
"sas_device_handle": null,
"scheduler_mode": "mq-deadline",
"sectors": "0",
"sectorsize": "512",
"size": "0.00 Bytes",
"support_discard": "4096",
"vendor": null,
"virtual": 1
},
"loop4": {
"holders": [],
"host": "",
"links": {
"ids": [],
"labels": [],
"masters": [],
"uuids": []
},
"model": null,
"partitions": {},
"removable": "0",
"rotational": "1",
"sas_address": null,
"sas_device_handle": null,
"scheduler_mode": "mq-deadline",
"sectors": "0",
"sectorsize": "512",
"size": "0.00 Bytes",
"support_discard": "0",
"vendor": null,
"virtual": 1
},
"loop5": {
"holders": [],
"host": "",
"links": {
"ids": [],
"labels": [],
"masters": [],
"uuids": []
},
"model": null,
"partitions": {},
"removable": "0",
"rotational": "1",
"sas_address": null,
"sas_device_handle": null,
"scheduler_mode": "mq-deadline",
"sectors": "0",
"sectorsize": "512",
"size": "0.00 Bytes",
"support_discard": "0",
"vendor": null,
"virtual": 1
},
"loop6": {
"holders": [],
"host": "",
"links": {
"ids": [],
"labels": [],
"masters": [],
"uuids": []
},
"model": null,
"partitions": {},
"removable": "0",
"rotational": "1",
"sas_address": null,
"sas_device_handle": null,
"scheduler_mode": "mq-deadline",
"sectors": "0",
"sectorsize": "512",
"size": "0.00 Bytes",
"support_discard": "0",
"vendor": null,
"virtual": 1
},
"loop7": {
"holders": [],
"host": "",
"links": {
"ids": [],
"labels": [],
"masters": [],
"uuids": []
},
"model": null,
"partitions": {},
"removable": "0",
"rotational": "1",
"sas_address": null,
"sas_device_handle": null,
"scheduler_mode": "mq-deadline",
"sectors": "0",
"sectorsize": "512",
"size": "0.00 Bytes",
"support_discard": "0",
"vendor": null,
"virtual": 1
},
"sda": {
"holders": [],
"host": "SCSI storage controller: Broadcom / LSI 53c1030 PCI-X Fusion-MPT Dual Ultra320 SCSI (rev 01)",
"links": {
"ids": [],
"labels": [],
"masters": [],
"uuids": []
},
"model": "Virtual disk",
"partitions": {
"sda1": {
"holders": [],
"links": {
"ids": [],
"labels": [],
"masters": [],
"uuids": []
},
"sectors": "2048",
"sectorsize": 512,
"size": "1.00 MB",
"start": "2048",
"uuid": null
},
"sda2": {
"holders": [],
"links": {
"ids": [],
"labels": [],
"masters": [],
"uuids": [
"5e77b9ec-0b97-4825-8fcb-d010da1ce0a8"
]
},
"sectors": "2097152",
"sectorsize": 512,
"size": "1.00 GB",
"start": "4096",
"uuid": "5e77b9ec-0b97-4825-8fcb-d010da1ce0a8"
},
"sda3": {
"holders": [
"ubuntu--vg-ubuntu--lv"
],
"links": {
"ids": [
"lvm-pv-uuid-XA2TOD-CCmw-fS3Q-Ygu0-B0zb-vsP5-1Pcs4O"
],
"labels": [],
"masters": [
"dm-0"
],
"uuids": []
},
"sectors": "123725824",
"sectorsize": 512,
"size": "59.00 GB",
"start": "2101248",
"uuid": null
}
},
"removable": "0",
"rotational": "1",
"sas_address": null,
"sas_device_handle": null,
"scheduler_mode": "mq-deadline",
"sectors": "125829120",
"sectorsize": "512",
"size": "60.00 GB",
"support_discard": "1048576",
"vendor": "VMware",
"virtual": 1
},
"sdb": {
"holders": [],
"host": "SCSI storage controller: Broadcom / LSI 53c1030 PCI-X Fusion-MPT Dual Ultra320 SCSI (rev 01)",
"links": {
"ids": [],
"labels": [],
"masters": [],
"uuids": [
"e7951008-edfa-4715-be71-018a02d9b8a1"
]
},
"model": "Virtual disk",
"partitions": {},
"removable": "0",
"rotational": "1",
"sas_address": null,
"sas_device_handle": null,
"scheduler_mode": "mq-deadline",
"sectors": "1153433600",
"sectorsize": "512",
"size": "550.00 GB",
"support_discard": "1048576",
"vendor": "VMware",
"virtual": 1
},
"sr0": {
"holders": [],
"host": "IDE interface: Intel Corporation 82371AB/EB/MB PIIX4 IDE (rev 01)",
"links": {
"ids": [
"ata-VMware_Virtual_IDE_CDROM_Drive_00000000000000000001"
],
"labels": [],
"masters": [],
"uuids": []
},
"model": "VMware IDE CDR00",
"partitions": {},
"removable": "1",
"rotational": "1",
"sas_address": null,
"sas_device_handle": null,
"scheduler_mode": "mq-deadline",
"sectors": "2097151",
"sectorsize": "512",
"size": "1024.00 MB",
"support_discard": "0",
"vendor": "NECVMWar",
"virtual": 1
}
},
"ansible_distribution": "Ubuntu",
"ansible_distribution_file_parsed": true,
"ansible_distribution_file_path": "/etc/os-release",
"ansible_distribution_file_variety": "Debian",
"ansible_distribution_major_version": "20",
"ansible_distribution_release": "focal",
"ansible_distribution_version": "20.04",
"ansible_dns": {
"nameservers": [
"127.0.0.53"
],
"options": {
"edns0": true,
"trust-ad": true
}
},
"ansible_domain": "",
"ansible_effective_group_id": 0,
"ansible_effective_user_id": 0,
"ansible_ens160": {
"active": true,
"device": "ens160",
"features": {
"esp_hw_offload": "off [fixed]",
"esp_tx_csum_hw_offload": "off [fixed]",
"fcoe_mtu": "off [fixed]",
"generic_receive_offload": "on",
"generic_segmentation_offload": "on",
"highdma": "on",
"hw_tc_offload": "off [fixed]",
"l2_fwd_offload": "off [fixed]",
"large_receive_offload": "off",
"loopback": "off [fixed]",
"netns_local": "off [fixed]",
"ntuple_filters": "off [fixed]",
"receive_hashing": "on",
"rx_all": "off [fixed]",
"rx_checksumming": "on",
"rx_fcs": "off [fixed]",
"rx_gro_hw": "off [fixed]",
"rx_udp_tunnel_port_offload": "off [fixed]",
"rx_vlan_filter": "on [fixed]",
"rx_vlan_offload": "on",
"rx_vlan_stag_filter": "off [fixed]",
"rx_vlan_stag_hw_parse": "off [fixed]",
"scatter_gather": "on",
"tcp_segmentation_offload": "on",
"tls_hw_record": "off [fixed]",
"tls_hw_rx_offload": "off [fixed]",
"tls_hw_tx_offload": "off [fixed]",
"tx_checksum_fcoe_crc": "off [fixed]",
"tx_checksum_ip_generic": "on",
"tx_checksum_ipv4": "off [fixed]",
"tx_checksum_ipv6": "off [fixed]",
"tx_checksum_sctp": "off [fixed]",
"tx_checksumming": "on",
"tx_esp_segmentation": "off [fixed]",
"tx_fcoe_segmentation": "off [fixed]",
"tx_gre_csum_segmentation": "off [fixed]",
"tx_gre_segmentation": "off [fixed]",
"tx_gso_partial": "off [fixed]",
"tx_gso_robust": "off [fixed]",
"tx_ipxip4_segmentation": "off [fixed]",
"tx_ipxip6_segmentation": "off [fixed]",
"tx_lockless": "off [fixed]",
"tx_nocache_copy": "off",
"tx_scatter_gather": "on",
"tx_scatter_gather_fraglist": "off [fixed]",
"tx_sctp_segmentation": "off [fixed]",
"tx_tcp6_segmentation": "on",
"tx_tcp_ecn_segmentation": "off [fixed]",
"tx_tcp_mangleid_segmentation": "off",
"tx_tcp_segmentation": "on",
"tx_udp_segmentation": "off [fixed]",
"tx_udp_tnl_csum_segmentation": "off [fixed]",
"tx_udp_tnl_segmentation": "off [fixed]",
"tx_vlan_offload": "on",
"tx_vlan_stag_hw_insert": "off [fixed]",
"vlan_challenged": "off [fixed]"
},
"hw_timestamp_filters": [],
"ipv4": {
"address": "172.23.24.30",
"broadcast": "172.23.24.255",
"netmask": "255.255.255.0",
"network": "172.23.24.0"
},
"ipv4_secondaries": [
{
"address": "172.23.24.33",
"broadcast": "",
"netmask": "255.255.255.255",
"network": "172.23.24.33"
}
],
"ipv6": [
{
"address": "fe80::250:56ff:fe01:105e",
"prefix": "64",
"scope": "link"
}
],
"macaddress": "00:50:56:01:10:5e",
"module": "vmxnet3",
"mtu": 1500,
"pciid": "0000:03:00.0",
"promisc": false,
"speed": 10000,
"timestamping": [
"rx_software",
"software"
],
"type": "ether"
},
"ansible_env": {
"DBUS_SESSION_BUS_ADDRESS": "unix:path=/run/user/0/bus",
"HOME": "/root",
"LANG": "en_US.utf-8",
"LANGUAGE": "en_US.utf-8",
"LC_ALL": "en_US.utf-8",
"LOGNAME": "root",
"MOTD_SHOWN": "pam",
"PATH": "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin",
"PWD": "/root",
"SHELL": "/bin/bash",
"SHLVL": "0",
"SSH_CLIENT": "172.23.24.30 12694 22",
"SSH_CONNECTION": "172.23.24.30 12694 172.23.24.30 22",
"SSH_TTY": "/dev/pts/4",
"TERM": "xterm",
"USER": "root",
"XDG_RUNTIME_DIR": "/run/user/0",
"XDG_SESSION_CLASS": "user",
"XDG_SESSION_ID": "11",
"XDG_SESSION_TYPE": "tty",
"_": "/bin/sh"
},
"ansible_fibre_channel_wwn": [],
"ansible_fips": false,
"ansible_form_factor": "Other",
"ansible_fqdn": "localhost",
"ansible_hostname": "prdpostgres01",
"ansible_hostnqn": "",
"ansible_interfaces": [
"lo",
"ens160"
],
"ansible_is_chroot": false,
"ansible_iscsi_iqn": "iqn.1993-08.org.debian:01:af5bf2af245",
"ansible_kernel": "5.4.0-94-generic",
"ansible_kernel_version": "#106-Ubuntu SMP Thu Jan 6 23:58:14 UTC 2022",
"ansible_lo": {
"active": true,
"device": "lo",
"features": {
"esp_hw_offload": "off [fixed]",
"esp_tx_csum_hw_offload": "off [fixed]",
"fcoe_mtu": "off [fixed]",
"generic_receive_offload": "on",
"generic_segmentation_offload": "on",
"highdma": "on [fixed]",
"hw_tc_offload": "off [fixed]",
"l2_fwd_offload": "off [fixed]",
"large_receive_offload": "off [fixed]",
"loopback": "on [fixed]",
"netns_local": "on [fixed]",
"ntuple_filters": "off [fixed]",
"receive_hashing": "off [fixed]",
"rx_all": "off [fixed]",
"rx_checksumming": "on [fixed]",
"rx_fcs": "off [fixed]",
"rx_gro_hw": "off [fixed]",
"rx_udp_tunnel_port_offload": "off [fixed]",
"rx_vlan_filter": "off [fixed]",
"rx_vlan_offload": "off [fixed]",
"rx_vlan_stag_filter": "off [fixed]",
"rx_vlan_stag_hw_parse": "off [fixed]",
"scatter_gather": "on",
"tcp_segmentation_offload": "on",
"tls_hw_record": "off [fixed]",
"tls_hw_rx_offload": "off [fixed]",
"tls_hw_tx_offload": "off [fixed]",
"tx_checksum_fcoe_crc": "off [fixed]",
"tx_checksum_ip_generic": "on [fixed]",
"tx_checksum_ipv4": "off [fixed]",
"tx_checksum_ipv6": "off [fixed]",
"tx_checksum_sctp": "on [fixed]",
"tx_checksumming": "on",
"tx_esp_segmentation": "off [fixed]",
"tx_fcoe_segmentation": "off [fixed]",
"tx_gre_csum_segmentation": "off [fixed]",
"tx_gre_segmentation": "off [fixed]",
"tx_gso_partial": "off [fixed]",
"tx_gso_robust": "off [fixed]",
"tx_ipxip4_segmentation": "off [fixed]",
"tx_ipxip6_segmentation": "off [fixed]",
"tx_lockless": "on [fixed]",
"tx_nocache_copy": "off [fixed]",
"tx_scatter_gather": "on [fixed]",
"tx_scatter_gather_fraglist": "on [fixed]",
"tx_sctp_segmentation": "on",
"tx_tcp6_segmentation": "on",
"tx_tcp_ecn_segmentation": "on",
"tx_tcp_mangleid_segmentation": "on",
"tx_tcp_segmentation": "on",
"tx_udp_segmentation": "off [fixed]",
"tx_udp_tnl_csum_segmentation": "off [fixed]",
"tx_udp_tnl_segmentation": "off [fixed]",
"tx_vlan_offload": "off [fixed]",
"tx_vlan_stag_hw_insert": "off [fixed]",
"vlan_challenged": "on [fixed]"
},
"hw_timestamp_filters": [],
"ipv4": {
"address": "127.0.0.1",
"broadcast": "",
"netmask": "255.0.0.0",
"network": "127.0.0.0"
},
"ipv6": [
{
"address": "::1",
"prefix": "128",
"scope": "host"
}
],
"mtu": 65536,
"promisc": false,
"timestamping": [
"tx_software",
"rx_software",
"software"
],
"type": "loopback"
},
"ansible_local": {},
"ansible_lsb": {
"codename": "focal",
"description": "Ubuntu 20.04.3 LTS",
"id": "Ubuntu",
"major_release": "20",
"release": "20.04"
},
"ansible_lvm": {
"lvs": {
"ubuntu-lv": {
"size_g": "59.00",
"vg": "ubuntu-vg"
}
},
"pvs": {
"/dev/sda3": {
"free_g": "0",
"size_g": "59.00",
"vg": "ubuntu-vg"
}
},
"vgs": {
"ubuntu-vg": {
"free_g": "0",
"num_lvs": "1",
"num_pvs": "1",
"size_g": "59.00"
}
}
},
"ansible_machine": "x86_64",
"ansible_machine_id": "8657767e74ea479a8c96337edca9b792",
"ansible_memfree_mb": 60414,
"ansible_memory_mb": {
"nocache": {
"free": 63494,
"used": 825
},
"real": {
"free": 60414,
"total": 64319,
"used": 3905
},
"swap": {
"cached": 0,
"free": 0,
"total": 0,
"used": 0
}
},
"ansible_memtotal_mb": 64319,
"ansible_mounts": [
{
"block_available": 13284946,
"block_size": 4096,
"block_total": 15157211,
"block_used": 1872265,
"device": "/dev/mapper/ubuntu--vg-ubuntu--lv",
"fstype": "ext4",
"inode_available": 3707864,
"inode_total": 3866624,
"inode_used": 158760,
"mount": "/",
"options": "rw,relatime",
"size_available": 54415138816,
"size_total": 62083936256,
"uuid": "821fb9cb-bcc7-4802-8808-49a687a15988"
},
{
"block_available": 205018,
"block_size": 4096,
"block_total": 249830,
"block_used": 44812,
"device": "/dev/sda2",
"fstype": "ext4",
"inode_available": 65224,
"inode_total": 65536,
"inode_used": 312,
"mount": "/boot",
"options": "rw,relatime",
"size_available": 839753728,
"size_total": 1023303680,
"uuid": "5e77b9ec-0b97-4825-8fcb-d010da1ce0a8"
},
{
"block_available": 0,
"block_size": 131072,
"block_total": 240,
"block_used": 240,
"device": "/dev/loop0",
"fstype": "squashfs",
"inode_available": 0,
"inode_total": 463,
"inode_used": 463,
"mount": "/snap/snapd/8542",
"options": "ro,nodev,relatime",
"size_available": 0,
"size_total": 31457280,
"uuid": "N/A"
},
{
"block_available": 0,
"block_size": 131072,
"block_total": 440,
"block_used": 440,
"device": "/dev/loop1",
"fstype": "squashfs",
"inode_available": 0,
"inode_total": 10756,
"inode_used": 10756,
"mount": "/snap/core18/1880",
"options": "ro,nodev,relatime",
"size_available": 0,
"size_total": 57671680,
"uuid": "N/A"
},
{
"block_available": 0,
"block_size": 131072,
"block_total": 571,
"block_used": 571,
"device": "/dev/loop2",
"fstype": "squashfs",
"inode_available": 0,
"inode_total": 1495,
"inode_used": 1495,
"mount": "/snap/lxd/16099",
"options": "ro,nodev,relatime",
"size_available": 0,
"size_total": 74842112,
"uuid": "N/A"
}
],
"ansible_nodename": "prdpostgres01",
"ansible_os_family": "Debian",
"ansible_pkg_mgr": "apt",
"ansible_proc_cmdline": {
"BOOT_IMAGE": "/vmlinuz-5.4.0-94-generic",
"maybe-ubiquity": true,
"ro": true,
"root": "/dev/mapper/ubuntu--vg-ubuntu--lv"
},
"ansible_processor": [
"0",
"GenuineIntel",
"Intel(R) Xeon(R) CPU E5-2680 v4 @ 2.40GHz",
"1",
"GenuineIntel",
"Intel(R) Xeon(R) CPU E5-2680 v4 @ 2.40GHz",
"2",
"GenuineIntel",
"Intel(R) Xeon(R) CPU E5-2680 v4 @ 2.40GHz",
"3",
"GenuineIntel",
"Intel(R) Xeon(R) CPU E5-2680 v4 @ 2.40GHz",
"4",
"GenuineIntel",
"Intel(R) Xeon(R) CPU E5-2680 v4 @ 2.40GHz",
"5",
"GenuineIntel",
"Intel(R) Xeon(R) CPU E5-2680 v4 @ 2.40GHz",
"6",
"GenuineIntel",
"Intel(R) Xeon(R) CPU E5-2680 v4 @ 2.40GHz",
"7",
"GenuineIntel",
"Intel(R) Xeon(R) CPU E5-2680 v4 @ 2.40GHz",
"8",
"GenuineIntel",
"Intel(R) Xeon(R) CPU E5-2680 v4 @ 2.40GHz",
"9",
"GenuineIntel",
"Intel(R) Xeon(R) CPU E5-2680 v4 @ 2.40GHz",
"10",
"GenuineIntel",
"Intel(R) Xeon(R) CPU E5-2680 v4 @ 2.40GHz",
"11",
"GenuineIntel",
"Intel(R) Xeon(R) CPU E5-2680 v4 @ 2.40GHz"
],
"ansible_processor_cores": 1,
"ansible_processor_count": 12,
"ansible_processor_nproc": 12,
"ansible_processor_threads_per_core": 1,
"ansible_processor_vcpus": 12,
"ansible_product_name": "VMware Virtual Platform",
"ansible_product_serial": "VMware-42 15 5f 72 58 30 3e 62-92 10 d1 9c d3 22 e3 e9",
"ansible_product_uuid": "725f1542-3058-623e-9210-d19cd322e3e9",
"ansible_product_version": "None",
"ansible_python": {
"executable": "/usr/bin/python3",
"has_sslcontext": true,
"type": "cpython",
"version": {
"major": 3,
"micro": 10,
"minor": 8,
"releaselevel": "final",
"serial": 0
},
"version_info": [
3,
8,
10,
"final",
0
]
},
"ansible_python_version": "3.8.10",
"ansible_real_group_id": 0,
"ansible_real_user_id": 0,
"ansible_selinux": {
"status": "disabled"
},
"ansible_selinux_python_present": true,
"ansible_service_mgr": "systemd",
"ansible_ssh_host_key_dsa_public": "AAAAB3NzaC1kc3MAAACBALdtDU+a1Dp9KHCcu0OHK62q4QAQ41HcYagFXDLDnod040042v1x4M0kAfyKFbDQAsot5KsmZiKcgJY8MNoucW30dw68hpbk1JCarr+oqQg77qRurX3o+7/fX3ptTAkQCjwY6MLCIERQxV/CHlfYVCmCLZO0CAIZso5P8V/KhHV1AAAAFQCVRZ893Z0pOhDeJCOUZOq7S0xyvQAAAIByEGkh8Sr29hfAhTpEyVbG+8pfvVnKBjnHjXv+drpcIVnj8nsl2OYUviurvvAKRY2uhw0um2gFFoMJlSfggf76ic6SrInJY31bIWG2ziSShL94N1zZN5ko2BaZUDIMMo0BvKxLneLw0CN1ujHY0ZPnr4IEWDWQeadt7fJz07iwRwAAAIBGg2OkXbcNzQHRB8GMjQ4/E3u+j0OZRYlQxys35XsZEEBqVKiE18v3l0lHVNfnLyM+KFU/LDasopVBNT3OIW/fFzH35PO2fDX0JuEAzgGl4+ffvjpJp/9240XKil5nTTnj9ZyraaCXK1ZXsAZ71XHSHUSD/io200nLc7FkR2ZeuA==",
"ansible_ssh_host_key_dsa_public_keytype": "ssh-dss",
"ansible_ssh_host_key_ecdsa_public": "AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBFvB3wKa7TptvPfYKyqp5g+RN5wGEPP+xspZg2vu7QR9G5rcCQF6jFqAMpEBlL9EPSZ5BTTaLWkr1rQe3Vtf/nU=",
"ansible_ssh_host_key_ecdsa_public_keytype": "ecdsa-sha2-nistp256",
"ansible_ssh_host_key_ed25519_public": "AAAAC3NzaC1lZDI1NTE5AAAAIFSLk3hlC8jz+rBee+3vW4mtSwiktrjrYQc/xq3pBqk+",
"ansible_ssh_host_key_ed25519_public_keytype": "ssh-ed25519",
"ansible_ssh_host_key_rsa_public": "AAAAB3NzaC1yc2EAAAADAQABAAABgQC76SkWSmToPa7h0+Y+T25yF95WscXih1S2SC7svX8y0cub8zBzyH9m13mId1FmCoeIl9x4GR15tEfnxPFK6OcXeevnCEizxZLrs79/Iv/xi1de9QTD38VR6niqTod31sS15A/K6VuE2ajxdPp7P6w1pp3H8+ZoUFp+BysCSK8Tj/IDHgDld5zmde4kqR7tb6igVN2neOM7MFH1DuqEBa+n/drMCBW2P4ew/W/5paxa5kIsSvl6tIb+kXG0Ea7CO9tiRa2PCO6JJ/qIATXe30nRwPeMUHW3NNuF7N0eQ3Q9kibHQP+jL4L9ActFSFCnUE5p0oAPQe3aSPW+HyBR9ZQaa9aFDq3GoiV/75lzfUsU/0EzX4plrcPbndpvtT9GQ5gzoAy33ab6YkASJ1y+2JvoyR1KfBepPSoqUN/CDvpwwVDgYPpPa8Y6e+y5c5UuJDMv0S4SJEQ6m7YwPTWadml4Uc/OQSgOG7gY6Bm3auazjVG1Dh7Im9YOmAjZv5FD/Hk=",
"ansible_ssh_host_key_rsa_public_keytype": "ssh-rsa",
"ansible_swapfree_mb": 0,
"ansible_swaptotal_mb": 0,
"ansible_system": "Linux",
"ansible_system_capabilities": [],
"ansible_system_capabilities_enforced": "False",
"ansible_system_vendor": "VMware, Inc.",
"ansible_uptime_seconds": 5396,
"ansible_user_dir": "/root",
"ansible_user_gecos": "root",
"ansible_user_gid": 0,
"ansible_user_id": "root",
"ansible_user_shell": "/bin/bash",
"ansible_user_uid": 0,
"ansible_userspace_architecture": "x86_64",
"ansible_userspace_bits": "64",
"ansible_virtualization_role": "guest",
"ansible_virtualization_tech_guest": [
"VMware"
],
"ansible_virtualization_tech_host": [],
"ansible_virtualization_type": "VMware",
"discovered_interpreter_python": "/usr/bin/python3",
"gather_subset": [
"all"
],
"module_setup": true
},
"changed": false
}
I changed the path as below and reinstalled ;
root@prdpostgres01:/var/lib/postgresql/14# ls -la
total 12
drwx------ 3 postgres postgres 4096 Jan 17 11:39 .
drwxr-xr-x 3 postgres postgres 4096 Jan 17 11:39 ..
drwx------ 19 postgres postgres 4096 Jan 17 11:39 main_2022-01-17-11-39-36
I changed the path as below and reinstalled ;
and still the same mistake in the Patroni log?
This is error;
TASK [patroni : Start patroni service on the Master server] ****************************************************************************************************************************************************
changed: [172.23.24.30]
TASK [patroni : Wait for port 8008 to become open on the host] *************************************************************************************************************************************************
fatal: [172.23.24.30]: FAILED! => {"changed": false, "elapsed": 120, "msg": "Timeout when waiting for 172.23.24.30:8008"}
NO MORE HOSTS LEFT *********************************************************************************************************************************************************************************************
PLAY RECAP *****************************************************************************************************************************************************************************************************
172.23.24.30 : ok=132 changed=65 unreachable=0 failed=1 skipped=247 rescued=0 ignored=0
172.23.24.31 : ok=129 changed=64 unreachable=0 failed=0 skipped=244 rescued=0 ignored=0
172.23.24.32 : ok=129 changed=64 unreachable=0 failed=0 skipped=244 rescued=0 ignored=0
localhost : ok=0 changed=0 unreachable=0 failed=0 skipped=1 rescued=0 ignored=0
This is patroni log;
root@prdpostgres01:/var/lib/postgresql/14# sudo journalctl -u patroni
-- Logs begin at Mon 2022-01-17 10:13:10 +03, end at Mon 2022-01-17 12:40:25 +03. --
Jan 17 11:39:34 prdpostgres01 systemd[1]: Started Runners to orchestrate a high-availability PostgreSQL - patroni.
Jan 17 11:39:34 prdpostgres01 patroni[59231]: 2022-01-17 11:39:34,651 INFO: Selected new etcd server http://172.23.24.31:2379
Jan 17 11:39:34 prdpostgres01 patroni[59231]: 2022-01-17 11:39:34,654 INFO: No PostgreSQL configuration items changed, nothing to reload.
Jan 17 11:39:34 prdpostgres01 patroni[59231]: 2022-01-17 11:39:34,661 INFO: Lock owner: None; I am prdpostgres01
Jan 17 11:39:34 prdpostgres01 patroni[59231]: 2022-01-17 11:39:34,671 INFO: trying to bootstrap a new cluster
Jan 17 11:39:34 prdpostgres01 patroni[59293]: The files belonging to this database system will be owned by user "postgres".
Jan 17 11:39:34 prdpostgres01 patroni[59293]: This user must also own the server process.
Jan 17 11:39:34 prdpostgres01 patroni[59293]: The database cluster will be initialized with locale "en_US.UTF-8".
Jan 17 11:39:34 prdpostgres01 patroni[59293]: The default text search configuration will be set to "english".
Jan 17 11:39:34 prdpostgres01 patroni[59293]: Data page checksums are enabled.
Jan 17 11:39:34 prdpostgres01 patroni[59293]: fixing permissions on existing directory /var/lib/postgresql/14/main ... ok
Jan 17 11:39:34 prdpostgres01 patroni[59293]: creating subdirectories ... ok
Jan 17 11:39:34 prdpostgres01 patroni[59293]: selecting dynamic shared memory implementation ... posix
Jan 17 11:39:34 prdpostgres01 patroni[59293]: selecting default max_connections ... 100
Jan 17 11:39:34 prdpostgres01 patroni[59293]: selecting default shared_buffers ... 128MB
Jan 17 11:39:34 prdpostgres01 patroni[59293]: selecting default time zone ... Europe/Istanbul
Jan 17 11:39:34 prdpostgres01 patroni[59293]: creating configuration files ... ok
Jan 17 11:39:34 prdpostgres01 patroni[59293]: running bootstrap script ... ok
Jan 17 11:39:35 prdpostgres01 patroni[59293]: performing post-bootstrap initialization ... ok
Jan 17 11:39:35 prdpostgres01 patroni[59293]: syncing data to disk ... ok
Jan 17 11:39:35 prdpostgres01 patroni[59293]: initdb: warning: enabling "trust" authentication for local connections
Jan 17 11:39:35 prdpostgres01 patroni[59293]: You can change this by editing pg_hba.conf or using the option -A, or
Jan 17 11:39:35 prdpostgres01 patroni[59293]: --auth-local and --auth-host, the next time you run initdb.
Jan 17 11:39:35 prdpostgres01 patroni[59293]: Success. You can now start the database server using:
Jan 17 11:39:35 prdpostgres01 patroni[59293]: /usr/lib/postgresql/14/bin/pg_ctl -D /var/lib/postgresql/14/main -l logfile start
Jan 17 11:39:35 prdpostgres01 patroni[59231]: 2022-01-17 11:39:35,630 INFO: postmaster pid=59337
Jan 17 11:39:35 prdpostgres01 patroni[59338]: /var/run/postgresql:5432 - no response
Jan 17 11:39:35 prdpostgres01 patroni[59337]: 2022-01-17 11:39:35 +03 [59337-1] LOG: redirecting log output to logging collector process
Jan 17 11:39:35 prdpostgres01 patroni[59337]: 2022-01-17 11:39:35 +03 [59337-2] HINT: Future log output will appear in directory "/var/log/postgresql".
Jan 17 11:39:36 prdpostgres01 patroni[59350]: /var/run/postgresql:5432 - accepting connections
Jan 17 11:39:36 prdpostgres01 patroni[59352]: /var/run/postgresql:5432 - accepting connections
Jan 17 11:39:36 prdpostgres01 patroni[59231]: 2022-01-17 11:39:36,669 INFO: establishing a new patroni connection to the postgres cluster
Jan 17 11:39:36 prdpostgres01 patroni[59231]: 2022-01-17 11:39:36,677 INFO: running post_bootstrap
Jan 17 11:39:36 prdpostgres01 patroni[59231]: 2022-01-17 11:39:36,678 ERROR: post_bootstrap
Jan 17 11:39:36 prdpostgres01 patroni[59231]: Traceback (most recent call last):
Jan 17 11:39:36 prdpostgres01 patroni[59231]: File "/usr/local/lib/python3.8/dist-packages/patroni/postgresql/bootstrap.py", line 330, in post_bootstrap
Jan 17 11:39:36 prdpostgres01 patroni[59231]: self.create_or_update_role(superuser['username'], superuser['password'], ['SUPERUSER'])
Jan 17 11:39:36 prdpostgres01 patroni[59231]: File "/usr/local/lib/python3.8/dist-packages/patroni/postgresql/bootstrap.py", line 319, in create_or_update_role
Jan 17 11:39:36 prdpostgres01 patroni[59231]: self._postgresql.query(sql)
Jan 17 11:39:36 prdpostgres01 patroni[59231]: File "/usr/local/lib/python3.8/dist-packages/patroni/postgresql/__init__.py", line 287, in query
Jan 17 11:39:36 prdpostgres01 patroni[59231]: return self.retry(self._query, sql, *args)
Jan 17 11:39:36 prdpostgres01 patroni[59231]: File "/usr/local/lib/python3.8/dist-packages/patroni/utils.py", line 334, in __call__
Jan 17 11:39:36 prdpostgres01 patroni[59231]: return func(*args, **kwargs)
Jan 17 11:39:36 prdpostgres01 patroni[59231]: File "/usr/local/lib/python3.8/dist-packages/patroni/postgresql/__init__.py", line 267, in _query
Jan 17 11:39:36 prdpostgres01 patroni[59231]: cursor.execute(sql, params)
Jan 17 11:39:36 prdpostgres01 patroni[59231]: IndexError: tuple index out of range
Jan 17 11:39:36 prdpostgres01 patroni[59231]: 2022-01-17 11:39:36,681 INFO: removing initialize key after failed attempt to bootstrap the cluster
Jan 17 11:39:36 prdpostgres01 patroni[59231]: 2022-01-17 11:39:36,797 INFO: renaming data directory to /var/lib/postgresql/14/main_2022-01-17-11-39-36
Jan 17 11:39:37 prdpostgres01 patroni[59231]: Traceback (most recent call last):
Jan 17 11:39:37 prdpostgres01 patroni[59231]: File "/usr/local/bin/patroni", line 8, in <module>
Jan 17 11:39:37 prdpostgres01 patroni[59231]: sys.exit(main())
Jan 17 11:39:37 prdpostgres01 patroni[59231]: File "/usr/local/lib/python3.8/dist-packages/patroni/__init__.py", line 182, in main
Jan 17 11:39:37 prdpostgres01 patroni[59231]: return patroni_main()
Jan 17 11:39:37 prdpostgres01 patroni[59231]: File "/usr/local/lib/python3.8/dist-packages/patroni/__init__.py", line 140, in patroni_main
Jan 17 11:39:37 prdpostgres01 patroni[59231]: abstract_main(Patroni, schema)
Jan 17 11:39:37 prdpostgres01 patroni[59231]: File "/usr/local/lib/python3.8/dist-packages/patroni/daemon.py", line 100, in abstract_main
Jan 17 11:39:37 prdpostgres01 patroni[59231]: controller.run()
Jan 17 11:39:37 prdpostgres01 patroni[59231]: File "/usr/local/lib/python3.8/dist-packages/patroni/__init__.py", line 110, in run
Jan 17 11:39:37 prdpostgres01 patroni[59231]: super(Patroni, self).run()
Jan 17 11:39:37 prdpostgres01 patroni[59231]: File "/usr/local/lib/python3.8/dist-packages/patroni/daemon.py", line 59, in run
Jan 17 11:39:37 prdpostgres01 patroni[59231]: self._run_cycle()
Jan 17 11:39:37 prdpostgres01 patroni[59231]: File "/usr/local/lib/python3.8/dist-packages/patroni/__init__.py", line 113, in _run_cycle
Jan 17 11:39:37 prdpostgres01 patroni[59231]: logger.info(self.ha.run_cycle())
Jan 17 11:39:37 prdpostgres01 patroni[59231]: File "/usr/local/lib/python3.8/dist-packages/patroni/ha.py", line 1502, in run_cycle
Jan 17 11:39:37 prdpostgres01 patroni[59231]: info = self._run_cycle()
Jan 17 11:39:37 prdpostgres01 patroni[59231]: File "/usr/local/lib/python3.8/dist-packages/patroni/ha.py", line 1376, in _run_cycle
Jan 17 11:39:37 prdpostgres01 patroni[59231]: return self.post_bootstrap()
Jan 17 11:39:37 prdpostgres01 patroni[59231]: File "/usr/local/lib/python3.8/dist-packages/patroni/ha.py", line 1268, in post_bootstrap
Jan 17 11:39:37 prdpostgres01 patroni[59231]: self.cancel_initialization()
Jan 17 11:39:37 prdpostgres01 patroni[59231]: File "/usr/local/lib/python3.8/dist-packages/patroni/ha.py", line 1261, in cancel_initialization
Jan 17 11:39:37 prdpostgres01 patroni[59231]: raise PatroniFatalException('Failed to bootstrap cluster')
Jan 17 11:39:37 prdpostgres01 patroni[59231]: patroni.exceptions.PatroniFatalException: 'Failed to bootstrap cluster'
Jan 17 11:39:37 prdpostgres01 systemd[1]: patroni.service: Main process exited, code=exited, status=1/FAILURE
Jan 17 11:39:37 prdpostgres01 systemd[1]: patroni.service: Failed with result 'exit-code'.
now another mistake IndexError: tuple index out of range
This is something new. \
Can you additionally attach a log from /var/log/postgresql
?
root@prdpostgres01:/var/log/postgresql# ls -la
total 16
drwx------ 2 postgres postgres 4096 Jan 17 11:39 .
drwxrwxr-x 12 root syslog 4096 Jan 17 11:38 ..
-rw-r--r-- 1 postgres postgres 517 Jan 17 11:38 pgbouncer.log
-rw-r----- 1 postgres postgres 0 Jan 17 11:39 postgresql-14-main.log
-rw------- 1 postgres postgres 797 Jan 17 11:39 postgresql-Mon.log
root@prdpostgres01:/var/log/postgresql# cat pgbouncer.log
2022-01-17 11:38:43.913 +03 [56193] LOG kernel file descriptor limit: 1024 (hard: 524288); max_client_conn: 100, max expected fd use: 112
2022-01-17 11:38:43.918 +03 [56193] LOG listening on 127.0.0.1:6432
2022-01-17 11:38:43.918 +03 [56193] LOG listening on unix:/var/run/postgresql/.s.PGSQL.6432
2022-01-17 11:38:43.918 +03 [56193] LOG process up: PgBouncer 1.16.1, libevent 2.1.11-stable (epoll), adns: c-ares 1.15.0, tls: OpenSSL 1.1.1f 31 Mar 2020
2022-01-17 11:38:49.024 +03 [56193] LOG got SIGTERM, fast exit
root@prdpostgres01:/var/log/postgresql# cat postgresql-14-main.log
root@prdpostgres01:/var/log/postgresql# cat postgresql-Mon.log
2022-01-17 11:39:35 +03 [59337-3] LOG: starting PostgreSQL 14.1 (Ubuntu 14.1-2.pgdg20.04+1) on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0, 64-bit
2022-01-17 11:39:35 +03 [59337-4] LOG: listening on IPv4 address "172.23.24.30", port 5432
2022-01-17 11:39:35 +03 [59337-5] LOG: listening on IPv4 address "127.0.0.1", port 5432
2022-01-17 11:39:35 +03 [59337-6] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2022-01-17 11:39:35 +03 [59342-1] LOG: database system was shut down at 2022-01-17 11:39:35 +03
2022-01-17 11:39:35 +03 [59337-7] LOG: database system is ready to accept connections
2022-01-17 11:39:36 +03 [59337-8] LOG: received immediate shutdown request
2022-01-17 11:39:36 +03 [59337-9] LOG: database system is shut down
I have just deployed a cluster on Ubuntu 20.04.3 and there is no error (IndexError: tuple index out of range), perhaps it is not always reproduced. Why Patroni gave an error in your case, I still find it difficult to answer, it may be worth creating an issue on the Patroni project repository.
Try specifying another server as the "master".
TASK [deploy-finish : Check postgresql cluster health] **********************************************************************************************************************************************************************************************************************************************************************************************
ok: [10.128.64.136]
TASK [deploy-finish : PostgreSQL Cluster health] ****************************************************************************************************************************************************************************************************************************************************************************************************
ok: [10.128.64.136] => {
"patronictl_result.stdout_lines": [
"+----------+---------------+--------+---------+----+-----------+",
"| Member | Host | Role | State | TL | Lag in MB |",
"+ Cluster: postgres-cluster (7054125532524637203) -+-----------+",
"| pgnode01 | 10.128.64.136 | Leader | running | 1 | |",
"+----------+---------------+--------+---------+----+-----------+"
]
}
TASK [deploy-finish : Get postgresql database list] *************************************************************************************************************************************************************************************************************************************************************************************************
ok: [10.128.64.136 -> 10.128.64.136]
TASK [deploy-finish : PostgreSQL list of databases] *************************************************************************************************************************************************************************************************************************************************************************************************
ok: [10.128.64.136] => {
"dbs_result.stdout_lines": [
" name | owner | encoding | collate | ctype | size | tablespace ",
"----------+----------+----------+-------------+-------------+---------+------------",
" postgres | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | 8529 kB | pg_default",
"(1 row)"
]
}
TASK [deploy-finish : Create list of nodes] *********************************************************************************************************************************************************************************************************************************************************************************************************
ok: [10.128.64.136]
TASK [deploy-finish : PostgreSQL Cluster connection info] *******************************************************************************************************************************************************************************************************************************************************************************************
ok: [10.128.64.136] => {
"msg": [
"+------------------------------------------------+",
"address 10.128.64.136",
"port 6432 (pgbouncer)",
"+------------------------------------------------+"
]
}
root@host01:~/postgresql_cluster# journalctl -u patroni
-- Logs begin at Mon 2021-12-13 12:30:50 UTC, end at Mon 2022-01-17 10:51:22 UTC. --
Jan 17 10:49:46 pgnode01 systemd[1]: Started Runners to orchestrate a high-availability PostgreSQL - patroni.
Jan 17 10:49:47 pgnode01 patroni[11219]: 2022-01-17 10:49:47,920 INFO: Selected new etcd server http://10.128.64.136:2379
Jan 17 10:49:47 pgnode01 patroni[11219]: 2022-01-17 10:49:47,937 INFO: No PostgreSQL configuration items changed, nothing to reload.
Jan 17 10:49:47 pgnode01 patroni[11219]: 2022-01-17 10:49:47,955 INFO: Lock owner: None; I am pgnode01
Jan 17 10:49:47 pgnode01 patroni[11219]: 2022-01-17 10:49:47,959 INFO: trying to bootstrap a new cluster
Jan 17 10:49:48 pgnode01 patroni[11275]: The files belonging to this database system will be owned by user "postgres".
Jan 17 10:49:48 pgnode01 patroni[11275]: This user must also own the server process.
Jan 17 10:49:48 pgnode01 patroni[11275]: The database cluster will be initialized with locale "en_US.UTF-8".
Jan 17 10:49:48 pgnode01 patroni[11275]: The default text search configuration will be set to "english".
Jan 17 10:49:48 pgnode01 patroni[11275]: Data page checksums are enabled.
Jan 17 10:49:48 pgnode01 patroni[11275]: fixing permissions on existing directory /var/lib/postgresql/14/main ... ok
Jan 17 10:49:48 pgnode01 patroni[11275]: creating subdirectories ... ok
Jan 17 10:49:48 pgnode01 patroni[11275]: selecting dynamic shared memory implementation ... posix
Jan 17 10:49:48 pgnode01 patroni[11275]: selecting default max_connections ... 100
Jan 17 10:49:48 pgnode01 patroni[11275]: selecting default shared_buffers ... 128MB
Jan 17 10:49:48 pgnode01 patroni[11275]: selecting default time zone ... Etc/UTC
Jan 17 10:49:48 pgnode01 patroni[11275]: creating configuration files ... ok
Jan 17 10:49:48 pgnode01 patroni[11275]: running bootstrap script ... ok
Jan 17 10:49:49 pgnode01 patroni[11275]: performing post-bootstrap initialization ... ok
Jan 17 10:49:49 pgnode01 patroni[11275]: syncing data to disk ... ok
Jan 17 10:49:49 pgnode01 patroni[11275]: initdb: warning: enabling "trust" authentication for local connections
Jan 17 10:49:49 pgnode01 patroni[11275]: You can change this by editing pg_hba.conf or using the option -A, or
Jan 17 10:49:49 pgnode01 patroni[11275]: --auth-local and --auth-host, the next time you run initdb.
Jan 17 10:49:49 pgnode01 patroni[11275]: Success. You can now start the database server using:
Jan 17 10:49:49 pgnode01 patroni[11275]: /usr/lib/postgresql/14/bin/pg_ctl -D /var/lib/postgresql/14/main -l logfile start
Jan 17 10:49:49 pgnode01 patroni[11219]: 2022-01-17 10:49:49,966 INFO: postmaster pid=11291
Jan 17 10:49:50 pgnode01 patroni[11292]: /var/run/postgresql:5432 - no response
Jan 17 10:49:50 pgnode01 patroni[11291]: 2022-01-17 10:49:50 UTC [11291-1] LOG: redirecting log output to logging collector process
Jan 17 10:49:50 pgnode01 patroni[11291]: 2022-01-17 10:49:50 UTC [11291-2] HINT: Future log output will appear in directory "/var/log/postgresql".
Jan 17 10:49:51 pgnode01 patroni[11302]: /var/run/postgresql:5432 - accepting connections
Jan 17 10:49:51 pgnode01 patroni[11304]: /var/run/postgresql:5432 - accepting connections
Jan 17 10:49:51 pgnode01 patroni[11219]: 2022-01-17 10:49:51,072 INFO: establishing a new patroni connection to the postgres cluster
Jan 17 10:49:51 pgnode01 patroni[11219]: 2022-01-17 10:49:51,088 INFO: running post_bootstrap
Jan 17 10:49:51 pgnode01 patroni[11219]: 2022-01-17 10:49:51,146 INFO: initialized a new cluster
Jan 17 10:50:01 pgnode01 patroni[11219]: 2022-01-17 10:50:01,141 INFO: no action. I am (pgnode01), the leader with the lock
root@host01:~# cat /etc/os-release
NAME="Ubuntu"
VERSION="20.04.3 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.3 LTS"
VERSION_ID="20.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal
Thank you for your interest and answers. I will try in a different environment.
@mcankck how are you doing with deployment?
@vitabaks I think the problem was with the machine, I did it on a different machine and I didn't get any errors.
Hi, I have a problem the postgresql cluster deploy. The problem is with patroni , the error is as below ;
Pgbouncer log is as below ;