← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1386060] Re: [glance_store] should use os.statvfs to get available disk space in filesystem driver

 

** Project changed: glance => glance-store

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to Glance.
https://bugs.launchpad.net/bugs/1386060

Title:
  [glance_store] should use os.statvfs to get available disk space in
  filesystem driver

Status in OpenStack Glance backend store-drivers library (glance_store):
  Fix Committed

Bug description:
          df = processutils.execute("df", "-k",
                                    mount_point)[0].strip("'\n'")
          total_available_space = int(df.split('\n')[1].split()[3]) * units.Ki

  The above code raises "IndexError: list index out of range" if the name of the 
  Filesystem is too long.
  e.g 

  [root@a-b-c-d ~]# df -k /root/.emacs.d/
  Filesystem           1K-blocks    Used Available Use% Mounted on
  /dev/mapper/vg_foo-by_root
                        51606140 6169468  42815232  13% /

  The available size is in the third line instead of the second line.

To manage notifications about this bug go to:
https://bugs.launchpad.net/glance-store/+bug/1386060/+subscriptions


References