SlideShare a Scribd company logo
Land your first Neutron patch 
Rossella Sblendido <rsblendido@suse.com>
2 
Neutron...
3 
After this talk...
Getting familiar with Neutron
5 
What's Neutron? 
•Neutron is an OpenStack project to provide “networking as a service” between interface devices (e.g., vNICs) managed by other OpenStack services (e.g., Nova) 
•Provides a powerful API to define the network connectivity
6 
Modular architecture 
•Neutron-server: expose the API 
•Plugin: custom back-end implementation of the Networking API 
•Several agents: 
‒plug-in agent (L2 agent): runs on each hypervisor to perform local vSwitch configuration 
‒dhcp agent: Provides DHCP services to tenant networks 
‒l3 agent: Provides L3/NAT forwarding to provide external network access for VMs on tenant network
7 
I want to know more... 
•Read the networking admin guide here 
•Explore the code: 
git clone git@github.com:openstack/neutron.git 
Tip: PyCharm can make your life easier 
‒Navigate to Class Ctrl+N 
‒Navigate to File Ctrl+Shift+N 
‒Navigate to Declaration Ctrl+B
8 
Use Devstack to crack it open 
• Script to build a complete stack 
• To set it up only few steps: 
‒ git clone https://github.com/openstack-dev/devstack.git 
‒ cd devstack; ./stack.sh 
• Resume the screen session to check what's going on: screen -x 
• You can use pdb to set breakpoints
9 
Devstack – Config file tips 
disable_service n-net 
enable_service q-svc 
enable_service q-agt 
enable_service q-dhcp 
enable_service q-l3 
enable_service q-meta 
DATABASE_PASSWORD=admin 
RABBIT_PASSWORD=admin 
SERVICE_TOKEN=admin 
SERVICE_PASSWORD=admin 
ADMIN_PASSWORD=admin 
INSTALL_TESTONLY_PACKAGES=True
10 
Inspecting the networking configuration 
•ip link 
•ip netns list 
•ip netns exec <namespace> <command> 
•ovs-vsctl show 
•iptables -S
11 
Questions... Where to ask? 
• IRC freenode #openstack-neutron 
• openstack - general questions 
• openstack-dev - dev related questions 
• openstack-operators 
Follow the mailing list etiquette
Writing your first patchFix a bug or add a new feature
13 
Launchpad launchpad.net/neutron
14 
Launchpad 
• Bugs 
• Blueprints 
• Milestones/Releases 
• It handles authentication for other websites (eg. Gerrit)
15 
Bugs 
• Look for "low-hanging-fruit" tag 
• Pick one and assign it to you
16 
How to fix a bug 
• Try to reproduce it 
• Debug the issue (add log statement or you can use a debugger if you are on Devstack) 
• Write a patch 
• Test it 
• Write a unit test if that's appropriate to avoid regressions
17 
Blueprint + Spec workflow 
• Register blueprint in Launchpad 
• Upload a design specification to Gerrit to specs/<release> folder in neutron-specs 
• Use specs/template.srt from Neutron specs repo 
• Specs follow the same Gerrit workflow as patches 
• Project drivers will approve blueprint
Testing your patch
19 
Style check 
• Based on flake8 and hacking
20 
How to run unittests 
• run_tests.sh script 
• tox 
Run one test: 
•./run_tests.sh neutron.tests.unit.test_api_v2.JSONV2TestCase 
or 
•tox -e py27 neutron.tests.unit.test_api_v2.JSONV2TestCase
21 
Debugging unitests 
•./run_tests.sh -d [test module path] 
•tox -e venv -- python -m testtools.run [test module path] 
See here for more info
Submitting your first patch
23 
Git 
Git is the tool used for managing the code 
‒ git clone (clone Neutron repo) 
‒ git checkout -b topic-branch 
‒ apply your changes 
‒ git add 
‒ git commit 
‒ git review -> you need to install it 
‒ git commit --amend -> create a new patch Set 
‒ git review
24 
Gerrit review.openstack.org
25 
Gerrit 
• You can review other people code, your code get reviewed 
• Automatic Gatekeeper
26 
Gerrit – Code-Review and Workflow 
Code-Review 
‒+1, -1 everybody 
‒+2, -2 core reviewers 
Workflow 
‒Workflow +1 , only core reviewers (usually after it got 2x +2) 
‒Workflow -1, WIP
27 
Gerrit – Verified 
• Every patch is tested and gets a 
‒+1 Verified 
‒-1 Failed 
• Style checker + unit tests + functional tests + integration tests (Tempest) + upgrade tests (Grenade) 
• Test are run by the OpenStack CI and for some project by third party CI 
• Logs are accessible, you can check why a test failed
Get your patch merged
29 
Code - Best practices 
• Check spelling 
• Add comments if needed 
• Run flake8 and test before you submit 
• Create small patches 
• Do one logical change per patch. Don't mixup different fixes 
• Try to avoid dependent patches if possible -> rebase hell
30 
Commit messages – best practices 
• Explain the how and the why, not the what 
• Use special tags in commit messages (i.e. "Closes-Bug: #1234567") , they are matched by automation scripts 
• For needed documentation changes, use DocImpact flag 
• See here for more info
31 
Getting reviews - Best practices 
• Be polite 
• Try to be specific regarding what you will address and what not. 
• Reply 'Done' if you are gonna change the patch according to the comment. 
• Explain why you are not gonna address a comment 
• The best way to get reviews is to be involved
32 
Reviewing - Best practices 
• Be polite 
• Ask questions 
• Show examples when you give some suggestion 
• If you give a "-1" make sure to check if the submitter answered. A '-1' can block a patch 
• Quality vs quantity 
• It takes time to review but you will learn a lot!
Thank you. 
33 
Questions?
Unpublished Work of SUSE. All Rights Reserved. 
This work is an unpublished work and contains confidential, proprietary and trade secret information of SUSE. Access to this work is restricted to SUSE employees who have a need to know to perform tasks within the scope of their assignments. No part of this work may be practiced, performed, copied, distributed, revised, modified, translated, abridged, condensed, expanded, collected, or adapted without the prior written consent of SUSE. Any use or exploitation of this work without authorization could subject the perpetrator to criminal and civil liability. 
General Disclaimer 
This document is not to be construed as a promise by any participating company to develop, deliver, or market a product. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. SUSE makes no representations or warranties with respect to the contents of this document, and specifically disclaims any express or implied warranties of merchantability or fitness for any particular purpose. The development, release, and timing of features or functionality described for SUSE products remains at the sole discretion of SUSE. Further, SUSE reserves the right to revise this document and to make changes to its content, at any time, without obligation to notify any person or entity of such revisions or changes. All SUSE marks referenced in this presentation are trademarks or registered trademarks of Novell, Inc. in the United States and other countries. All third-party trademarks are the property of their respective owners.

