Opened 4 years ago

Closed 2 years ago

#429 closed defect (fixed)

remove Check for the PGDATA structure in rasdaman init script

Reported by: damiano Owned by: nkolev
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 Changed 4 years ago by dmisev

  • Owner changed from dmisev to nkolev
  • Status changed from new to assigned

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

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

Last edited 4 years ago by dmisev (previous) (diff)

comment:2 Changed 4 years ago by nkolev

  • Status changed from assigned to accepted

comment:3 Changed 4 years ago by nkolev

  • Resolution set to fixed
  • Status changed from accepted to closed

comment:4 Changed 3 years ago by damiano

  • Resolution fixed deleted
  • Status changed from closed to reopened
  • Version changed from 8.4 to 8.5

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

comment:5 Changed 3 years ago by dmisev

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

comment:6 Changed 3 years ago by damiano

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 Changed 3 years ago by dmisev

Patch submitted.

comment:8 Changed 2 years ago by dmisev

  • Resolution set to fixed
  • Status changed from reopened to closed
Note: See TracTickets for help on using tickets.