Merge lp:~dannf/charms/precise/mysql/lp1188424 into lp:charms/mysql

Proposed by dann frazier
Status: Merged
Approved by: Mark Mims
Approved revision: 100
Merged at revision: 101
Proposed branch: lp:~dannf/charms/precise/mysql/lp1188424
Merge into: lp:charms/mysql
Diff against target: 24 lines (+6/-1)
1 file modified
hooks/config-changed (+6/-1)
To merge this branch: bzr merge lp:~dannf/charms/precise/mysql/lp1188424
Reviewer Review Type Date Requested Status
Mark Mims (community) Approve
Review via email: mp+167881@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Mark Mims (mark-mims) wrote :

lgtm

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'hooks/config-changed'
2--- hooks/config-changed 2013-03-15 14:55:25 +0000
3+++ hooks/config-changed 2013-06-07 00:35:37 +0000
4@@ -7,6 +7,7 @@
5 import hashlib
6 import os
7 import sys
8+import platform
9 from string import upper
10
11 num_re = re.compile('^[0-9]+$')
12@@ -38,7 +39,11 @@
13 IS_32BIT_SYSTEM = sys.maxsize < 2**32
14 except OverflowError:
15 IS_32BIT_SYSTEM = True
16-SYS_MEM_LIMIT = human_to_bytes('4G')
17+
18+if platform.machine() in ['armv7l']:
19+ SYS_MEM_LIMIT = human_to_bytes('2700M') # experimentally determined
20+else:
21+ SYS_MEM_LIMIT = human_to_bytes('4G')
22
23 if IS_32BIT_SYSTEM:
24 check_call(['juju-log','-l','INFO','32bit system restrictions in play'])

Subscribers

People subscribed via source and target branches