More Related Content

What's hot

2013 10-28 php ug presentation - ci using phing and hudson
2013 10-28 php ug presentation - ci using phing and hudson2013 10-28 php ug presentation - ci using phing and hudson
2013 10-28 php ug presentation - ci using phing and hudsonShreeniwas Iyer
 
Developing NuGet
Developing NuGetDeveloping NuGet
Developing NuGet
Jeff Handley
 
Jenkins Meetup Pune
Jenkins Meetup PuneJenkins Meetup Pune
Jenkins Meetup Pune
Umesh Kumhar
 
How and what to unit test
How and what to unit testHow and what to unit test
How and what to unit test
Eugenio Lentini
 
Into The Box 2018 | Assert control over your legacy applications
Into The Box 2018 | Assert control over your legacy applicationsInto The Box 2018 | Assert control over your legacy applications
Into The Box 2018 | Assert control over your legacy applications
Ortus Solutions, Corp
 
Docker
DockerDocker
Docker
Knoldus Inc.
 
Intro to NuGet
Intro to NuGetIntro to NuGet
Intro to NuGet
wlscaudill
 
Unit Test + Functional Programming = Love
Unit Test + Functional Programming = LoveUnit Test + Functional Programming = Love
Unit Test + Functional Programming = Love
Alvaro Videla
 
Test driving QML
Test driving QMLTest driving QML
Test driving QML
Artem Marchenko
 
Agile Programming Systems # TDD intro
Agile Programming Systems # TDD introAgile Programming Systems # TDD intro
Agile Programming Systems # TDD intro
Vitaliy Kulikov
 
Unit testing (eng)
Unit testing (eng)Unit testing (eng)
Unit testing (eng)
Anatoliy Okhotnikov
 
