test_libvirt:LibvirtUtilsTestCase.test_get_fs_info fails on Mac OS X

Bug #893840 reported by Lorin Hochstein
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Undecided
Lorin Hochstein

Bug Description

test_libvirt:LibvirtUtilsTestCase.test_get_fs_info fails on Mac OS X because its "df" program doesn't support the -B flag.

$ ./run_tests.sh test_libvirt:LibvirtUtilsTestCase.test_get_fs_info --nologcapture
LibvirtUtilsTestCase
    test_get_fs_info ERROR

======================================================================
ERROR: test_get_fs_info (nova.tests.test_libvirt.LibvirtUtilsTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/lorin/nova/nova/tests/test_libvirt.py", line 1847, in test_get_fs_info
    stdout, stderr = utils.execute('df', '-B1', '/tmp')
  File "/Users/lorin/nova/nova/utils.py", line 193, in execute
    cmd=' '.join(cmd))
ProcessExecutionError: Unexpected error while running command.
Command: df -B1 /tmp
Exit code: 64
Stdout: ''
Stderr: 'df: illegal option -- B\nusage: df [-b | -H | -h | -k | -m | -g | -P] [-ailn] [-T type] [-t] [filesystem ...]\n'

Revision history for this message
Lorin Hochstein (lorinh) wrote :

Note that you can't set a blocksize of 1 with df on OS X at all:

$ BLOCKSIZE=1 df /tmp
df: minimum blocksize is 512
df: minimum blocksize is 512
Filesystem 512-blocks Used Available Capacity Mounted on
/dev/disk1 974803248 289149696 685141552 30% /

Revision history for this message
Openstack Gerrit (openstack-gerrit) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/1861
Committed: http://github.com/openstack/nova/commit/bbbd489590e20d5a476fd3f68359f32d549752ca
Submitter: Jenkins
Branch: master

 status fixcommitted
 done

commit bbbd489590e20d5a476fd3f68359f32d549752ca
Author: Lorin Hochstein <email address hidden>
Date: Tue Nov 22 20:45:58 2011 -0500

    Call df with -k instead of -B1

    Fix bug 893840

    Change-Id: Ibdb5fe364f3ce086ee198d90f3593f3852fe2c97

Changed in nova:
status: New → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → essex-2
status: Fix Committed → Fix Released
Mark McLoughlin (markmc)
Changed in nova:
assignee: nobody → Lorin Hochstein (lorinh)
Thierry Carrez (ttx)
Changed in nova:
milestone: essex-2 → 2012.1
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.