[Users] installing ovirt-engine on fc17 - postgresql service cannot be executed from /etc/init.d/postgresql

Juan Hernandez jhernand at redhat.com
Tue Nov 13 13:01:37 UTC 2012


On 11/13/2012 10:13 AM, Eli Mesika wrote:
> 
> 
> ----- Original Message -----
>> From: "Alexey Kardashevskiy" <aik at ozlabs.ru>
>> To: "Juan Hernandez" <jhernand at redhat.com>
>> Cc: users at ovirt.org
>> Sent: Tuesday, November 13, 2012 2:05:27 AM
>> Subject: Re: [Users] installing ovirt-engine on fc17 - postgresql service cannot be executed from
>> /etc/init.d/postgresql
>>
>> On 12/11/12 20:14, Juan Hernandez wrote:
>>> On 11/12/2012 06:45 AM, Alexey Kardashevskiy wrote:
>>>> Hi!
>>>>
>>>> I am trying to configure ovirt-engine and having a problem that it
>>>> cannot
>>>> finish because cannot create database because there is no
>>>> /etc/init.d/postgresql. How do I fix my setup? Some packages
>>>> missing? Below
>>>> is some information. Thanks.
>>>>
>>>>
>>>> The system is Fedora17/_ppc64_ (not x86 if it matters) with my 3.6
>>>> kernel.
>>>>
>>>> Below is the console output after running "postgresql-setup
>>>> initdb" and
>>>> "engine-setup" and the log produced by the "engine-setup" script.
>>>>
>>>>
>>>> [root at vpl2 aik]# yum info ovirt-engine
>>>> Loaded plugins: downloadonly, versionlock
>>>> Installed Packages
>>>> Name        : ovirt-engine
>>>> Arch        : noarch
>>>> Version     : 3.1.0
>>>> Release     : 2.fc17
>>>> Size        : 1.3 M
>>>> Repo        : installed
>>>>   From repo   : ovirt-stable
>>>> Summary     : Management server for Open Virtualization
>>>> URL         : http://www.ovirt.org
>>>> License     : ASL 2.0
>>>> Description : oVirt Engine is a feature-rich server virtualization
>>>> management
>>>>               : system that provides advanced capabilities for
>>>>               managing the Open
>>>>               : virtualization infrastructure for Servers and
>>>>               Desktops.
>>>>
>>>> [root at vpl2 aik]# ls -la /etc/init.d/postgresql
>>>> ls: cannot access /etc/init.d/postgresql: No such file or
>>>> directory
>>>>
>>>> [root at vpl2 aik]# postgresql-setup initdb
>>>> Initializing database ... OK
>>>>
>>>> [root at vpl2 aik]# engine-setup
>>>> Welcome to oVirt Engine setup utility
>>>>
>>>> WARNING: oVirt Engine setup has already been run on this host.
>>>> To remove all configuration and reset oVirt Engine please run
>>>> engine-cleanup.
>>>> Please be advised that executing engine-setup without cleanup is
>>>> not supported.
>>>> Would you like to proceed? (yes|no): no
>>>> Installation stopped, Goodbye.
>>>> [root at vpl2 aik]# engine-setup
>>>> Welcome to oVirt Engine setup utility
>>>>
>>>> WARNING: oVirt Engine setup has already been run on this host.
>>>> To remove all configuration and reset oVirt Engine please run
>>>> engine-cleanup.
>>>> Please be advised that executing engine-setup without cleanup is
>>>> not supported.
>>>> Would you like to proceed? (yes|no): yes
>>>> HTTP Port  [80] :
>>>> HTTPS Port  [443] :
>>>> Host fully qualified domain name, note that this name should be
>>>> fully
>>>> resolvable  [vpl2.ozlabs.ibm.com] :
>>>> Password for Administrator (admin at internal) :
>>>> Confirm password :
>>>> Organization Name for the Certificate: ozlabs
>>>> The default storage type you will be using  ['NFS'| 'FC'| 'ISCSI']
>>>>  [NFS] :
>>>> Enter DB type for installation ['remote'| 'local']  [local] :
>>>> Local database password :
>>>> Confirm password :
>>>> Should the installer configure NFS share on this server to be used
>>>> as an
>>>> ISO Domain? ['yes'| 'no']  [yes] :
>>>> Local ISO domain path: /data/iso
>>>> Display name for the ISO Domain: local-iso-share
>>>> Firewall ports need to be opened.
>>>> You can let the installer configure iptables automatically
>>>> overriding the
>>>> current configuration. The old configuration will be backed up.
>>>> Alternately you can configure the firewall later using an example
>>>> iptables
>>>> file found under /usr/share/ovirt-engine/conf/iptables.example
>>>> Configure iptables ? ['yes'| 'no']: yes
>>>>
>>>> oVirt Engine will be installed using the following configuration:
>>>> =================================================================
>>>> http-port:                     80
>>>> https-port:                    443
>>>> host-fqdn:                     vpl2.ozlabs.ibm.com
>>>> auth-pass:                     ********
>>>> org-name:                      ozlabs
>>>> default-dc-type:               NFS
>>>> db-remote-install:             local
>>>> db-local-pass:                 ********
>>>> nfs-mp:                        /data/iso
>>>> iso-domain-name:               local-iso-share
>>>> config-nfs:                    yes
>>>> override-iptables:             yes
>>>> Proceed with the configuration listed above? (yes|no): yes
>>>>
>>>> Installing:
>>>> Configuring oVirt-engine...                              [ DONE ]
>>>> Creating CA...                                           [ DONE ]
>>>> Editing JBoss Configuration...                           [ DONE ]
>>>> Setting Database Configuration...                        [ DONE ]
>>>> Setting Database Security...                             [ DONE ]
>>>> Creating Database...                                  [ ERROR ]
>>>> Database creation failed
>>>> Please check log file
>>>> /var/log/ovirt-engine/engine-setup_2012_11_12_16_06_23.log for
>>>> more information
>>>>
>>>> [root at vpl2 aik]# ps ax|grep postgresql
>>>> 13655 pts/2    S+     0:00 grep --color=auto postgresql
>>>>
>>>>
>>>>
>>>> *************************
>>>>
>>>> Here is a part of the
>>>> /var/log/ovirt-engine/engine-setup_2012_11_12_16_06_23.log , can
>>>> post the
>>>> whole thing but it is quite big and seems to be irrelevant to the
>>>> issue.
>>>>
>>>>
>>>> 2012-11-12 16:07:01::DEBUG::engine-setup::940::root:: engine db
>>>> creation is
>>>> logged at
>>>> /var/log/ovirt-engine//engine-db-install-2012_11_12_16_07_01.log
>>>> 2012-11-12 16:07:01::DEBUG::common_utils::309::root:: Executing
>>>> command -->
>>>> '/usr/share/ovirt-engine/dbscripts/engine-db-install.sh -l
>>>> engine-db-install-2012_11_12_16_07_01.log -w ******** -u postgres
>>>> -s
>>>> localhost -p 5432 -r local'
>>>> 2012-11-12 16:07:01::DEBUG::common_utils::335::root:: output =
>>>> Running
>>>> local installation
>>>> [engine-db-install] postgresql service cannot be executed from
>>>> /etc/init.d/postgresql
>>>>
>>>> 2012-11-12 16:07:01::DEBUG::common_utils::336::root:: stderr =
>>>> 2012-11-12 16:07:01::DEBUG::common_utils::337::root:: retcode = 1
>>>> 2012-11-12 16:07:01::DEBUG::setup_sequences::62::root:: Traceback
>>>> (most
>>>> recent call last):
>>>>     File "/usr/share/ovirt-engine/scripts/setup_sequences.py",
>>>>     line 60, in run
>>>>       function()
>>>>     File "/bin/engine-setup", line 953, in _createDB
>>>>       output, rc = utils.execCmd(cmd, None, True,
>>>> output_messages.ERR_DB_CREATE_FAILED, masked_value_set)
>>>>     File "/usr/share/ovirt-engine/scripts/common_utils.py", line
>>>>     340, in execCmd
>>>>       raise Exception(msg)
>>>> Exception: Database creation failed
>>>>
>>>> 2012-11-12 16:07:01::DEBUG::engine-setup::1742::root:: *** The
>>>> following
>>>> params were used as user input:
>>>> 2012-11-12 16:07:01::DEBUG::engine-setup::1747::root::
>>>> override-httpd-config: yes
>>>> 2012-11-12 16:07:01::DEBUG::engine-setup::1747::root:: http-port:
>>>> 80
>>>> 2012-11-12 16:07:01::DEBUG::engine-setup::1747::root:: https-port:
>>>> 443
>>>> 2012-11-12 16:07:01::DEBUG::engine-setup::1747::root:: mac-range:
>>>> 00:1A:4A:3D:8D:00-00:1A:4A:3D:8D:FF
>>>> 2012-11-12 16:07:01::DEBUG::engine-setup::1747::root:: host-fqdn:
>>>> vpl2.ozlabs.ibm.com
>>>> 2012-11-12 16:07:01::DEBUG::engine-setup::1747::root:: auth-pass:
>>>> ********
>>>> 2012-11-12 16:07:01::DEBUG::engine-setup::1747::root:: org-name:
>>>> ozlabs
>>>> 2012-11-12 16:07:01::DEBUG::engine-setup::1747::root::
>>>> default-dc-type: NFS
>>>> 2012-11-12 16:07:01::DEBUG::engine-setup::1747::root::
>>>> db-remote-install: local
>>>> 2012-11-12 16:07:01::DEBUG::engine-setup::1747::root:: db-host:
>>>> localhost
>>>> 2012-11-12 16:07:01::DEBUG::engine-setup::1747::root::
>>>> db-local-pass: ********
>>>> 2012-11-12 16:07:01::DEBUG::engine-setup::1747::root:: nfs-mp:
>>>> /data/iso
>>>> 2012-11-12 16:07:01::DEBUG::engine-setup::1747::root::
>>>> iso-domain-name:
>>>> local-iso-share
>>>> 2012-11-12 16:07:01::DEBUG::engine-setup::1747::root:: config-nfs:
>>>> yes
>>>> 2012-11-12 16:07:01::DEBUG::engine-setup::1747::root::
>>>> override-iptables: yes
>>>> 2012-11-12 16:07:01::ERROR::engine-setup::2376::root:: Traceback
>>>> (most
>>>> recent call last):
>>>>     File "/bin/engine-setup", line 2370, in <module>
>>>>       main(confFile)
>>>>     File "/bin/engine-setup", line 2159, in main
>>>>       runSequences()
>>>>     File "/bin/engine-setup", line 2105, in runSequences
>>>>       controller.runAllSequences()
>>>>     File "/usr/share/ovirt-engine/scripts/setup_controller.py",
>>>>     line 54, in
>>>> runAllSequences
>>>>       sequence.run()
>>>>     File "/usr/share/ovirt-engine/scripts/setup_sequences.py",
>>>>     line 154, in run
>>>>       step.run()
>>>>     File "/usr/share/ovirt-engine/scripts/setup_sequences.py",
>>>>     line 60, in run
>>>>       function()
>>>>     File "/bin/engine-setup", line 953, in _createDB
>>>>       output, rc = utils.execCmd(cmd, None, True,
>>>> output_messages.ERR_DB_CREATE_FAILED, masked_value_set)
>>>>     File "/usr/share/ovirt-engine/scripts/common_utils.py", line
>>>>     340, in execCmd
>>>>       raise Exception(msg)
>>>> Exception: Database creation failed
>>>
>>> The right way to start/stop services in Fedora 17 is using the
>>> systemctl
>>> tool:
>>>
>>> systemctl start postgresql.service
>>> systemctl stop postgresql.service
>>>
>>> The postgresql service no longer uses SystemV scripts to
>>> start/stop, it
>>> uses systemctl instead, that is why there is no
>>> /etc/init.d/postgresql
>>> script.
>>
>> Yes I noticed that while googling. The question is what do I do to
>> make
>> engine-setup not failing. It is starting services, one-by-one, and it
>> stops
>> in the middle of a sequence as postgresql fails because engine-setup
>> uses
>> old postgresql script. ovirt.org uses FC17 so I wonder if there is
>> some
>> fix/workaround.
> 
> Juan, I think that we should have a BZ on that since the code in engine-db-install.sh is using the old service invocation format and does not distinguish between different Fedora version 