Apereo OAE development and release process
Apereo OAE development and release processApereo OAE development and release process
Apereo OAE development and release process
Bert Pareyn
 
LCA13: Upstreaming 101
LCA13: Upstreaming 101LCA13: Upstreaming 101
LCA13: Upstreaming 101
Linaro
 
Integration Group - Robot Framework
Integration Group - Robot Framework Integration Group - Robot Framework
Integration Group - Robot Framework
OpenDaylight
 
Source Control with Domino Designer 8.5.3 and Git (DanNotes, November 28, 2012)
Source Control with Domino Designer 8.5.3 and Git (DanNotes, November 28, 2012)Source Control with Domino Designer 8.5.3 and Git (DanNotes, November 28, 2012)
Source Control with Domino Designer 8.5.3 and Git (DanNotes, November 28, 2012)
Per Henrik Lausten
 
Game Programming 00 - Exams
Game Programming 00 - ExamsGame Programming 00 - Exams
Game Programming 00 - Exams
Nick Pruehs
 
PHPUnit - Unit testing
PHPUnit - Unit testingPHPUnit - Unit testing
PHPUnit - Unit testing
Nguyễn Đào Thiên Thư
 
Selenium TestNG
Selenium TestNGSelenium TestNG
Selenium TestNG
KadarkaraiSelvam
 
Angular Multi-env Setup
Angular Multi-env SetupAngular Multi-env Setup
Angular Multi-env Setup
Knoldus Inc.
 

What's hot (20)

2013 10-28 php ug presentation - ci using phing and hudson
2013 10-28 php ug presentation - ci using phing and hudson2013 10-28 php ug presentation - ci using phing and hudson
2013 10-28 php ug presentation - ci using phing and hudson
 
Developing NuGet
Developing NuGetDeveloping NuGet
Developing NuGet
 
Jenkins Meetup Pune
Jenkins Meetup PuneJenkins Meetup Pune
Jenkins Meetup Pune
 
How and what to unit test
How and what to unit testHow and what to unit test
How and what to unit test
 
Into The Box 2018 | Assert control over your legacy applications
Into The Box 2018 | Assert control over your legacy applicationsInto The Box 2018 | Assert control over your legacy applications
Into The Box 2018 | Assert control over your legacy applications
 
Docker
DockerDocker
Docker
 
Intro to NuGet
Intro to NuGetIntro to NuGet
Intro to NuGet
 
Unit Test + Functional Programming = Love
Unit Test + Functional Programming = LoveUnit Test + Functional Programming = Love
Unit Test + Functional Programming = Love
 
Test driving QML
Test driving QMLTest driving QML
Test driving QML
 
Nunit
NunitNunit
Nunit
 
Agile Programming Systems # TDD intro
Agile Programming Systems # TDD introAgile Programming Systems # TDD intro
Agile Programming Systems # TDD intro
 
Unit testing (eng)
Unit testing (eng)Unit testing (eng)
Unit testing (eng)
 
Apereo OAE development and release process
Apereo OAE development and release processApereo OAE development and release process
Apereo OAE development and release process
 
LCA13: Upstreaming 101
LCA13: Upstreaming 101LCA13: Upstreaming 101
LCA13: Upstreaming 101
 
Integration Group - Robot Framework
Integration Group - Robot Framework Integration Group - Robot Framework
Integration Group - Robot Framework
 
Source Control with Domino Designer 8.5.3 and Git (DanNotes, November 28, 2012)
Source Control with Domino Designer 8.5.3 and Git (DanNotes, November 28, 2012)Source Control with Domino Designer 8.5.3 and Git (DanNotes, November 28, 2012)
Source Control with Domino Designer 8.5.3 and Git (DanNotes, November 28, 2012)
 
Game Programming 00 - Exams
Game Programming 00 - ExamsGame Programming 00 - Exams
Game Programming 00 - Exams
 
PHPUnit - Unit testing
PHPUnit - Unit testingPHPUnit - Unit testing
PHPUnit - Unit testing
 
Selenium TestNG
Selenium TestNGSelenium TestNG
Selenium TestNG
 
Angular Multi-env Setup
Angular Multi-env SetupAngular Multi-env Setup
Angular Multi-env Setup
 

Similar to 2014 land your-first_patch_neutron

