Projects per year
Abstract
Infrastructure as Code is the practice of automating the provisioning, configuration, and orchestration of network nodes using code in which variable values such as configuration parameters, node hostnames, etc. play a central role. Mistakes in these values are an important cause of infrastructure defects and corresponding outages. Ansible, a popular IaC language, nonetheless features semantics which can cause confusion about the value of variables.
In this paper, we identify six novel code smells related to Ansible’s intricate variable precedence rules and lazy-evaluated template expressions. Their detection requires an accurate representation of control and data flow, for which we transpose the program dependence graph to Ansible. We use the resulting detector to empirically investigate the prevalence of these variable smells in 21,931 open-source Ansible roles, uncovering 31,334 unique smell instances across 4,260 roles. We observe an upward trend in the number of variable smells over time, that it may take a long time before they are fixed, and that code changes more often introduce new smells than fix existing ones. Our results are a call to arms for more in-depth quality checkers for IaC code, and highlight the importance of transcending syntax in IaC research.
In this paper, we identify six novel code smells related to Ansible’s intricate variable precedence rules and lazy-evaluated template expressions. Their detection requires an accurate representation of control and data flow, for which we transpose the program dependence graph to Ansible. We use the resulting detector to empirically investigate the prevalence of these variable smells in 21,931 open-source Ansible roles, uncovering 31,334 unique smell instances across 4,260 roles. We observe an upward trend in the number of variable smells over time, that it may take a long time before they are fixed, and that code changes more often introduce new smells than fix existing ones. Our results are a call to arms for more in-depth quality checkers for IaC code, and highlight the importance of transcending syntax in IaC research.
Original language | English |
---|---|
Title of host publication | Proceedings of MSR ’22: Proceedings of the 19th International Conference on Mining Software Repositories (MSR 2022) |
Publisher | ACM |
Pages | 61-72 |
Number of pages | 12 |
ISBN (Electronic) | 978-1-4503-9303-4 |
DOIs | |
Publication status | Published - 21 Jun 2022 |
Event | 19th International Conference on Mining Software Repositories (MSR 2022) - Pittsburgh, United States Duration: 18 May 2022 → 24 May 2022 Conference number: 2022 https://conf.researchr.org/home/msr-2022 |
Publication series
Name | Proceedings - 2022 Mining Software Repositories Conference, MSR 2022 |
---|
Conference
Conference | 19th International Conference on Mining Software Repositories (MSR 2022) |
---|---|
Abbreviated title | MSR |
Country | United States |
City | Pittsburgh |
Period | 18/05/22 → 24/05/22 |
Internet address |
Keywords
- Infrastructure as Code
- Ansible
- code smells
- program dependence graphs
- empirical study
- software quality
Fingerprint
Dive into the research topics of 'Smelly Variables in Ansible Infrastructure Code: Detection, Prevalence, and Lifetime'. Together they form a unique fingerprint.-
FWOSB103: Pattern Mining and Static Analysis for Detecting Defects in Infrastructure as Code
1/11/20 → 31/10/24
Project: Fundamental
-
FWOEOS10: Automated Assistance for Developing Software in Ecosystems of the Future
De Roover, C., Mens, T., Demeyer, S. & Cleve, A.
1/01/18 → 31/12/21
Project: Fundamental
Research output
- 1 Citations
- 1 Poster
-
Smelly Variables in Ansible Infrastructure Code: Detection, Prevalence, and Lifetime
Opdebeeck, R., Zerouali, A. & De Roover, C., 23 May 2022, (Unpublished).Research output: Unpublished contribution to conference › Poster
File
Datasets
-
Replication package for "Smelly Variables in Ansible Infrastructure Code: Detection, Prevalence, and Lifetime"
Opdebeeck, R. (Creator), Zerouali, A. (Creator) & De Roover, C. (Creator), figshare, 30 Mar 2022
DOI: 10.6084/m9.figshare.18819074.v1
Dataset
Activities
- 2 Talk or presentation at a conference
-
Smelly Variables in Ansible Infrastructure Code: Detection, Prevalence, and Lifetime (in-person long talk)
Ruben Opdebeeck (Speaker)
24 May 2022Activity: Talk or presentation › Talk or presentation at a conference
File -
Smelly Variables in Ansible Infrastructure Code: Detection, Prevalence, and Lifetime (virtual lightning talk)
Ruben Opdebeeck (Speaker)
18 May 2022Activity: Talk or presentation › Talk or presentation at a conference
File