Basic confusion on cinder development setup

Asked by Raj C

Greetings. I am a little confused by the setup issues, hence questioning if I am doing it right.

I am playing with setup on a stand alone host (and also in a VM), with Ubuntu 12.04.lts.

I have installed devstack and have been able to use the Dashboard to launch a VM and create a volume. So far so good.

I have a couple of questions:

Q1: When I compare http://docs.openstack.org/trunk/openstack-compute/install/apt/content/osfolubuntu-cinder.html,
I don't see any services running: cinder-volume, cinder-api, cinder-scheduler !!???

I get error in these:
$ sudo service cinder-volume restart
$ sudo service cinder-api restart
$ sudo service cinder-scheduler restart

Q2: I have tried to see how logging is working. But there is no log file created (by default). I did change the cinder.conf file, and executed stack.sh. That obviously overwrote my cinder.conf. So how do you activate logging, and restart cinder.

Q3: How do you develop/test cinder. Do you work with devstack in a vm or in a server, or something else? Am I doing something wrong?

Thanks.

-Raj

Question information

Language:
English Edit question
Status:
Solved
For:
Cinder Edit question
Assignee:
No assignee Edit question
Solved by:
Avishay Traeger
Solved:
Last query:
Last reply:
Revision history for this message
Avishay Traeger (avishay-il) said :
#1

Hello Raj,

A1: Maybe your version of devstack is using Nova-volume instead of Cinder? Is the nova-volume process running?

A2: Set the appropriate variables in your localrc file, then run stack.sh. I use the following settings - check what is most suitable for you:

SYSLOG=False
LOG_COLOR=False
LOGDAYS=7
LOGFILE=/home/stack/logs/openstack
SCREEN_LOGDIR=/home/stack/logs

A3: I personally use devstack on a server, but you can use whatever works best for you. For testing:
- there are the Cinder unit tests
- some "tests" under the "exercises" directory in devstack
- take a look at the "tempest" project for more "serious" testing

Revision history for this message
Raj C (raj-c) said :
#2

Thanks, Avishay for your quick reply.

There is no Nova-volume running. This is the latest code from the repository.

And these cinder related processes are running:

devstack 9852 0.0 0.1 54072 32632 pts/20 S+ Dec14 0:04 python /opt/stack/cinder/bin/cinder-api --config-file /etc/cinder/cinder.conf
devstack 9919 0.1 0.1 43508 24524 pts/21 S+ Dec14 5:16 python /opt/stack/cinder/bin/cinder-volume --config-file /etc/cinder/cinder.conf
devstack 9991 0.1 0.1 42524 23364 pts/22 S+ Dec14 5:10 python /opt/stack/cinder/bin/cinder-scheduler --config-file /etc/cinder/cinder.conf

(And cinder is also shown as a service in the Dashboard: under System Info).

Qa: But there is no 'service' running for cinder-api or cinder-volume or cinder-scheduler, as the manual says to restart. How do these three processes (re)start?

Qb: I am assuming devstack stack.sh script prepares a small scratch area where a volumes can be carved out. But what would be the mechanism for vendor (or some other kind) devices to be listed/shown in dashboard. Perhaps marked by 'type'? Is this something outside the scope of devstack?

I shall look at 'tempest'. Thanks.

Revision history for this message
Best Avishay Traeger (avishay-il) said :
#3

Hi Raj,

Qa: OK, now I understand. You mentioned in the original post that the services were not running, and I thought you meant that the processes were not running. The difference between devstack and the instructions in your link is that devstack installs everything from git, while the instructions install using apt-get. The Ubuntu package contains the the script that is run when you do "sudo service cinder-volume restart" for example. These scripts is usually installed in /etc/init.d/ . If you'd like, I guess you can get the script from the Ubuntu package and install it yourself. Then after devstack runs, you should be able to restart Cinder using the script. Note, however, that the script won't start/stop it exactly like devstack does - devstack starts the processes using 'screen'. In my development work, there is usually no reason to restart a process. If I make changes to the code I usually run "unstack.sh" and "stack.sh" to get a (relatively) clean environment.

Qb: The way I did it (not sure it's the best way) is to modify devstack/lib/cinder . Toward the end of the "configure_cinder" function, you will see lots of lines with "iniset $CINDER_CONF DEFAULT ...". These lines build the configuration file. So I added lines like so:

    iniset $CINDER_CONF DEFAULT volume_driver "cinder.volume.storwize_svc.StorwizeSVCDriver"
    iniset $CINDER_CONF DEFAULT san_ip "x.x.x.x"
    iniset $CINDER_CONF DEFAULT storwize_svc_volpool_name "pool"
    iniset $CINDER_CONF DEFAULT san_ssh_port 22
    iniset $CINDER_CONF DEFAULT san_login "user"
    iniset $CINDER_CONF DEFAULT san_password "pass"
    iniset $CINDER_CONF DEFAULT storwize_svc_volpool_compression "True"
    iniset $CINDER_CONF DEFAULT debug "true"
    iniset $CINDER_CONF DEFAULT verbose "true"

Note the last two options that I added should give you more debug info. As for "marked by 'type'?" - the type of storage that a volume is stored on is not visible to the user - the user should not be aware of such details.

Hope that helps!

Revision history for this message
John Griffith (john-griffith) said :
#4

Hi Raj,
On devstack we don't install packages etc, we launch each OpenStack process in a screen session. To access type 'screen -x', as the user that you ran stack.sh as.

I think that's what you're looking for, if now lemme know.

Revision history for this message
Raj C (raj-c) said :
#5

Thank you, Avishay.

Revision history for this message
Raj C (raj-c) said :
#6

Thanks, John.

I understand it much better, now that Avishay and you have clarified various aspects of devstack and cinder.

=Raj

Revision history for this message
Raj C (raj-c) said :
#7

Thanks Avishay Traeger, that solved my question.

Revision history for this message
Raj C (raj-c) said :
#8

(Sorry, I did not know that clicking on a message as it 'solved the problem' will generate another message! Apologies for the extra traffic).