InteropWG Intro & Vertical Programs (May. 2017)
InteropWG Intro & Vertical Programs (May. 2017)InteropWG Intro & Vertical Programs (May. 2017)
InteropWG Intro & Vertical Programs (May. 2017)
Mark Voelker
 
Test parallelization using Jenkins
Test parallelization using JenkinsTest parallelization using Jenkins
Test parallelization using Jenkins
Rogue Wave Software
 
DefCore: The Interoperability Standard for OpenStack
DefCore: The Interoperability Standard for OpenStackDefCore: The Interoperability Standard for OpenStack
DefCore: The Interoperability Standard for OpenStack
Mark Voelker
 
From silex to symfony and viceversa
From silex to symfony and viceversaFrom silex to symfony and viceversa
From silex to symfony and viceversa
Ronny López
 
Contributing to OpenStack
Contributing to OpenStackContributing to OpenStack
Contributing to OpenStack
devkulkarni
 
A la découverte des google/test (aka gtest)
A la découverte des google/test (aka gtest)A la découverte des google/test (aka gtest)
A la découverte des google/test (aka gtest)
Thierry Gayet
 
Deploying at will - SEI
 Deploying at will - SEI Deploying at will - SEI
Design For Testability
Design For TestabilityDesign For Testability
Design For Testability
Giovanni Asproni
 
Automation for Anyone at Nutanix NEXT 2017 US
Automation for Anyone at Nutanix NEXT 2017 USAutomation for Anyone at Nutanix NEXT 2017 US
Automation for Anyone at Nutanix NEXT 2017 US
Chris Wahl
 
Automation: The Good, The Bad and The Ugly with DevOpsGuys - AppD Summit Europe
Automation: The Good, The Bad and The Ugly with DevOpsGuys - AppD Summit EuropeAutomation: The Good, The Bad and The Ugly with DevOpsGuys - AppD Summit Europe
Automation: The Good, The Bad and The Ugly with DevOpsGuys - AppD Summit Europe
AppDynamics
 
DevOpsGuys - DevOps Automation - The Good, The Bad and The Ugly
DevOpsGuys - DevOps Automation - The Good, The Bad and The UglyDevOpsGuys - DevOps Automation - The Good, The Bad and The Ugly
DevOpsGuys - DevOps Automation - The Good, The Bad and The Ugly
DevOpsGroup
 
Devops interview questions 2 www.bigclasses.com
Devops interview questions  2  www.bigclasses.comDevops interview questions  2  www.bigclasses.com
Devops interview questions 2 www.bigclasses.com
bigclasses.com
 
Unit Testing in R with Testthat - HRUG
Unit Testing in R with Testthat - HRUGUnit Testing in R with Testthat - HRUG
Unit Testing in R with Testthat - HRUG
egoodwintx
 
Agile
AgileAgile
Agile
Komal2525
 
DevOps - Boldly Go for Distro
DevOps - Boldly Go for DistroDevOps - Boldly Go for Distro
DevOps - Boldly Go for Distro
Paul Boos
 
PaaSTA: Running applications at Yelp
PaaSTA: Running applications at YelpPaaSTA: Running applications at Yelp
PaaSTA: Running applications at Yelp
Nathan Handler
 
Fluo CICD OpenStack Summit
Fluo CICD OpenStack SummitFluo CICD OpenStack Summit
Fluo CICD OpenStack Summit
Miguel Zuniga
 
MuleSoft_Meetup_Brisbane_2022-06-01_SonarQube_CataloguingAPIs.pptx
MuleSoft_Meetup_Brisbane_2022-06-01_SonarQube_CataloguingAPIs.pptxMuleSoft_Meetup_Brisbane_2022-06-01_SonarQube_CataloguingAPIs.pptx
MuleSoft_Meetup_Brisbane_2022-06-01_SonarQube_CataloguingAPIs.pptx
BrianFraser29
 
CNUG TDD June 2014
CNUG TDD June 2014CNUG TDD June 2014
CNUG TDD June 2014
Mayank Srivastava
 
The State of the Veil Framework
The State of the Veil FrameworkThe State of the Veil Framework
The State of the Veil Framework
VeilFramework
 

Similar to 2014 land your-first_patch_neutron (20)

