[Engine-devel] 转发:Re: function insertstorage_domain_static(uuid, ...) does not exist

Juan Hernandez jhernand at redhat.com
Thu Mar 7 15:40:39 UTC 2013


On 03/07/2013 04:25 PM, startup_002 at sina.cn wrote:
>   Juan,
>
> Thanks for your answer.  Can you provide more details on how I can fix
> this problem?  I think engine-setup is built from the ovirt engine
> workspace and  It should call the new interface  properly.  I am
> confused why
> engine-setup--->inst_add_iso_storage_domai---->insertstorage_domain_static
> was not updated based on the new interface losing one parameter.  Is
> that a bug in the workspace introduced by the commit?
>

Yes, I think it is a bug. To workaround it try to add the new parameter 
to the inst_sp.sql file. In line 31 you will see this:

perform 
Insertstorage_domain_static(v_storage_domain_id,cast(v_connection_id as 
varchar(250)),v_name,1,2,'0',0);

I think it can be fixed adding the new parameter as follows:

perform 
Insertstorage_domain_static(v_storage_domain_id,cast(v_connection_id as 
varchar(250)),v_name,v_name,1,2,'0',0);

This is just using the name of the storage domain as description.

Once you have modified that file you will have to repeat the installation.

If that solves the problem then we may need to apply the following patch 
to the source code:

diff --git a/backend/manager/dbscripts/inst_sp.sql 
b/backend/manager/dbscripts/inst_sp.sql
index 82e8502..a4dcd20 100644
--- a/backend/manager/dbscripts/inst_sp.sql
+++ b/backend/manager/dbscripts/inst_sp.sql
@@ -28,7 +28,7 @@ BEGIN
          -- Insert storage server connection info
          perform 
