Ask Your Question
0

Developing + Debugging Quantum via Devstack

asked 2012-12-03 22:43:14 -0600

rms gravatar image

Hi, I am new to the OpenStack. I have installed it using devstack on of the self created ubuntu based hypervisor and want to play with Quantum. I was wondering besides seeing logs, if I were to make changes to the code, add traces to the code what is the best way of doing it.

By default i see that code is in my /opt/stack/quantum/. I believe I can make code changes there. But once that is done, what steps are required such that the quantum components are updated at runtime? Will stopping and starting all quantum services do? If yes, is this possible in devstack as they dont seem to be running them as services?

I would appreciate help here.

Thanks, Ronak

edit retag flag offensive close merge delete

7 answers

Sort by ยป oldest newest most voted
0

answered 2012-12-03 22:58:36 -0600

danwent gravatar image

you can access screen windows running each of the openstack services by running: screen -x stack

the quantum service windows all have names starting with "q-"

for most changes, you should just be able to control-c and then restart the services to pick up changes you made in /opt/stack/quantum

if you make more fundamental changes (e.g., to the database) or want to start with a clean setup, just run:

./unstack.sh ./stack.sh

edit flag offensive delete link more
0

answered 2012-12-04 00:34:34 -0600

rms gravatar image

The problem that I am facing is I dont see screen getting created.

screen -x stack returns:

stack@hypervisor4:/opt/stack/devstack$ sudo screen -x stack There is no screen to be attached matching stack. stack@hypervisor4:/opt/stack/devstack$screen -x stack Cannot open your terminal '/dev/pts/1' - please check.

However, when stack.sh is getting executed I do see msgs as below: screen -S stack -X screen -t n-obj

What can be going wrong here?

edit flag offensive delete link more
0

answered 2012-12-04 01:01:03 -0600

minsel gravatar image

Ronak,

Just go to the directory where you cloned DevStack and you will find the following screen:

rejoin-stack.sh

Execute it, Once inside, type CTRL-A " and you will get something like:

1 key $ 2 horizon $ 3 g-reg $ 4 g-api $ 5 n-api $ 6 q-svc $ 7 q-agt $ 8 q-dhcp $ 9 q-l3 $ 10 n-cond $ 11 n-cpu $ 12 n-crt $ 13 n-sch $ 14 n-novnc $ 15 n-xvnc $ 16 n-cauth $ 17 c-api $ 18 c-vol $ 19 c-sch $ 20 n-obj $

Just move with your keyboard arrows to the screen you want to go to and type enter

Regards

edit flag offensive delete link more
0

answered 2012-12-04 01:02:35 -0600

minsel gravatar image

ronak,

In the first line of my response, I meant:

Just go to the directory where you cloned DevStack and you will find the following SCRIPT:

edit flag offensive delete link more
0

answered 2012-12-04 06:41:52 -0600

danwent gravatar image

the error you are getting from devstack is likely because stack.sh was run by someone other than the current user you are using to run screen -x stack.

you can either rerun stack.sh as the right user, su to the user that ran stack.sh, or chmod the /dev/pts/X file to something to make it readable by the current users (for example, if this is a dev box where you are not worried about security between multiple users, you could do "chmod 777 /dev/pts/1".

edit flag offensive delete link more
0

answered 2012-12-04 17:44:28 -0600

rms gravatar image

Thank you Miguel, What you say works.

Ronak

edit flag offensive delete link more
0

answered 2012-12-04 17:46:37 -0600

rms gravatar image

Thanks Dan. /dev/pts/X was accessible only by root and I created devstack with user stack. changing chmod worked. I will change chmod just for stack. May be it would be a good feedback for devstack documents to include these steps as well.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2012-12-03 22:43:14 -0600

Seen: 72 times

Last updated: Dec 04 '12