InteropWG Intro & Vertical Programs (May. 2017)
InteropWG Intro & Vertical Programs (May. 2017)InteropWG Intro & Vertical Programs (May. 2017)
InteropWG Intro & Vertical Programs (May. 2017)
 
Test parallelization using Jenkins
Test parallelization using JenkinsTest parallelization using Jenkins
Test parallelization using Jenkins
 
DefCore: The Interoperability Standard for OpenStack
DefCore: The Interoperability Standard for OpenStackDefCore: The Interoperability Standard for OpenStack
DefCore: The Interoperability Standard for OpenStack
 
From silex to symfony and viceversa
From silex to symfony and viceversaFrom silex to symfony and viceversa
From silex to symfony and viceversa
 
Contributing to OpenStack
Contributing to OpenStackContributing to OpenStack
Contributing to OpenStack
 
A la découverte des google/test (aka gtest)
A la découverte des google/test (aka gtest)A la découverte des google/test (aka gtest)
A la découverte des google/test (aka gtest)
 
Deploying at will - SEI
 Deploying at will - SEI Deploying at will - SEI
Deploying at will - SEI
 
Design For Testability
Design For TestabilityDesign For Testability
Design For Testability
 
Automation for Anyone at Nutanix NEXT 2017 US
Automation for Anyone at Nutanix NEXT 2017 USAutomation for Anyone at Nutanix NEXT 2017 US
Automation for Anyone at Nutanix NEXT 2017 US
 
Automation: The Good, The Bad and The Ugly with DevOpsGuys - AppD Summit Europe
Automation: The Good, The Bad and The Ugly with DevOpsGuys - AppD Summit EuropeAutomation: The Good, The Bad and The Ugly with DevOpsGuys - AppD Summit Europe
Automation: The Good, The Bad and The Ugly with DevOpsGuys - AppD Summit Europe
 
DevOpsGuys - DevOps Automation - The Good, The Bad and The Ugly
DevOpsGuys - DevOps Automation - The Good, The Bad and The UglyDevOpsGuys - DevOps Automation - The Good, The Bad and The Ugly
DevOpsGuys - DevOps Automation - The Good, The Bad and The Ugly
 
Devops interview questions 2 www.bigclasses.com
Devops interview questions  2  www.bigclasses.comDevops interview questions  2  www.bigclasses.com
Devops interview questions 2 www.bigclasses.com
 
Unit Testing in R with Testthat - HRUG
Unit Testing in R with Testthat - HRUGUnit Testing in R with Testthat - HRUG
Unit Testing in R with Testthat - HRUG
 
Agile
AgileAgile
Agile
 
DevOps - Boldly Go for Distro
DevOps - Boldly Go for DistroDevOps - Boldly Go for Distro
DevOps - Boldly Go for Distro
 
PaaSTA: Running applications at Yelp
PaaSTA: Running applications at YelpPaaSTA: Running applications at Yelp
PaaSTA: Running applications at Yelp
 
Fluo CICD OpenStack Summit
Fluo CICD OpenStack SummitFluo CICD OpenStack Summit
Fluo CICD OpenStack Summit
 
MuleSoft_Meetup_Brisbane_2022-06-01_SonarQube_CataloguingAPIs.pptx
MuleSoft_Meetup_Brisbane_2022-06-01_SonarQube_CataloguingAPIs.pptxMuleSoft_Meetup_Brisbane_2022-06-01_SonarQube_CataloguingAPIs.pptx
MuleSoft_Meetup_Brisbane_2022-06-01_SonarQube_CataloguingAPIs.pptx
 
CNUG TDD June 2014
CNUG TDD June 2014CNUG TDD June 2014
CNUG TDD June 2014
 
The State of the Veil Framework
The State of the Veil FrameworkThe State of the Veil Framework
The State of the Veil Framework
 

Recently uploaded

Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket ManagementUtilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate
 
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Globus
 
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
informapgpstrackings
 
Large Language Models and the End of Programming
Large Language Models and the End of ProgrammingLarge Language Models and the End of Programming
Large Language Models and the End of Programming
Matt Welsh
 
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Globus
 
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteAI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
Google
 
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
Juraj Vysvader
 
A Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of PassageA Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of Passage
Philip Schwarz
 
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Shahin Sheidaei
 