Insertstorage_server_connections(v_connection,cast(v_connection_id as 
varchar(250)),NULL,NULL,NULL,NULL,1,NULL,NULL,N
          -- Insert storage domain static info
-        perform 
Insertstorage_domain_static(v_storage_domain_id,cast(v_connection_id as 
varchar(250)),v_name,1,2,'0',0);
+        perform 
Insertstorage_domain_static(v_storage_domain_id,cast(v_connection_id as 
varchar(250)),v_name,v_name,1,2,'0',0);
          -- Insert storage domain dynamic  info
          perform 
Insertstorage_domain_dynamic(v_available,v_storage_domain_id,v_used);
      end if;

Would you mind submitting it to gerrit?

> ----- 原始邮件 -----
> 发件人:Juan Hernandez <jhernand at redhat.com>
> 收件人:Juan Hernandez <jhernand at redhat.com>
> 抄送人:engine-devel at ovirt.org
> 主题:Re: [Engine-devel] function insertstorage_domain_static(uuid, ...)
> does not exist
> 日期:2013年03月07日 20点00分
>
> On 03/07/2013 12:43 PM, Barak Azulay wrote:
>  > Shu,
>  >
>  > A few notes.
>  >
>  > 1 - you are tring to create iso domain on /
>  > 'select ('ab22b419-6381-4f0a-8b46-aa72c81edbb5', 'ISO_DOMAIN',
> 'ead292ee-14dd-40f9-b06b-f2250f7594a9', 'localhost.localdomain:/ISO', 0, 0)'
>  > 2 - your host name is localhost.localdomain
>  >
>  > But those doesn't look like the real problem here.
>  >
>  > I assume you are running it on F18 ?
>  >
>  > Can we get the full installation log?
>  >
>  > Thanks
>  > Barak
> Commit 5ca1ec0337d921f1057321da2688ad2a014b8ffb added a parameter to the
> stored procedure, but engine-setup calls inst_add_iso_storage_domain
> (in inst_sp.sql) which in turn calls insertstorage_domain_static, and
> that call hasn't been updated.
>  >
>  >
>  >
>  >
>  >
>  >
>  >
>  > ----- Original Message -----
>  >> From: "Shu Ming" <shuming at linux.vnet.ibm.com>
>  >> To: engine-devel at ovirt.org, "Doron Fediuck" <dfediuck at redhat.com>
>  >> Sent: Thursday, March 7, 2013 7:39:29 AM
>  >> Subject: Re: [Engine-devel] function
> insertstorage_domain_static(uuid, ...) does not exist
>  >>
>  >>
>  >>
>  >> Doron,
>  >>
>  >> Do you get any idea about it?
>  >>
>  >> startup_002 at sina.cn :
>  >>
>  >>
>  >>
>  >> Hi,
>  >>
>  >> I built the oVirt engine RPM packages from the latest oVirt engine
>  >> source code and setup a yum installation server with these packages.
>  >> I can successfully install the RPM packages on my oVirt engine test
>  >> server. But when the "engine-setup" command was used to setup the
>  >> engine sever, the following errors were encountered from
>  >> engine-setup log. It seems that inst_add_iso_storage_domain was not
>  >> created properly for psql. Any clue to this problem?
>  >>
>  >> 2013-03-05 20:02:19::DEBUG::nfsutils::192::root:: Generating unique
>  >> uuid
>  >> 2013-03-05 20:02:19::DEBUG::common_utils::501::root:: running sql
>  >> query 'select inst_add_iso_storage_domain
>  >> ('ab22b419-6381-4f0a-8b46-aa72c81edbb5', 'ISO_DOMAIN',
>  >> 'ead292ee-14dd-40f9-b06b-f2250f7594a9',
>  >> 'localhost.localdomain:/ISO', 0, 0)' on db server: 'localhost'.
>  >> 2013-03-05 20:02:19::DEBUG::common_utils::454::root:: Executing
>  >> command --> '/usr/bin/psql -h localhost -p 5432 -U engine -d engine
>  >> -c select inst_add_iso_storage_domain
>  >> ('ab22b419-6381-4f0a-8b46-aa72c81edbb5', 'ISO_DOMAIN',
>  >> 'ead292ee-14dd-40f9-b06b-f2250f7594a9',
>  >> 'localhost.localdomain:/ISO', 0, 0)' in working directory '/root'
>  >> 2013-03-05 20:02:19::DEBUG::common_utils::492::root:: output =
>  >> 2013-03-05 20:02:19::DEBUG::common_utils::493::root:: stderr = ERROR:
>  >> NUM:42883, DETAILS:function insertstorage_domain_static(uuid,
>  >> character varying, character varying, integer, integer, unknown,
>  >> integer) does not exist
>  >>
>  >> 2013-03-05 20:02:19::DEBUG::common_utils::494::root:: retcode = 1
>  >> 2013-03-05 20:02:19::ERROR::engine-setup::1809::root:: Traceback
>  >> (most recent call last):
>  >> File "/bin/engine-setup", line 1804, in _configNfsShare
>  >> _addIsoDomaintoDB(controller.CONF["sd_uuid"],
>  >> controller.CONF["ISO_DOMAIN_NAME"])
>  >> File "/bin/engine-setup", line 1860, in _addIsoDomaintoDB
>  >> utils.execRemoteSqlCommand(getDbUser(), getDbHostName(), getDbPort(),
>  >> basedefs.DB_NAME, sqlQuery, True,
>  >> output_messages.ERR_FAILED_INSERT_ISO_DOMAIN%(basedefs.DB_NAME))
>  >> File "/usr/share/ovirt-engine/scripts/common_utils.py", line 510, in
>  >> execRemoteSqlCommand
>  >> return execCmd(cmdList=cmd, failOnError=failOnError, msg=errMsg,
>  >> envDict=getPgEnv())
>  >> File "/usr/share/ovirt-engine/scripts/common_utils.py", line 497, in
>  >> execCmd
>  >> raise Exception(msg)
>  >> Exception: Failed inserting ISO domain into engine db
>  >>
>  >> 2013-03-05 20:02:19::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 1810, in _configNfsShare
>  >> raise Exception(output_messages.ERR_FAILED_CFG_NFS_SHARE)
>  >> Exception: Failed to configure NFS share on this host
>  >>
>  >> 2013-03-05 20:02:19::DEBUG::engine-setup::1992::root:: *** The
>  >> following params were used as user input:
>  >> 2013-03-05 20:02:19::DEBUG::engine-setup::1997::root::
>  >> override-httpd-config: yes
>  >> 2013-03-05 20:02:19::DEBUG::engine-setup::1997::root:: http-port: 80
>  >> 2013-03-05 20:02:19::DEBUG::engine-setup::1997::root:: https-port:
>  >> 443
>  >> 2013-03-05 20:02:19::DEBUG::engine-setup::1997::root::
>  >> random-passwords: no
>  >> 2013-03-05 20:02:19::DEBUG::engine-setup::1997::root:: mac-range:
>  >> 00:1A:4A:A8:01:00-00:1A:4A:A8:01:FF
>  >> 2013-03-05 20:02:19::DEBUG::engine-setup::1997::root:: host-fqdn:
>  >> localhost.localdomain
>  >> 2013-03-05 20:02:19::DEBUG::engine-setup::1997::root:: auth-pass:
>  >> ********
>  >> 2013-03-05 20:02:19::DEBUG::engine-setup::1997::root:: org-name:
>  >> localdomain
>  >> 2013-03-05 20:02:19::DEBUG::engine-setup::1997::root::
>  >> application-mode: virt
>  >> 2013-03-05 20:02:19::DEBUG::engine-setup::1997::root::
>  >> default-dc-type: NFS
>  >> 2013-03-05 20:02:19::DEBUG::engine-setup::1997::root::
>  >> db-remote-install: local
>  >> 2013-03-05 20:02:19::DEBUG::engine-setup::1997::root:: db-host:
>  >> localhost
>  >> 2013-03-05 20:02:19::DEBUG::engine-setup::1997::root:: db-local-pass:
>  >> ********
>  >> 2013-03-05 20:02:19::DEBUG::engine-setup::1997::root:: nfs-mp: /ISO
>  >> 2013-03-05 20:02:19::DEBUG::engine-setup::1997::root::
>  >> iso-domain-name: ISO_DOMAIN
>  >> 2013-03-05 20:02:19::DEBUG::engine-setup::1997::root:: config-nfs:
>  >> yes
>  >> 2013-03-05 20:02:19::DEBUG::engine-setup::1997::root::
>  >> firewall-manager: iptables
>  >> 2013-03-05 20:02:19::ERROR::engine-setup::2413::root:: Traceback
>  >> (most recent call last):
>  >> File "/bin/engine-setup", line 2407, in <module>
>  >> main(confFile)
>  >> File "/bin/engine-setup", line 2190, in main
>  >>
>  >>
>  >> _______________________________________________
>  >> Engine-devel mailing list Engine-devel at ovirt.org
>  >> http://lists.ovirt.org/mailman/listinfo/engine-devel

-- 
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 Devel mailing list