Bug 1033043 - [engine-setup] engine-setup should detect if postgresql's shared_buffers are below active kernel.shmmax
[engine-setup] engine-setup should detect if postgresql's shared_buffers are ...
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine-setup (Show other bugs)
3.3.0
Unspecified Unspecified
medium Severity medium
: ---
: 3.4.0
Assigned To: Ofer Schreiber
Jiri Belka
integration
: ZStream
Depends On:
Blocks: 1059355 rhev3.4beta 1142926
  Show dependency treegraph
 
Reported: 2013-11-21 08:17 EST by Jiri Belka
Modified: 2014-09-18 08:24 EDT (History)
8 users (show)

See Also:
Fixed In Version: ovirt-3.4.0-beta2
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1059355 (view as bug list)
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
oVirt gerrit 23284 None None None Never
oVirt gerrit 23843 None None None Never
oVirt gerrit 23845 None None None Never

  None (edit)
Description Jiri Belka 2013-11-21 08:17:01 EST
Description of problem:
engine-setup should detect if postgresql's shared_buffers are below active kernel.shmmax.

if kernel.shmmax is below what needs postgresql to start it fails. starting the postgresql is part of engine-setup step to create engine database. thus all engine-setup fails and message is little blurry.

OS had  kernel.shmmax=30000000 when executing kernel.shmmax.

[ INFO  ] Creating PostgreSQL database
[ ERROR ] Failed to execute stage 'Misc configuration': Command '/sbin/service' failed to execute
[ INFO  ] Yum Performing yum transaction rollback
[ INFO  ] Stage: Clean up
          Log file is located at /var/log/ovirt-engine/setup/ovirt-engine-setup-20131121134830.log
[ INFO  ] Stage: Pre-termination
[ INFO  ] Stage: Termination
[ ERROR ] Execution of setup failed

* engine-setup:

...snip...
[ INFO  ] Creating PostgreSQL database
[ ERROR ] Failed to execute stage 'Misc configuration': Command '/sbin/service' failed to execute
[ INFO  ] Yum Performing yum transaction rollback
[ INFO  ] Stage: Clean up
          Log file is located at /var/log/ovirt-engine/setup/ovirt-engine-setup-20131121134830.log
[ INFO  ] Stage: Pre-termination
[ INFO  ] Stage: Termination
[ ERROR ] Execution of setup failed

* pgstartup.log

...snip...
LOG:  could not bind IPv6 socket: Cannot assign requested address
HINT:  Is another postmaster already running on port 5432? If not, wait a few seconds and retry.
FATAL:  could not create shared memory segment: Invalid argument
DETAIL:  Failed system call was shmget(key=5432001, size=39280640, 03600).
HINT:  This error usually means that PostgreSQL's request for a shared memory segment exceeded your kernel's SHMMAX parameter.  You can either reduce the reque
st size or reconfigure the kernel with larger SHMMAX.  To reduce the request size (currently 39280640 bytes), reduce PostgreSQL's shared_buffers parameter (cur
rently 4096) and/or its max_connections parameter (currently 153).
        If the request size is already small, it's possible that it is less than your kernel's SHMMIN parameter, in which case raising the request size or reco
nfiguring SHMMIN is called for.
        The PostgreSQL documentation contains more information about shared memory configuration.


Version-Release number of selected component (if applicable):
is24

How reproducible:
100%

Steps to Reproduce:
1. sysctl -w kernel.shmmax=30000000
2. engine-setup
3.

Actual results:
engine-setup fails as postgresql startup fails

Expected results:
either tell user it cannot continue before of low kernel.shmmax value or change it (if possible) on-fly and proceed

Additional info:
Comment 1 Jiri Belka 2013-11-21 08:18:31 EST
Default rhel 6.5 was 68719476736. So we are generally OK.
Comment 2 Sandro Bonazzola 2013-11-21 08:21:23 EST
(In reply to Jiri Belka from comment #1)
> Default rhel 6.5 was 68719476736. So we are generally OK.

Reducing priority to medium, proposing this for 3.3.1.
Comment 4 Jiri Belka 2014-02-13 07:21:10 EST
ok, ovirt-engine-setup-3.4.0-0.7.beta2.el6.noarch

...
2014-02-13 12:48:19 DEBUG otopi.transaction transaction._prepare:77 preparing 'File transaction for '/etc/sysctl.d/ovirt-engine.conf''
2014-02-13 12:48:19 DEBUG otopi.filetransaction filetransaction.prepare:189 file '/etc/sysctl.d/ovirt-engine.conf' missing
2014-02-13 12:48:19 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine.system.sysctl plugin.executeRaw:366 execute: ('/sbin/sysctl', '-p', '/etc/sysctl.d/ovirt-engine.conf.hNmwvs.tmp'), executable='None', cwd='None', env=None
2014-02-13 12:48:19 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine.system.sysctl plugin.executeRaw:383 execute-result: ('/sbin/sysctl', '-p', '/etc/sysctl.d/ovirt-engine.conf.hNmwvs.tmp'), rc=0
2014-02-13 12:48:19 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine.system.sysctl plugin.execute:441 execute-output: ('/sbin/sysctl', '-p', '/etc/sysctl.d/ovirt-engine.conf.hNmwvs.tmp') stdout:
kernel.shmmax = 68719476736

2014-02-13 12:48:19 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine.system.sysctl plugin.execute:446 execute-output: ('/sbin/sysctl', '-p', '/etc/sysctl.d/ovirt-engine.conf.hNmwvs.tmp') stderr:
...
Comment 5 Itamar Heim 2014-06-12 10:11:36 EDT
Closing as part of 3.4.0

Note You need to log in before you can comment on or make changes to this bug.