brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aled Sage (JIRA)" <>
Subject [jira] [Resolved] (BROOKLYN-108) Postgres entity fails on rebind: serviceUp=false
Date Wed, 24 Dec 2014 11:21:13 GMT


Aled Sage resolved BROOKLYN-108.
       Resolution: Fixed
    Fix Version/s: 0.7.0-SNAPSHOT

The Postgres entity behaves a little differently from most entities, because code is run as
the `postgres` user. It checks if the install dir would be accessible by that user, and if
not then sets up an alternative install dir - setting the `INSTALL_DIR` attribute on the entity

On rebind, the `getInstallDir()` method was not correctly retrieving the attribute value so
the value was being over-written by the default.

Fixed now in 0.7.0-SNAPSHOT.

> Postgres entity fails on rebind: serviceUp=false
> ------------------------------------------------
>                 Key: BROOKLYN-108
>                 URL:
>             Project: Brooklyn
>          Issue Type: Bug
>    Affects Versions: 0.7.0-SNAPSHOT
>         Environment: CentOS 6.4
>            Reporter: Aled Sage
>            Assignee: Aled Sage
>             Fix For: 0.7.0-SNAPSHOT
> I deployed Postgres to aws-ec2 successfully (with persistence enabled in Brooklyn). I
then stopped and restarted Brooklyn. The rebind to Postgres was successful, but the entity
showed as serviceUp=false due to repeated:
> {noformat}
> 2014-12-23 21:48:38,321 DEBUG b.u.task.BasicExecutionManager [brooklyn-execmanager-VcUs2dBg-166]:
Exception running task Task[ssh: check-running PostgreSqlNodeImpl{id=bFSjnbH9}:X2rPfdeN] (rethrowing):
Execution failed, invalid result 126 for check-running PostgreSqlN
> odeImpl{id=bFSjnbH9}
> {noformat}
> This is happening because postgres `$INSTALL_DIR` is `/home/users/compose/brooklyn-managed-processes/installs/PostgreSqlNode_9.3-1`,
which is not visible to the postgres user.
> The command be executed periodically is:
> {noformat}
> export RUN_DIR="/opt/brooklyn/postgres/apps/CUnY9qiv/bFSjnbH9" ; mkdir -p $RUN_DIR ;
cd $RUN_DIR ; test -f /opt/brooklyn/postgres/apps/CUnY9qiv/bFSjnbH9/ || exit
1 ; ps -p `cat /opt/brooklyn/postgres/apps/CUnY9qiv/bFSjnbH9/` ; { sudo -E
>  -n -u postgres -s -- /home/users/compose/brooklyn-managed-processes/installs/PostgreSqlNode_9.3-1/bin/pg_ctl
-D /opt/brooklyn/postgres/apps/CUnY9qiv/bFSjnbH9/data -l /opt/brooklyn/postgres/apps/CUnY9qiv/bFSjnbH9/postgresql.log
status ; }
> {noformat}
> What I don't understand is why the Postgres entity didn't show as on-fire before Brooklyn
was restarted!

This message was sent by Atlassian JIRA

View raw message