~hloeung/ubuntu-repository-cache/logging-ubuntu_active-plus-keeps

« back to all changes in this revision

Viewing changes to lib/ubuntu_repository_cache/storage.py

  • Committer: Robert Jennings
  • Date: 2014-09-17 18:48:10 UTC
  • Revision ID: robert.jennings@canonical.com-20140917184810-udp16zvq6zaz78v9
Spelling fixes

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
import os
5
5
import subprocess
6
6
 
7
 
# pylink can't find the modules  # pylint: disable=F0401
 
7
# pylint can't find the modules  # pylint: disable=F0401
8
8
from charmhelpers.contrib.storage.linux import utils as Storage
9
9
from charmhelpers.core import (
10
10
    fstab,
156
156
    # Reserve 8GB for metadata and 4GB for the OS
157
157
    reserve = 8192 + 4092
158
158
    if max_size < reserve:
159
 
        LOG('Less than {} free @ {} for mirror.'.format(reserve,
160
 
                                                        primary_mount),
 
159
        LOG('Less than {}MB disk free @ {} for mirror.'.format(reserve,
 
160
                                                               primary_mount),
161
161
            hookenv.ERROR)
162
162
    else:
163
163
        max_size = max_size - reserve