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

pgbackrest_env.stderr output #1532

Open
Eric-zch opened this issue Apr 7, 2023 · 1 comment
Open

pgbackrest_env.stderr output #1532

Eric-zch opened this issue Apr 7, 2023 · 1 comment
Labels

Comments

@Eric-zch
Copy link

Eric-zch commented Apr 7, 2023

Hi There,

I just noticed the output from file /tmp/pgbackrest_env.stderr in Crunchy Postgres Pod.

$oc get pods --selector=postgres-operator.crunchydata.com/instance-set -L postgres-operator.crunchydata.com/role
NAME                    READY   STATUS    RESTARTS   AGE   ROLE
pnst-instance1-hjkm-0   5/5     Running   0          15d   master
pnst-instance1-tw8w-0   5/5     Running   0          14d   replica
$oc exec -it pnst-instance1-hjkm-0 -c database -- bash
bash-4.4$ cd /tmp
bash-4.4$ ls -l
total 68
drwxrwsr-x. 3 postgres postgres  4096 Mar 23 07:52 nss_wrapper
drwxr-s---. 2 postgres postgres  4096 Apr  7 01:00 pgbackrest
-rw-------. 1 postgres postgres   105 Apr  7 09:18 pgbackrest_env.stderr
-rw-------. 1 postgres postgres     0 Apr  7 09:18 pgbackrest_env.stdout
drwxr-sr-x. 2 postgres postgres  4096 Apr  4 05:49 postgres
-rw-r--r--. 1 postgres postgres     4 Mar 23 07:53 postgres_exporter.pid
-rw-r--r--. 1 postgres postgres 41253 Mar 23 07:53 queries.yml
drwxr-sr-x. 2 postgres postgres  4096 Mar 23 07:52 replication
bash-4.4$ 
bash-4.4$ cat pgbackrest_env.stderr
/opt/crunchy/bin/postgres/pgbackrest_info.sh: line 16: /tmp/pgbackrest_env.sh: No such file or directory
bash-4.4$ 
bash-4.4$ cat /opt/crunchy/bin/postgres/pgbackrest_info.sh
#!/bin/bash

# Copyright 2019 - 2022 Crunchy Data Solutions, Inc.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

source /tmp/pgbackrest_env.sh > /tmp/pgbackrest_env.stdout 2> /tmp/pgbackrest_env.stderr

cmd_args=()
# if TLS verification is disabled, pass in the appropriate flag
# otherwise, leave the default behavior and verify TLS
if [[ "${PGHA_PGBACKREST_S3_VERIFY_TLS}" == "false" ]]
then
    cmd_args+=("--no-repo1-s3-verify-tls")
fi

echo $(echo -n "$conf|" | tr '/' '_'; pgbackrest --output=json ${cmd_args[*]} info | tr -d '\n')
bash-4.4$ 

As there is no /tmp/pgbackrest_env.sh, I got this message:

bash-4.4$ cat pgbackrest_env.stderr
/opt/crunchy/bin/postgres/pgbackrest_info.sh: line 16: /tmp/pgbackrest_env.sh: No such file or directory

Is this a problem we need to take care of?

Thank you.

@tony-landreth
Copy link
Contributor

Hi @Eric-zch! Thanks for pointing this out. I'll add a story to our backlog.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants