Debugging OpenStack Problems Using a State Graph Approach

Yong Xiang, Hu Li, Sen Wang, Charley Peter Chen, Wei XuAPSys 2016

TL;DR

Debugging complex cloud systems like OpenStack is notoriously difficult due to their distributed nature and intricate dependencies. This paper introduces the System Operation State Graph (SOSG), a novel approach that automatically constructs a comprehensive graph of runtime states and events from across the entire OpenStack-Ceph stack. SOSG enables intuitive graph traversals for complex state queries and powers an anomaly detection system to uncover hidden issues.

What Problem Does This Paper Address?

Operating and debugging large-scale, distributed cloud management systems like OpenStack presents a significant challenge. These systems are composed of numerous independently developed modules, each with its own abstractions and states. The complexity arises from:

  • Distributed States: A single virtual machine's state is not confined to one component but is spread across Nova (compute), Neutron (networking), Ceph (storage), and even hypervisor layers like libvirt/KVM. Ensuring consistency across these distributed states is difficult.
  • Modular Complexity: While modularity aids development, it forces operators to understand a vast array of components and their individual monitoring tools, often located on different machines.
  • Lack of System-Wide Identifiers: Existing debugging tools often struggle because there isn't a consistent, system-wide identifier that spans across different layers and integrates with external systems like Ceph.
  • Asynchronous Nature: The asynchronous communication and event handling in these systems make tracking state changes and debugging difficult.

The paper aims to simplify this by providing a unified, graph-based representation of the system's runtime state.

Methods

The core contribution is the System Operation State Graph (SOSG), a property graph constructed from raw operational data. The construction process involves four key steps:

  1. Parse Raw Text Data: Heterogeneous data sources (logs, database dumps, API outputs) are parsed into key-value pairs, generating initial "event" and "state" vertices.
  2. Discover and Generate Entity Vertices: Properties with many distinct values appearing in multiple places are identified as potential entity identifiers (e.g., VM UUIDs, IP addresses). For each unique identifier, an "entity" vertex is created.
  3. Add Spatial Edges: Edges are created to link state or event vertices to the entity vertices they relate to. This captures the "who" and "what" of an event or state.
  4. Add Temporal Edges: State and event vertices associated with the same entity are sorted by time, and temporal edges are added to represent the chronological order of events and state changes.

This process is designed to be syntax-driven, relying on statistical properties of the data rather than semantic understanding, making it generalizable.

The SOSG is then used for two main applications:

  • System State Query: Complex, multi-component queries are transformed into graph traversals. For instance, finding all VMs affected by a physical server's disk failure can be answered by traversing the graph from the server entity to related VMs via storage components.
  • Anomaly Detection: A graph-based anomaly detection algorithm is employed. It extracts subgraphs representing individual VMs and their dependencies. By comparing these subgraphs, it identifies VMs that exhibit unusual states or dependencies compared to their peers, potentially indicating hidden problems.

Datasets

The evaluation uses real-world operational data from a production-grade, 125-node OpenStack-Ceph cluster serving over 100 active users. The data collected over three days amounted to 40 GB of raw text files. This data includes:

  • Libvirt states (every 60 seconds)
  • OVS states (every 60 seconds)
  • Ceph image states (every 600 seconds)
  • Ceph block file states (every 3600 seconds)
  • OpenStack database updates (via triggers)
  • Logs from all OpenStack and Ceph components

This dataset is used to construct a large SOSG (43.3 million vertices, 56.6 million edges) for evaluation.

Key Insights and Ideas

  • Unified View of Distributed Systems: The SOSG provides a single, coherent view of a highly distributed and complex system, bridging the gap between individual component states and the overall system health.
  • Syntax-Driven Graph Construction: The ability to build a meaningful graph without deep semantic understanding of each component is crucial for generalizability and ease of deployment.
  • Graph Traversal as a Debugging Tool: Transforming complex, ad-hoc queries into standard graph traversals significantly simplifies the operator's task.
  • Anomaly Detection on Graph Structure: Leveraging graph structure for anomaly detection is effective in finding subtle, hidden issues that might not be apparent from individual log files or component metrics.
  • Bridging the Gap Between Static and Dynamic Information: While the paper focuses on runtime states, the authors suggest incorporating static data (code, bug reports) into the graph for even deeper insights.

Key Results

  • The SOSG construction process for 40 GB of 3-day data took approximately 25 minutes on a 15-node Spark cluster, which is deemed acceptable for the insights gained.
  • The resulting graph contained about 43.3 million vertices and 56.6 million edges.
  • The graph traversal approach could answer complex queries, such as identifying VMs affected by a disk failure, in about 35 seconds.
  • The anomaly detection system successfully identified several hidden problems, including:
  • Open vSwitch ports not being deleted upon VM deletion, leading to resource leaks.
  • Discrepancies between database records and physical states, indicating potential issues with OpenStack's retry/recovery mechanisms.
  • A complicated VM migration failure where the VM's virtual disk migrated but its libvirt state was missing from both source and destination hosts, suggesting bugs in resource management.

Limitations and Future Work

  • Limitations:
    • The current anomaly detection relies on a distance metric and parameters (k, r) that are determined empirically.
  • The paper acknowledges that evaluating false positive rates for anomaly detection is an ongoing process.
  • The current graph construction is done from scratch; incremental updates for online monitoring are still under development.
  • Future Work:
    • Root Cause Analysis with Events and State History: Developing models to map log sequences to anomalous states to predict failures before they occur.
  • Incorporating Other Data Sources: Integrating static data like source code, bug reports, and documentation into the graph for richer insights.
  • Applying SOSG to Other Systems: Generalizing the approach to other distributed systems, including big data frameworks and service-oriented architectures.
  • Incremental Graph Updates: Developing algorithms for efficient, online updates to the SOSG to support real-time monitoring.

Summary updated

BibTeX
@inproceedings{xiang2016debugging,
  author = {Yong Xiang and Hu Li and Sen Wang and Charley Peter Chen and Wei Xu},
  title = {{Debugging OpenStack Problems Using a State Graph Approach}},
  booktitle = {APSys},
  year = {2016},
  doi = {10.1145/2967360.2967366},
}
Figure