Text-Summarization-of-Breaking-News-Using-Fine-tuning-BART-Model.pptx
Text-Summarization-of-Breaking-News-Using-Fine-tuning-BART-Model.pptxText-Summarization-of-Breaking-News-Using-Fine-tuning-BART-Model.pptx
Text-Summarization-of-Breaking-News-Using-Fine-tuning-BART-Model.pptx
ShamsuddeenMuhammadA
 
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoamOpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
takuyayamamoto1800
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
rickgrimesss22
 
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns
 
Introduction to Pygame (Lecture 7 Python Game Development)
Introduction to Pygame (Lecture 7 Python Game Development)Introduction to Pygame (Lecture 7 Python Game Development)
Introduction to Pygame (Lecture 7 Python Game Development)
abdulrafaychaudhry
 
BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024
Ortus Solutions, Corp
 
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus
 
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Globus
 
Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"
Donna Lenk
 
First Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User EndpointsFirst Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User Endpoints
Globus
 
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdfDominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
AMB-Review
 

Recently uploaded (20)

Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket ManagementUtilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
 
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
 
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
 
Large Language Models and the End of Programming
Large Language Models and the End of ProgrammingLarge Language Models and the End of Programming
Large Language Models and the End of Programming
 
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
 
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteAI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
 
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
 
A Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of PassageA Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of Passage
 
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
 
Text-Summarization-of-Breaking-News-Using-Fine-tuning-BART-Model.pptx
Text-Summarization-of-Breaking-News-Using-Fine-tuning-BART-Model.pptxText-Summarization-of-Breaking-News-Using-Fine-tuning-BART-Model.pptx
Text-Summarization-of-Breaking-News-Using-Fine-tuning-BART-Model.pptx
 
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoamOpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
 
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology Solutions
 
Introduction to Pygame (Lecture 7 Python Game Development)
Introduction to Pygame (Lecture 7 Python Game Development)Introduction to Pygame (Lecture 7 Python Game Development)
Introduction to Pygame (Lecture 7 Python Game Development)
 
BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024
 
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024
 
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
 
Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"
 
First Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User EndpointsFirst Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User Endpoints
 
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdfDominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
 

