Skip to content

Observer not working for smapi #6281

Open
@ydirson

Description

@ydirson

In v24.39.1, we noticed that the observer.py wrapper does not get called when an observer is enabled on the smapi component.

The traces added in #6280 reveal the following exception:

Jan 28 10:48:01 xcpng83-bzkcpvhy xapi: [error||0 |check if component smapi is enabled  D:181f882cc62e|xapi_observer_components] is_component_enabled(smapi) inner got exception: Db_exn.DBCache_NotFound("missing table", "Observer", "")

Readablized stack trace:

Raised at Xapi_database__Db_cache_types.TableSet.find in file "ocaml/database/db_cache_types.ml", line 262, characters 22-73
Called from Xapi_database__Db_cache_impl.read_refs in file "ocaml/database/db_cache_impl.ml", line 255, characters 12-70
Called from Db_actions.DB_Action.Observer.get_all in file "ocaml/xapi/db_actions.ml", line 21421, characters 40-69
Called from Xapi_observer_components.is_component_enabled.(fun) in file "ocaml/xapi/xapi_observer_components.ml", line 83, characters 26-56

From what I understand:

  • the code calls Db.Observer.get_all
  • that one is generated code making use of an in-memory cache
  • said cache misses the Observer table even when the XAPI state.db has it

What could be causing this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions