You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In our scenario (we run CCDB on postgres-release) this bug has caused an extended Cloudfoundry downtime triggered by forced VM reboots which were required to deploy urgent security fixes on the IaaS level.
The text was updated successfully, but these errors were encountered:
Steps to reproduce
nova reboot <VM_CID>
if on openstack)Observed behaviour
/var/vcap/sys/run/postgres/
does not exist.from
postgres_ctl.err.log
:the important line from log above is
Expected behaviour
postgres is able to survive a VM reboot.
Workaround
bosh ssh into the postgres VM and manually execute
Possible fix
there are similar bugs already fixed in other bosh releases, see e.g. cloudfoundry/capi-release#25
I think the problem is that the control scripts rely on prestart to create
$RUN_DIR
:postgres-release/jobs/postgres/templates/pre-start.sh.erb
Lines 49 to 50 in 6e31baf
and in case of external VM reboot (i.e. outside of any bosh operation), prestart is not executed.
/var/vcap/data/sys/run/
is a temp file systemand thus is empty after VM reboot (which is fine).
although there is an
mkdir -p $RUN_DIR
inpostgres-release/jobs/postgres/templates/postgres_ctl.sh.erb
Line 42 in 6e31baf
, this is too late in case of VM reboot because of this line executed earlier:
postgres-release/jobs/postgres/templates/postgres_ctl.sh.erb
Line 18 in 6e31baf
which assumes the directory
$RUN_DIR
already exists.Initialization of
$RUN_DIR
should probably happen as the very first thing when start) is invoked, see the fix for a similar problem in cloud_controller_ngIn our scenario (we run CCDB on postgres-release) this bug has caused an extended Cloudfoundry downtime triggered by forced VM reboots which were required to deploy urgent security fixes on the IaaS level.
The text was updated successfully, but these errors were encountered: