Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1033043 - [engine-setup] engine-setup should detect if postgresql's shared_buffers are below active kernel.shmmax
Summary: [engine-setup] engine-setup should detect if postgresql's shared_buffers are ...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine-setup
Version: 3.3.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 3.4.0
Assignee: Ofer Schreiber
QA Contact: Jiri Belka
URL:
Whiteboard: integration
Depends On:
Blocks: 1059355 rhev3.4beta 1142926
TreeView+ depends on / blocked
 
Reported: 2013-11-21 13:17 UTC by Jiri Belka
Modified: 2014-09-18 12:24 UTC (History)
8 users (show)

Fixed In Version: ovirt-3.4.0-beta2
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1059355 (view as bug list)
Environment:
Last Closed:
oVirt Team: ---
Target Upstream Version:


Attachments (Terms of Use)


Links
System 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

Description Jiri Belka 2013-11-21 13:17:01 UTC
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 13:18:31 UTC
Default rhel 6.5 was 68719476736. So we are generally OK.

Comment 2 Sandro Bonazzola 2013-11-21 13:21:23 UTC
(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 12:21:10 UTC
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 14:11:36 UTC
Closing as part of 3.4.0


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