Opened 11 years ago

Closed 10 years ago

#429 closed defect (fixed)

remove Check for the PGDATA structure in rasdaman init script

Reported by: damiano Owned by: Nikolche Kolev
Priority: minor Milestone:
Component: undecided Version: 8.5
Keywords: Cc: mantovani@…
Complexity: Easy

Description

Since a postgreSQL database can be installed also on a remote server (usually I do it), the check performed into the start function of "/etc/rc.d/init.d/rasdaman" file have to be removed or, alternatively, improved.

A check like the following, with variables derived from "/etc/rasdaman/rasmgr.conf" is in my opinion more appropriate

PGPASSWORD=$PASSWD
export PGPASSWORD
psql -l -h $HOST -U $USER -p $PORT | grep RASBASE

damiano


Current code that should be removed:

  # Check for the PGDATA structure
  #if [ -f "$PGDATA/PG_VERSION" ] && [ -d "$PGDATA/base" ]
  #then
  #  echo
  #  echo $"PostgreSQL database was found."
  #  echo $"Version is not checked here."
  #  echo $"Location $PGDATA."
  #else
  #  # No existing PGDATA! Warn the user to initdb it.
  #  echo
  #  echo "$PGDATA is missing. Use \"service rasmgr initdb\" to initialize the cluster first."
  #  echo "PostgreSQL database will be initialized automatically."
  #  echo_failure
  #  echo
  #  exit 1
  #fi

Change History (8)

comment:1 by Dimitar Misev, 11 years ago

Owner: changed from Dimitar Misev to Nikolche Kolev
Status: newassigned

File in question is src:packaging/rpm/rasdaman.init.in

I suggest we simply comment it out for now, in future we may consider parsing rasmgr.conf

Version 0, edited 11 years ago by Dimitar Misev (next)

comment:2 by Nikolche Kolev, 11 years ago

Status: assignedaccepted

comment:3 by Nikolche Kolev, 11 years ago

Resolution: fixed
Status: acceptedclosed

comment:4 by damiano, 11 years ago

Resolution: fixed
Status: closedreopened
Version: 8.48.5

installing 8.5.3 rpms the "Check for the PGDATA structure" in /etc/init.d/rasdaman init script came back

comment:5 by Dimitar Misev, 11 years ago

Apparently this has never been fixed in 8.x, only in v9.

comment:6 by damiano, 11 years ago

also rasdaman at version 9 performs postgresql checks that fail if RASBASE is installed on a remote server

1) check postgresql status in "check_postgres_running()" function
2) check if RASBASE exist locally in "start()" function


$rpm -qa | grep rasda
rasdaman-petascope-9.0.1-0.el6.noarch
rasdaman-9.0.1-0.el6.x86_64

comment:7 by Dimitar Misev, 10 years ago

Patch submitted.

comment:8 by Dimitar Misev, 10 years ago

Resolution: fixed
Status: reopenedclosed
Note: See TracTickets for help on using tickets.