Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: perform tasks of the "copy" role with root privilege #525

Merged
merged 1 commit into from
Dec 7, 2023

Conversation

vitabaks
Copy link
Owner

@vitabaks vitabaks commented Dec 7, 2023

When pg_upgrade is executed, tasks are run from under the postgres user and in some cases these privileges are not enough.

Fixed:

TASK [copy : Copy files to all servers] ****************************************
failed: [10.128.67.9] (item={'src': 'files/numbers.syn', 'dest': '/usr/share/postgresql/15/tsearch_data/numbers.syn', 'owner': 'root', 'group': 'root', 'mode': '0644'}) => {"ansible_loop_var": "item", "changed": false, "checksum": "2eac4d89c90cd673d3c37035a62972b548b53120", "item": {"dest": "/usr/share/postgresql/15/tsearch_data/numbers.syn", "group": "root", "mode": "0644", "owner": "root", "src": "files/numbers.syn"}, "msg": "Destination /usr/share/postgresql/15/tsearch_data not writable"}
failed: [10.128.67.8] (item={'src': 'files/numbers.syn', 'dest': '/usr/share/postgresql/15/tsearch_data/numbers.syn', 'owner': 'root', 'group': 'root', 'mode': '0644'}) => {"ansible_loop_var": "item", "changed": false, "checksum": "2eac4d89c90cd673d3c37035a62972b548b53120", "item": {"dest": "/usr/share/postgresql/15/tsearch_data/numbers.syn", "group": "root", "mode": "0644", "owner": "root", "src": "files/numbers.syn"}, "msg": "Destination /usr/share/postgresql/15/tsearch_data not writable"}
failed: [10.128.67.9] (item={'src': 'files/part_of_speech_russian.stop', 'dest': '/usr/share/postgresql/15/tsearch_data/part_of_speech_russian.stop', 'owner': 'root', 'group': 'root', 'mode': '0644'}) => {"ansible_loop_var": "item", "changed": false, "checksum": "ee14179a64f09f9b14bf3bebe9cbac2d31eee513", "item": {"dest": "/usr/share/postgresql/15/tsearch_data/part_of_speech_russian.stop", "group": "root", "mode": "0644", "owner": "root", "src": "files/part_of_speech_russian.stop"}, "msg": "Destination /usr/share/postgresql/15/tsearch_data not writable"}
failed: [10.128.67.8] (item={'src': 'files/part_of_speech_russian.stop', 'dest': '/usr/share/postgresql/15/tsearch_data/part_of_speech_russian.stop', 'owner': 'root', 'group': 'root', 'mode': '0644'}) => {"ansible_loop_var": "item", "changed": false, "checksum": "ee14179a64f09f9b14bf3bebe9cbac2d31eee513", "item": {"dest": "/usr/share/postgresql/15/tsearch_data/part_of_speech_russian.stop", "group": "root", "mode": "0644", "owner": "root", "src": "files/part_of_speech_russian.stop"}, "msg": "Destination /usr/share/postgresql/15/tsearch_data not writable"}
failed: [10.128.67.9] (item={'src': 'files/ru_ru.affix', 'dest': '/usr/share/postgresql/15/tsearch_data/ru_ru.affix', 'owner': 'root', 'group': 'root', 'mode': '0644'}) => {"ansible_loop_var": "item", "changed": false, "checksum": "6c9a3a9f414963f49fc466fda3eff30b12879c71", "item": {"dest": "/usr/share/postgresql/15/tsearch_data/ru_ru.affix", "group": "root", "mode": "0644", "owner": "root", "src": "files/ru_ru.affix"}, "msg": "Destination /usr/share/postgresql/15/tsearch_data not writable"}
failed: [10.128.67.8] (item={'src': 'files/ru_ru.affix', 'dest': '/usr/share/postgresql/15/tsearch_data/ru_ru.affix', 'owner': 'root', 'group': 'root', 'mode': '0644'}) => {"ansible_loop_var": "item", "changed": false, "checksum": "6c9a3a9f414963f49fc466fda3eff30b12879c71", "item": {"dest": "/usr/share/postgresql/15/tsearch_data/ru_ru.affix", "group": "root", "mode": "0644", "owner": "root", "src": "files/ru_ru.affix"}, "msg": "Destination /usr/share/postgresql/15/tsearch_data not writable"}
failed: [10.128.67.9] (item={'src': 'files/ru_ru.dict', 'dest': '/usr/share/postgresql/15/tsearch_data/ru_ru.dict', 'owner': 'root', 'group': 'root', 'mode': '0644'}) => {"ansible_loop_var": "item", "changed": false, "checksum": "2a079128f334ec1a359e8e33393f8fe12f75f746", "item": {"dest": "/usr/share/postgresql/15/tsearch_data/ru_ru.dict", "group": "root", "mode": "0644", "owner": "root", "src": "files/ru_ru.dict"}, "msg": "Destination /usr/share/postgresql/15/tsearch_data not writable"}
failed: [10.128.67.8] (item={'src': 'files/ru_ru.dict', 'dest': '/usr/share/postgresql/15/tsearch_data/ru_ru.dict', 'owner': 'root', 'group': 'root', 'mode': '0644'}) => {"ansible_loop_var": "item", "changed": false, "checksum": "2a079128f334ec1a359e8e33393f8fe12f75f746", "item": {"dest": "/usr/share/postgresql/15/tsearch_data/ru_ru.dict", "group": "root", "mode": "0644", "owner": "root", "src": "files/ru_ru.dict"}, "msg": "Destination /usr/share/postgresql/15/tsearch_data not writable"}

@vitabaks vitabaks self-assigned this Dec 7, 2023
@vitabaks vitabaks merged commit 945feb8 into master Dec 7, 2023
17 checks passed
@vitabaks vitabaks deleted the copy-become branch December 7, 2023 14:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant