If you want to make a quick change to a running service the easiest
way to do that is to change the code directly in /opt/stack/$service
and then restart the affected daemons.

sudo systemctl restart devstack@n-cpu.service

If your change impacts more than one daemon you can restart by
wildcard as well.

sudo systemctl restart "devstack@n-*"

Warning

All changes you are making are in checked out git trees that
DevStack thinks it has full control over. Uncommitted work, or
work committed to the master branch, may be overwritten during
subsequent DevStack runs.

When testing a larger set of patches, or patches that will impact more
than one service within a project, it is often less confusing to use
custom git locations, and make all your changes in a dedicated git
tree.

In your local.conf you can add **_REPO, **_BRANCH for most projects
to use a custom git tree instead of the default upstream ones.

Will use a custom git tree and branch when doing any devstack
operations, such as stack.sh.

When testing complicated changes committing to these trees, then doing
./unstack.sh&&./stack.sh is often a valuable way to
iterate. This does take longer per iteration than direct patching, as
the whole devstack needs to rebuild.

You can use this same approach to test patches that are up for review
in gerrit by using the ref name that gerrit assigns to each change.

When testing changes to libraries consumed by OpenStack services (such
as oslo or any of the python-fooclient libraries) things are a little
more complicated. By default we only test with released versions of
these libraries that are on pypi.

You must first override this with the setting LIBS_FROM_GIT. This
will enable your DevStack with the git version of that library instead
of the released version.

After that point you can also specify **_REPO, **_BRANCH to use
your changes instead of just upstream master.