arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1905.11070cs.SE
收藏

检测 Puppet 程序中的缺失依赖与通知器

Detecting Missing Dependencies and Notifiers in Puppet Programs

Thodoris Sotiropoulos, Dimitris Mitropoulos, Diomidis Spinellis

AI总结:

本文通过分析 Puppet 程序及其系统调用轨迹,检测缺失的依赖顺序约束和通知关系,在 30 个模块中发现 57 个未知问题,并能高效分析大规模真实配置。

摘要:

Puppet 是一种流行的计算机系统配置管理工具。它提供了抽象机制,使管理员能够以声明式方式配置其计算机系统。其使用面临两个潜在陷阱。第一,当某个抽象依赖于另一个抽象时,如果没有指定顺序约束,抽象的非确定性应用可能导致竞态条件。第二,如果服务没有通过通知构造与其资源关联起来,那么每当资源被修改时,系统可能会在陈旧状态下运行。此类故障可能降低计算基础设施的可用性和功能性。我们开发了一种方法,通过分析 Puppet 程序及其系统调用轨迹来识别这些问题。具体来说,我们提出了一个用于轨迹的形式化模型,该模型使我们能够捕获 Puppet 抽象与文件系统之间的交互。通过分析这些交互,我们识别出(1)彼此相关的抽象(例如,操作同一文件的抽象),以及(2)应当充当通知器的抽象,以便变更能够被正确传播。然后,我们将轨迹分析得到的关系与程序的依赖图进行核对:依赖图是一种包含程序中声明的所有顺序约束和通知的表示。如果检测到不匹配,我们的系统会报告一个潜在故障。我们在大量 Puppet 模块上评估了我们的方法,并在其中 30 个模块中发现了 57 个此前未知的问题。基准测试进一步表明,我们的方法能够在几分钟内分析规模达数千行代码和数百万次系统调用的真实世界配置。

英文摘要:

Puppet is a popular computer system configuration management tool. It provides abstractions that enable administrators to setup their computer systems declaratively. Its use suffers from two potential pitfalls. First, if ordering constraints are not specified whenever an abstraction depends on another, the non-deterministic application of abstractions can lead to race conditions. Second, if a service is not tied to its resources through notification constructs, the system may operate in a stale state whenever a resource gets modified. Such faults can degrade a computing infrastructure's availability and functionality. We have developed an approach that identifies these issues through the analysis of a Puppet program and its system call trace. Specifically, we present a formal model for traces, which allows us to capture the interactions of Puppet abstractions with the file system. By analyzing these interactions we identify (1) abstractions that are related to each other (e.g., operate on the same file), and (2) abstractions that should act as notifiers so that changes are correctly propagated. We then check the relationships from the trace's analysis against the program's dependency graph: a representation containing all the ordering constraints and notifications declared in the program. If a mismatch is detected, our system reports a potential fault. We have evaluated our method on a large set of Puppet modules, and discovered 57 previously unknown issues in 30 of them. Benchmarking further shows that our approach can analyze in minutes real-world configurations with a magnitude measured in thousands of lines and millions of system calls.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