upgrade script failing in latest master

Hi, When I run engine-setup in the latest master I get the following error in my setup log: Running upgrade sql script '/home/awels/ovirt-**FILTERED**/share/ovirt- **FILTERED**/dbscripts/upgrade/03_06_1750_pinning_to_multiple_hosts_c onnection_table.sql'... ERROR: invalid input syntax for uuid: "0723ca8b-ecda-4328-919 ERROR otopi.context context._executeMethod:164 Failed to execute stage 'Misc configuration': Command '/home/awels/ovirt- **FILTERED**/share/ovirt-**FILTERED**/dbscripts/schema.sh' fail Thanks, Alexander

On 07/27/2015 02:48 PM, Alexander Wels wrote:
Hi,
When I run engine-setup in the latest master I get the following error in my setup log:
Running upgrade sql script '/home/awels/ovirt-**FILTERED**/share/ovirt-**FILTERED**/dbscripts/upgrade/03_06_1750_pinning_to_multiple_hosts_connection_table.sql'...
2015-07-27 14:42:15 DEBUG otopi.plugins.ovirt_**FILTERED**_setup.ovirt_**FILTERED**.db.schema plugin.execute:940 execute-output: ['/home/awels/ovirt-**FILTERED**/share/ovirt-**FILTERED**/dbscripts/schema .sh', '-s', 'awels.localdomain', '-p', '5432', '-u', '**FILTERED**', '-d', '**FILTERED**', '-l', '/home/awels/ovirt-**FILTERED**/var/log/ovirt-**FILTERED**/setup/ovirt-**FILTERED**-setup-20150727144156-0
y2bqn.log', '-c', 'apply', '-m', '/home/awels/ovirt-**FILTERED**/var/lib/ovirt-**FILTERED**/dbmd5/awels.localdomain-**FILTERED**.scripts.md5'] stderr: psql:/home/awels/ovirt-**FILTERED**/share/ovirt-**FILTERED**/dbscripts/upgrade/03_06_1750_pinning_to_multiple_hosts_connection_table.sql:17: ERROR: invalid input syntax for uuid: "0723ca8b-ecda-4328-919 8-5ac9690ca1b7,932f05b4-e3b0-4e9a-ab99-77ff749138b3" FATAL: Cannot execute sql command: --file=/home/awels/ovirt-**FILTERED**/share/ovirt-**FILTERED**/dbscripts/upgrade/03_06_1750_pinning_to_multiple_hosts_connection_table.sql
2015-07-27 14:42:15 DEBUG otopi.context context._executeMethod:155 method exception Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/otopi/context.py", line 145, in _executeMethod method['method']() File "/home/awels/ovirt-**FILTERED**/share/ovirt-**FILTERED**/setup/bin/../plugins/ovirt-**FILTERED**-setup/ovirt-**FILTERED**/db/schema.py", line 291, in _misc o**FILTERED**cons.EngineDBEnv.PGPASS_FILE File "/usr/lib/python2.7/site-packages/otopi/plugin.py", line 945, in execute command=args[0], RuntimeError: Command '/home/awels/ovirt-**FILTERED**/share/ovirt-**FILTERED**/dbscripts/schema.sh' failed to execute 2015-07-27 14:42:15 ERRORotopi.context context._executeMethod:164 Failed to execute stage 'Misc configuration': Command '/home/awels/ovirt-**FILTERED**/share/ovirt-**FILTERED**/dbscripts/schema.sh' fail ed to execute
The upgrade script looks fine, so I am sort of lost as to how to fix it. Any help would be appreciated.
Hi Alexander, It looks like a bug. The upgrade script casts the vm_static.dedicated_vm_for_vds value to a UUID, but in VmBaseDaoDbFacade we see that this field may consist of a comma-delimited list of UUIDs. To work around it for now you can update the offending vm_static.dedicated_vm_for_vds values to have only a single UUID. Unfortunately I don't know the "proper" fix (guessing vm_host_pinning_map needs one value per UUID in dedicated_vm_for_vds?), but this should at least get you up and running. HTH, Greg P
Thanks,
Alexander
_______________________________________________ Devel mailing list Devel@ovirt.org http://lists.ovirt.org/mailman/listinfo/devel

On Monday, July 27, 2015 03:07:19 PM Greg Padgett wrote:
On 07/27/2015 02:48 PM, Alexander Wels wrote:
Hi,
When I run engine-setup in the latest master I get the following error in my setup log:
Hi Alexander,
It looks like a bug. The upgrade script casts the vm_static.dedicated_vm_for_vds value to a UUID, but in VmBaseDaoDbFacade we see that this field may consist of a comma-delimited list of UUIDs.
To work around it for now you can update the offending vm_static.dedicated_vm_for_vds values to have only a single UUID.
Unfortunately I don't know the "proper" fix (guessing vm_host_pinning_map needs one value per UUID in dedicated_vm_for_vds?), but this should at least get you up and running.
Aha, that tells me what the problem is, I have been working on a UI change to allow one to select multiple hosts to run a VM on. And I believe the result is a comma separated list of host ids. I had one of my VMs still marked for 2 hosts, and as soon as I changed that to one host, this problem went away. Of course immediately a new one showed up... 2015-07-27 15:11:47 DEBUG otopi.context context._executeMethod:141 Stage misc METHOD otopi.plugins.ovirt_**FILTERED**_setup.ovirt_**FILTERED**.config.public_glance_reposi tory.Plugin._misc ERROR otopi.context context._executeMethod:164 Failed to execute stage 'Misc configuration': function inst_add_glance_provider(unknown, unknown, unknown, unknown, unknown) does not ex Again, this is strange as I do have that function in my database, and it looks like the appropriate fields are there.

On 07/27/2015 03:24 PM, Alexander Wels wrote:
On Monday, July 27, 2015 03:07:19 PM Greg Padgett wrote:
On 07/27/2015 02:48 PM, Alexander Wels wrote:
Hi,
When I run engine-setup in the latest master I get the following error in
my setup log:
Hi Alexander,
It looks like a bug. The upgrade script casts the
vm_static.dedicated_vm_for_vds value to a UUID, but in VmBaseDaoDbFacade
we see that this field may consist of a comma-delimited list of UUIDs.
To work around it for now you can update the offending
vm_static.dedicated_vm_for_vds values to have only a single UUID.
Unfortunately I don't know the "proper" fix (guessing vm_host_pinning_map
needs one value per UUID in dedicated_vm_for_vds?), but this should at
least get you up and running.
Aha, that tells me what the problem is, I have been working on a UI change to allow one to select multiple hosts to run a VM on. And I believe the result is a comma separated list of host ids. I had one of my VMs still marked for 2 hosts, and as soon as I changed that to one host, this problem went away.
Glad it worked.
Of course immediately a new one showed up...
2015-07-27 15:11:47 DEBUG otopi.context context._executeMethod:141 Stage misc METHOD otopi.plugins.ovirt_**FILTERED**_setup.ovirt_**FILTERED**.config.public_glance_repository.Plugin._misc
2015-07-27 15:11:47 DEBUG otopi.ovirt_**FILTERED**_setup.**FILTERED**_common.database database.execute:171 Database: 'None', Statement: ' select inst_add_glance_provider( %(provider_id)s, %(provider_name)s, %(provider_description)s, %(provider_url)s, %(storage_domain_id)s ) ', args: {'provider_url': 'http://glance.ovirt.org:9292', 'provider_name': 'ovirt-image-repository', 'storage_domain_id': '072fbaa1-08f3-4a40-9f34-a5ca22dd1d74', 'provider_description': 'Publ ic Glance repository for oVirt', 'provider_id': 'ceab03af-7220-4d42-8f5c-9b557f5d29af'} 2015-07-27 15:11:47 DEBUG otopi.context context._executeMethod:155 method exception Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/otopi/context.py", line 145, in _executeMethod method['method']() File "/home/awels/ovirt-**FILTERED**/share/ovirt-**FILTERED**/setup/bin/../plugins/ovirt-**FILTERED**-setup/ovirt-**FILTERED**/config/public_glance_repository.py", line 77, in _misc storage_domain_id="072fbaa1-08f3-4a40-9f34-a5ca22dd1d74" File "/home/awels/ovirt-**FILTERED**/share/ovirt-**FILTERED**/setup/ovirt_**FILTERED**_setup/**FILTERED**_common/database.py", line 195, in execute args, ProgrammingError: function inst_add_glance_provider(unknown, unknown, unknown, unknown, unknown) does not exist LINE 2: select inst_add_glance_provider( ^ HINT: No function matches the given name and argument types. You might need to add explicit type casts.
2015-07-27 15:11:47 ERRORotopi.context context._executeMethod:164 Failed to execute stage 'Misc configuration': function inst_add_glance_provider(unknown, unknown, unknown, unknown, unknown) does not ex ist LINE 2: select inst_add_glance_provider( ^ HINT: No function matches the given name and argument types. You might need to add explicit type casts.
Again, this is strange as I do have that function in my database, and it looks like the appropriate fields are there.
I saw this before too, and I suspect it's a symptom of the db update failing--but I never nailed down the root cause, thinking it was something unique I did to myself. It went away on its own just as unexpectedly as it had arrived. While it plagued me, I worked around it by modifying public_glance_repository.py to return early.

----- Original Message -----
From: "Greg Padgett" <gpadgett@redhat.com> To: awels@redhat.com Cc: devel@ovirt.org Sent: Monday, July 27, 2015 11:22:56 PM Subject: Re: [ovirt-devel] upgrade script failing in latest master
On 07/27/2015 03:24 PM, Alexander Wels wrote:
On Monday, July 27, 2015 03:07:19 PM Greg Padgett wrote:
On 07/27/2015 02:48 PM, Alexander Wels wrote:
Hi,
When I run engine-setup in the latest master I get the following error in
my setup log:
Hi Alexander,
It looks like a bug. The upgrade script casts the
vm_static.dedicated_vm_for_vds value to a UUID, but in VmBaseDaoDbFacade
we see that this field may consist of a comma-delimited list of UUIDs.
To work around it for now you can update the offending
vm_static.dedicated_vm_for_vds values to have only a single UUID.
Unfortunately I don't know the "proper" fix (guessing vm_host_pinning_map
needs one value per UUID in dedicated_vm_for_vds?), but this should at
least get you up and running.
Aha, that tells me what the problem is, I have been working on a UI change to allow one to select multiple hosts to run a VM on. And I believe the result is a comma separated list of host ids. I had one of my VMs still marked for 2 hosts, and as soon as I changed that to one host, this problem went away.
Glad it worked.
Of course immediately a new one showed up...
2015-07-27 15:11:47 DEBUG otopi.context context._executeMethod:141 Stage misc METHOD otopi.plugins.ovirt_**FILTERED**_setup.ovirt_**FILTERED**.config.public_glance_repository.Plugin._misc
2015-07-27 15:11:47 DEBUG otopi.ovirt_**FILTERED**_setup.**FILTERED**_common.database database.execute:171 Database: 'None', Statement: ' select inst_add_glance_provider( %(provider_id)s, %(provider_name)s, %(provider_description)s, %(provider_url)s, %(storage_domain_id)s ) ', args: {'provider_url': 'http://glance.ovirt.org:9292', 'provider_name': 'ovirt-image-repository', 'storage_domain_id': '072fbaa1-08f3-4a40-9f34-a5ca22dd1d74', 'provider_description': 'Publ ic Glance repository for oVirt', 'provider_id': 'ceab03af-7220-4d42-8f5c-9b557f5d29af'} 2015-07-27 15:11:47 DEBUG otopi.context context._executeMethod:155 method exception Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/otopi/context.py", line 145, in _executeMethod method['method']() File "/home/awels/ovirt-**FILTERED**/share/ovirt-**FILTERED**/setup/bin/../plugins/ovirt-**FILTERED**-setup/ovirt-**FILTERED**/config/public_glance_repository.py", line 77, in _misc storage_domain_id="072fbaa1-08f3-4a40-9f34-a5ca22dd1d74" File "/home/awels/ovirt-**FILTERED**/share/ovirt-**FILTERED**/setup/ovirt_**FILTERED**_setup/**FILTERED**_common/database.py", line 195, in execute args, ProgrammingError: function inst_add_glance_provider(unknown, unknown, unknown, unknown, unknown) does not exist LINE 2: select inst_add_glance_provider( ^ HINT: No function matches the given name and argument types. You might need to add explicit type casts.
2015-07-27 15:11:47 ERRORotopi.context context._executeMethod:164 Failed to execute stage 'Misc configuration': function inst_add_glance_provider(unknown, unknown, unknown, unknown, unknown) does not ex ist LINE 2: select inst_add_glance_provider( ^ HINT: No function matches the given name and argument types. You might need to add explicit type casts.
Again, this is strange as I do have that function in my database, and it looks like the appropriate fields are there.
I saw this before too, and I suspect it's a symptom of the db update failing--but I never nailed down the root cause, thinking it was something unique I did to myself. It went away on its own just as unexpectedly as it had arrived. While it plagued me, I worked around it by modifying public_glance_repository.py to return early.
Seems to me as a result of a broken upgrade
_______________________________________________ Devel mailing list Devel@ovirt.org http://lists.ovirt.org/mailman/listinfo/devel
participants (3)
-
Alexander Wels
-
Eli Mesika
-
Greg Padgett