Dozer: Migrating Shell Commands to Ansible Modules via Execution Profiling and Synthesis
Thu 12 May 2022 13:20 - 13:25 at ICSE room 2-odd hours - Tools and Environments 6 Chair(s): Domenico Bianculli
Software developers frequently use the system shell to perform configuration management tasks because it is quick, effective, and easy. Unfortunately, the shell does not scale well when developers outgrow their initial needs. Configuration management systems like Ansible, Puppet, and Chef offer sophisticated solutions that promise to handle the increased scale, but are difficult to learn. Developers need a pathway for taking their existing shell scripts and migrating them to the configuration languages for these systems. We address the problem with Dozer, a technique to help developers push their shell commands into a format recognized by another configuration management system. Dozer is syntax agnostic and operates by tracing and comparing system calls calls to find similar configuration tasks. The final migration is produced by a generate and validate process that inspects the actual configuration changes made to the system and selects the migration with the most similar changes to the original shell command.
We evaluate Dozer on its ability to migrate shell commands to Ansible modules using datasets collected from open source configuration scripts. Dozer successfully generated a migration 84% of the time when our dataset contained the correct target Ansible module, and in general was successful for 38 of the 62 (61%) common shell commands, even when an exact corresponding Ansible module trace was not present in the dataset. Unlike prior approaches for updating configuration scripts, Dozer supports shell commands which do not directly affect the filesystem, such as starting or stopping a process, and does not require any domain knowledge about a configuration system or its language, which could allow it to generalize to migrations between different languages.