BiteSizedTasks

From Libvirt Wiki
Revision as of 15:02, 17 April 2020 by WikiSysop (talk | contribs) (Move validation checks out of domain XML parsing)
Jump to: navigation, search

This page tracks introductory tasks for new libvirt contributors. Code cleanups, bugs, and small features are listed with difficulty ranging from trivial to intermediate.


Beginner tasks

These tasks are good first introductions to libvirt code. You will be required to get things building and make sure the test suite passes, but not necessarily need to understand the details of what libvirt is doing. Mostly these are following existing example changes that are already in the code. Contact the listed mentor with any questions

Slightly-less-beginner tasks

These tasks are slightly more involved than the beginner tasks, but still don't require extensive libvirt knowledge. If any of the beginner tasks seem too simple, maybe try one of these. Talk with the listed mentor if you have questions.

Move default Input bus logic to PostParse handling

Mentor: Cole Robinson <crobinso@redhat.com>

Similar to what was started with default video model logic in these commits:

Break out the default bus setting logic from virDomainInputDefParseXML and move it to PostParse handling. Look for anything that sets a def->bus value in that function, it's grounds for removal

Add additional virsh command line completion functions

Mentor: Michal Privoznik <mprivozn@redhat.com>

Completers are small functions that are called from the virsh command line tool whenever the user started typing something and hit TAB TAB. Their purpose is to offer list of strings that suit entered input. If there is only one item on the list then it's entered in automatically. For instance:

virsh # dom<TAB><TAB>
domblkerror         domblkstat          domcontrol          domfsinfo ..

virsh # start --domain <TAB><TAB>
fedora       fedora.i686  freebsd      gentoo ...

Additional functions are needed to improve other commands.

An example patch:

A series of example patches:

Bugs and feature requests from bugzilla (LibvirtFirstBug)

Some bugs in the libvirt bugzilla tracker are marked as good introductory bug reports or features for new contributors. These bugs have the 'LibvirtFirstBug' tag. Each bug report contains info and sample commits to point you in the right direction. You can open the list in your browser bugzilla here.

Failed to load RSS feed from https://bugzilla.redhat.com/buglist.cgi?bug_status=NEW&bug_status=ASSIGNED&bug_status=POST&bug_status=MODIFIED&classification=Community&f1=status_whiteboard&f2=component&list_id=4999130&o1=substring&o2=anywordssubstr&order=bug_id&product=Virtualization%20Tools&query_based_on=&query_format=advanced&v1=LibvirtFirstBug&v2=libvirt&ctype=atom: Error parsing XML for RSS

Ongoing code transitions

GLib replacements

In 2019 libvirt began using GLib internally. We can use GLib APIs to drop some libvirt-specific code.

Path functions

Functions in virfile.c related to path handling can be replaced with g_path_* APIs. The callers should be made to invoke the GLib APIS directly.

XAttr / ACLs

Replace virfile.c XAttr and ACL handling with GFileAttribute APIs

Threads

The callers of the various virMutex, virThread, virCond, virOnce, etc APIs should be switched to use the GLib threading APIs.

g_autofree and g_autoptr usage

g_autofree is a feature provided by GLib and the C compiler which will free a variable when it goes out of scope. g_autoptr works similarly, but it will call a custom registred free function instead.

We are slowly converting the code to use these new patterns. Any variable that is allocated and free'd within a single function can likely be converted to use g_autofree or g_autoptr. Similarly, any usage of VIR_FREE under a cleanup: can likely be converted.

virObject to GObject conversions

Our internal virObject implementation can be relatively easily replaced with GLib's GObject.