How to Successfully Submit Bugs and Patches to OpenStack: A Step‑by‑Step Guide
This article walks you through the entire process of reporting OpenStack bugs and submitting patches, covering both known and unknown issues, required preparations, SSH key setup, Gerrit configuration, git‑review usage, common pitfalls, and final review steps.
Background
The author’s team encountered a Neutron bug triggered by a special network‑building step in OpenStack and decided to submit the bug and a corresponding patch to the community for review.
Abstract
In production environments, OpenStack code bugs can appear in two scenarios: (1) bugs already known to the community, and (2) completely new bugs that require source tracing and a custom fix.
Overall Process
The following sections record the workflow and pitfalls when submitting bugs and patches to the OpenStack community.
1. Submitting a Bug
After confirming the bug is not already reported, start a new bug report in the Neutron project with a concise description (e.g., "cannot reload dnsmasq after update dhcp port"). The interface shows a list of similar bugs; if none match, proceed.
Provide a detailed bug description and assign the bug to yourself, setting the status to in progress .
2. Submitting a Patch
Configure your Launchpad SSH key:
ssh-keygen -t rsa then copy the content of ~/.ssh/id_rsa.pub to the SSH keys section in Launchpad.
Log in to the OpenStack Gerrit review site (https://review.openstack.org) with your Launchpad account and add the SSH key to Gerrit settings.
3. Preparing the Code
Clone the Neutron repository and set up Git:
mkdir openstack
cd openstack
git clone https://github.com/openstack/neutron -b master
Configure Git global settings:
git config --global user.name "Firstname Lastname"
git config --global user.email "[email protected]"
Install git-review (Ubuntu 12.04+): sudo apt-get install git-review or sudo pip install git-review for older versions.
Initialize the review environment in the project directory:
git review -s
4. Using HTTPS Instead of SSH
Because port 29418 is often blocked, use HTTPS for Gerrit access. Ensure the generated HTTP password contains no '/' characters; regenerate if necessary.
Set the remote URL:
git remote set-url gerrit https://username:[email protected]/openstack/neutron.git
Run git review -s to finalize the setup.
5. Submitting the Patch
Make the required code changes, then commit:
git commit -a -m "Your commit message"
Submit the patch for review:
git review
6. Common Pitfalls During git‑review
Missing the Contributor Agreement will block the submission; fill out the agreement with correct contact information and matching email address.
After the agreement is accepted, the patch can be reviewed by the community.
Summary
Contributing to the OpenStack community involves a rigorous process—bug reporting, patch creation, SSH/HTTPS configuration, and navigating Gerrit reviews—but it greatly improves developers' skills and promotes more disciplined, test‑driven coding practices.
360 Zhihui Cloud Developer
360 Zhihui Cloud is an enterprise open service platform that aims to "aggregate data value and empower an intelligent future," leveraging 360's extensive product and technology resources to deliver platform services to customers.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.