[Ovirt-devel] [PATCH server] Fixed db-omatic so it doesn't segfault because of newer qmf api.
Mike McGrath
mmcgrath at redhat.com
Tue Jul 21 18:13:03 UTC 2009
On Tue, 21 Jul 2009, Arjun Roy wrote:
> ---
> src/db-omatic/db_omatic.rb | 12 ++++++------
> 1 files changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/src/db-omatic/db_omatic.rb b/src/db-omatic/db_omatic.rb
> index 155ff5e..b5b7b81 100755
> --- a/src/db-omatic/db_omatic.rb
> +++ b/src/db-omatic/db_omatic.rb
> @@ -270,10 +270,10 @@ class DbOmatic < Qpid::Qmf::Console
> end
>
> def object_props(broker, obj)
> - target = obj.klass_key[0]
> + target = obj.schema.klass_key.package
> return if target != "com.redhat.libvirt"
>
> - type = obj.klass_key[1]
> + type = obj.schema.klass_key.klass_name
>
> # I just sync this whole thing because there shouldn't be a lot of contention here..
> synchronize do
> @@ -289,7 +289,7 @@ class DbOmatic < Qpid::Qmf::Console
> values[:broker_bank] = obj.object_id.broker_bank
> values[:agent_bank] = obj.object_id.agent_bank
> values[:obj_key] = obj.object_id.to_s
> - values[:class_type] = obj.klass_key[1]
> + values[:class_type] = type
> values[:timed_out] = false
> values[:synced] = false
> @logger.info "New object type #{type}"
> @@ -339,9 +339,9 @@ class DbOmatic < Qpid::Qmf::Console
> end
>
> def object_stats(broker, obj)
> - target = obj.klass_key[0]
> + target = obj.schema.klass_key.package
> return if target != "com.redhat.libvirt"
> - type = obj.klass_key[1]
> + type = obj.schema.klass_key.klass_name
>
> synchronize do
> values = @cached_objects[obj.object_id.to_s]
> @@ -351,7 +351,7 @@ class DbOmatic < Qpid::Qmf::Console
>
> values[:broker_bank] = obj.object_id.broker_bank
> values[:agent_bank] = obj.object_id.agent_bank
> - values[:class_type] = obj.klass_key[1]
> + values[:class_type] = type
> values[:timed_out] = false
> values[:synced] = false
> end
I was seeing this issue as well, after applying the patch things seem to
be working.
ACK
-Mike
More information about the ovirt-devel
mailing list