Merge lp:~vishvananda/nova/fix-volume-smoketest into lp:~hudson-openstack/nova/trunk

Proposed by Vish Ishaya
Status: Merged
Approved by: Soren Hansen
Approved revision: 906
Merged at revision: 915
Proposed branch: lp:~vishvananda/nova/fix-volume-smoketest
Merge into: lp:~hudson-openstack/nova/trunk
Diff against target: 17 lines (+3/-2)
1 file modified
smoketests/test_sysadmin.py (+3/-2)
To merge this branch: bzr merge lp:~vishvananda/nova/fix-volume-smoketest
Reviewer Review Type Date Requested Status
Jay Pipes (community) Approve
Soren Hansen (community) Approve
Devin Carlen (community) Approve
Review via email: mp+55252@code.launchpad.net

Description of the change

Uses the proc filesystem to check the volume size in volume smoketests so that it works with a very limited busybox image.

To post a comment you must log in.
Revision history for this message
Devin Carlen (devcamcar) wrote :

approving, but could you add a note for what this means? Starting to look pretty arbitrary :)

13 + expected_size = 1024 * 1024 * 1024 / 512

review: Approve
906. By Vish Ishaya

add note per review

Revision history for this message
Vish Ishaya (vishvananda) wrote :

good point, added.

Vish

On Mar 28, 2011, at 4:47 PM, Devin Carlen wrote:

> Review: Approve
> approving, but could you add a note for what this means? Starting to look pretty arbitrary :)
>
> 13 + expected_size = 1024 * 1024 * 1024 / 512
>
>
> --
> https://code.launchpad.net/~vishvananda/nova/fix-volume-smoketest/+merge/55252
> You are the owner of lp:~vishvananda/nova/fix-volume-smoketest.

Revision history for this message
Jay Pipes (jaypipes) wrote :

This may be a stoopid question (sorry if it is), but is this pidgeon-holing the test_sysadmin smoketest to only working with a specific image with a specific size?

review: Needs Information
Revision history for this message
Soren Hansen (soren) wrote :

> This may be a stoopid question (sorry if it is), but is this pidgeon-holing
> the test_sysadmin smoketest to only working with a specific image with a
> specific size?

No, we create a volume of a specific size, attach it to an instance, and from the instance verify that the volume's size is as we expected it to be.

lgtm

review: Approve
Revision history for this message
Jay Pipes (jaypipes) wrote :

> > This may be a stoopid question (sorry if it is), but is this pidgeon-holing
> > the test_sysadmin smoketest to only working with a specific image with a
> > specific size?
>
> No, we create a volume of a specific size, attach it to an instance, and from
> the instance verify that the volume's size is as we expected it to be.

OK, thanks for the answer, Soren. I was confusing checking the size of the image with the size of a volume... too many Glance test cases in the back of my mind I guess...

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'smoketests/test_sysadmin.py'
2--- smoketests/test_sysadmin.py 2011-03-20 19:04:51 +0000
3+++ smoketests/test_sysadmin.py 2011-03-28 23:51:32 +0000
4@@ -266,10 +266,11 @@
5 ip = self.data['instance'].private_dns_name
6 conn = self.connect_ssh(ip, TEST_KEY)
7 stdin, stdout, stderr = conn.exec_command(
8- "blockdev --getsize64 %s" % self.device)
9+ "cat /sys/class/block/%s/size" % self.device.rpartition('/')[2])
10 out = stdout.read().strip()
11 conn.close()
12- expected_size = 1024 * 1024 * 1024
13+ # NOTE(vish): 1G bytes / 512 bytes per block
14+ expected_size = 1024 * 1024 * 1024 / 512
15 self.assertEquals('%s' % (expected_size,), out,
16 'Volume is not the right size: %s %s. Expected: %s' %
17 (out, stderr.read(), expected_size))