[ClusterLabs] Add Resource Environment Variables
Tiemen Ruiten
t.ruiten at tech-lab.io
Mon Jul 15 13:39:43 EDT 2019
The pgsql resource agent uses /bin/sh. I think it doesn't work because on
RH/CentOS, /bin/sh is linked to bash, whereas on Ubuntu it's linked to
dash, which doesn't source .bash_profile (which in turn sources
.pgsql_profile on my system). You could try putting it in .profile? I don't
currently have access to an Ubuntu system to confirm this though.
On Mon, Jul 15, 2019 at 6:51 PM Patrick <clusterlabs at localhorst.es> wrote:
> Hi Tiemen,
>
> thank you for your fast response.
> At the moment using .pgsql_profile seems not working for me.
> Can you confirm that I should see the ORACLE_HOME env by grepping
> /proc/$pid_of_postmaster/environ? If I run 'pg_ctl -D /pgdata start' I can
> see the variable there. If I let Pacemaker
> start the resource, ORACLE_HOME is not present, when I grep under
> /proc/****/environ.
>
> PostgreSQL is compiled from source and is running on Ubuntu 18.04.
>
> On Jul 15, 2019 4:53:47 PM, Tiemen Ruiten wrote:
>
> You could just export the variables in .pgsql_profile in the home
> directory of the user running PostgreSQL (usually /var/lib/pgsql). This is
> what I have in there for oracle_fdw:
>
> export PATH=$PATH:/usr/pgsql-11/bin
> ORACLE_HOME=/usr/lib/oracle/12.1/client64
> export LD_LIBRARY_PATH="$ORACLE_HOME/lib"
>
>
> At least if you installed the RPMs from the PGDG repo, this file will be
> sourced by .bash_profile.
>
> On Mon, Jul 15, 2019 at 4:24 PM Patrick <clusterlabs at localhorst.es> wrote:
>
> Hi,
>
> I successfully set up a pacemaker cluster serving PostgreSQL.
> I now have to pass some Oracle specific environment variables (i.e.
> ORACLE_HOME, TNS_ADMIN) to the PostgreSQL resource.
> I tried this by editing the resource ocf script
> "/usr/lib/ocf/resource.d/heartbeat/pgsql" without success.
> Can someone tell me how to solve this?
>
> Kind regards,
> Patrick
> _______________________________________________
> Manage your subscription:
> https://lists.clusterlabs.org/mailman/listinfo/users
>
> ClusterLabs home: https://www.clusterlabs.org/
>
> _______________________________________________
> Manage your subscription:
> https://lists.clusterlabs.org/mailman/listinfo/users
>
> ClusterLabs home: https://www.clusterlabs.org/
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.clusterlabs.org/pipermail/users/attachments/20190715/51aa56d2/attachment.html>
More information about the Users
mailing list