2014 land your-first_patch_neutron

  • 1. Land your first Neutron patch Rossella Sblendido <rsblendido@suse.com>
  • 3. 3 After this talk...
  • 5. 5 What's Neutron? •Neutron is an OpenStack project to provide “networking as a service” between interface devices (e.g., vNICs) managed by other OpenStack services (e.g., Nova) •Provides a powerful API to define the network connectivity
  • 6. 6 Modular architecture •Neutron-server: expose the API •Plugin: custom back-end implementation of the Networking API •Several agents: ‒plug-in agent (L2 agent): runs on each hypervisor to perform local vSwitch configuration ‒dhcp agent: Provides DHCP services to tenant networks ‒l3 agent: Provides L3/NAT forwarding to provide external network access for VMs on tenant network
  • 7. 7 I want to know more... •Read the networking admin guide here •Explore the code: git clone git@github.com:openstack/neutron.git Tip: PyCharm can make your life easier ‒Navigate to Class Ctrl+N ‒Navigate to File Ctrl+Shift+N ‒Navigate to Declaration Ctrl+B
  • 8. 8 Use Devstack to crack it open • Script to build a complete stack • To set it up only few steps: ‒ git clone https://github.com/openstack-dev/devstack.git ‒ cd devstack; ./stack.sh • Resume the screen session to check what's going on: screen -x • You can use pdb to set breakpoints
  • 9. 9 Devstack – Config file tips disable_service n-net enable_service q-svc enable_service q-agt enable_service q-dhcp enable_service q-l3 enable_service q-meta DATABASE_PASSWORD=admin RABBIT_PASSWORD=admin SERVICE_TOKEN=admin SERVICE_PASSWORD=admin ADMIN_PASSWORD=admin INSTALL_TESTONLY_PACKAGES=True
  • 10. 10 Inspecting the networking configuration •ip link •ip netns list •ip netns exec <namespace> <command> •ovs-vsctl show •iptables -S
  • 11. 11 Questions... Where to ask? • IRC freenode #openstack-neutron • openstack - general questions • openstack-dev - dev related questions • openstack-operators Follow the mailing list etiquette
  • 12. Writing your first patchFix a bug or add a new feature
  • 14. 14 Launchpad • Bugs • Blueprints • Milestones/Releases • It handles authentication for other websites (eg. Gerrit)
  • 15. 15 Bugs • Look for "low-hanging-fruit" tag • Pick one and assign it to you
  • 16. 16 How to fix a bug • Try to reproduce it • Debug the issue (add log statement or you can use a debugger if you are on Devstack) • Write a patch • Test it • Write a unit test if that's appropriate to avoid regressions
  • 17. 17 Blueprint + Spec workflow • Register blueprint in Launchpad • Upload a design specification to Gerrit to specs/<release> folder in neutron-specs • Use specs/template.srt from Neutron specs repo • Specs follow the same Gerrit workflow as patches • Project drivers will approve blueprint
  • 19. 19 Style check • Based on flake8 and hacking
  • 20. 20 How to run unittests • run_tests.sh script • tox Run one test: •./run_tests.sh neutron.tests.unit.test_api_v2.JSONV2TestCase or •tox -e py27 neutron.tests.unit.test_api_v2.JSONV2TestCase
  • 21. 21 Debugging unitests •./run_tests.sh -d [test module path] •tox -e venv -- python -m testtools.run [test module path] See here for more info
  • 23. 23 Git Git is the tool used for managing the code ‒ git clone (clone Neutron repo) ‒ git checkout -b topic-branch ‒ apply your changes ‒ git add ‒ git commit ‒ git review -> you need to install it ‒ git commit --amend -> create a new patch Set ‒ git review
  • 25. 25 Gerrit • You can review other people code, your code get reviewed • Automatic Gatekeeper
  • 26. 26 Gerrit – Code-Review and Workflow Code-Review ‒+1, -1 everybody ‒+2, -2 core reviewers Workflow ‒Workflow +1 , only core reviewers (usually after it got 2x +2) ‒Workflow -1, WIP
  • 27. 27 Gerrit – Verified • Every patch is tested and gets a ‒+1 Verified ‒-1 Failed • Style checker + unit tests + functional tests + integration tests (Tempest) + upgrade tests (Grenade) • Test are run by the OpenStack CI and for some project by third party CI • Logs are accessible, you can check why a test failed
  • 28. Get your patch merged
  • 29. 29 Code - Best practices • Check spelling • Add comments if needed • Run flake8 and test before you submit • Create small patches • Do one logical change per patch. Don't mixup different fixes • Try to avoid dependent patches if possible -> rebase hell
  • 30. 30 Commit messages – best practices • Explain the how and the why, not the what • Use special tags in commit messages (i.e. "Closes-Bug: #1234567") , they are matched by automation scripts • For needed documentation changes, use DocImpact flag • See here for more info
  • 31. 31 Getting reviews - Best practices • Be polite • Try to be specific regarding what you will address and what not. • Reply 'Done' if you are gonna change the patch according to the comment. • Explain why you are not gonna address a comment • The best way to get reviews is to be involved
  • 32. 32 Reviewing - Best practices • Be polite • Ask questions • Show examples when you give some suggestion • If you give a "-1" make sure to check if the submitter answered. A '-1' can block a patch • Quality vs quantity • It takes time to review but you will learn a lot!
  • 33. Thank you. 33 Questions?
  • 34. Unpublished Work of SUSE. All Rights Reserved. This work is an unpublished work and contains confidential, proprietary and trade secret information of SUSE. Access to this work is restricted to SUSE employees who have a need to know to perform tasks within the scope of their assignments. No part of this work may be practiced, performed, copied, distributed, revised, modified, translated, abridged, condensed, expanded, collected, or adapted without the prior written consent of SUSE. Any use or exploitation of this work without authorization could subject the perpetrator to criminal and civil liability. General Disclaimer This document is not to be construed as a promise by any participating company to develop, deliver, or market a product. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. SUSE makes no representations or warranties with respect to the contents of this document, and specifically disclaims any express or implied warranties of merchantability or fitness for any particular purpose. The development, release, and timing of features or functionality described for SUSE products remains at the sole discretion of SUSE. Further, SUSE reserves the right to revise this document and to make changes to its content, at any time, without obligation to notify any person or entity of such revisions or changes. All SUSE marks referenced in this presentation are trademarks or registered trademarks of Novell, Inc. in the United States and other countries. All third-party trademarks are the property of their respective owners.