I agree, we should use "service postgresql ..." instead of
"/etc/init.d/postgresql ...", as that works in all versions of Fedora
and in RHEL as well.

However I think that we already have logic in the script to check if
systemd is available, and in that case we don't use /etc/init.d. Maybe
this logic is failing in the ppc version of Fedora.

>>> If you still have problems to create the database please check the
>>> database installation log file, should be named as follows:
>>>
>>> /var/log/ovirt-engine/engine-db-install-2012_11_12_16_07_01.log
>>
>>
>> Database is fine...
>>
>> #engine db installer log file on vpl2.ozlabs.ibm.com
>> [engine-db-install] verifying required rpms are installed.
>> postgresql-server-9.1.6-1.fc17.ppc64
>> postgresql-9.1.6-1.fc17.ppc64
>> postgresql-libs-9.1.6-1.fc17.ppc64
>> postgresql-contrib-9.1.6-1.fc17.ppc64
>> uuid-1.6.2-11.fc17.ppc64
>> [engine-db-install] verifying postgres service exists.
>>
>>
>>
>>
>>
>> --
>> Alexey
>> _______________________________________________
>> Users mailing list
>> Users at ovirt.org
>> http://lists.ovirt.org/mailman/listinfo/users
>>
> _______________________________________________
> Users mailing list
> Users at ovirt.org
> http://lists.ovirt.org/mailman/listinfo/users
> 


-- 
Dirección Comercial: C/Jose Bardasano Baos, 9, Edif. Gorbea 3, planta
3ºD, 28016 Madrid, Spain
Inscrita en el Reg. Mercantil de Madrid – C.I.F. B82657941 - Red Hat S.L.



More information about the Users mailing list