Merge lp:~xianghui/charms/precise/ceph-radosgw/ceph_fastcgi into lp:~openstack-charmers-archive/charms/trusty/ceph-radosgw/next

Proposed by James Page
Status: Rejected
Rejected by: Edward Hope-Morley
Proposed branch: lp:~xianghui/charms/precise/ceph-radosgw/ceph_fastcgi
Merge into: lp:~openstack-charmers-archive/charms/trusty/ceph-radosgw/next
Diff against target: 93 lines (+41/-1)
4 files modified
README.md (+4/-0)
config.yaml (+6/-0)
hooks/hooks.py (+5/-1)
hooks/utils.py (+26/-0)
To merge this branch: bzr merge lp:~xianghui/charms/precise/ceph-radosgw/ceph_fastcgi
Reviewer Review Type Date Requested Status
James Page Pending
Review via email: mp+228452@code.launchpad.net

This proposal supersedes a proposal from 2014-07-25.

Description of the change

[Liang Chen, Hui Xiang] Use Ceph build FastCGI for chunked tranfer support.
    Fix bug #1329360 #1313758

To post a comment you must log in.
Revision history for this message
James Page (james-page) : Posted in a previous version of this proposal
review: Needs Fixing
Revision history for this message
James Page (james-page) wrote : Posted in a previous version of this proposal

Also you need to follow the stable charm policy outlined:

https://wiki.ubuntu.com/ServerTeam/OpenStackCharms

Re-targetting for /next first.

Revision history for this message
Edward Hope-Morley (hopem) wrote : Posted in a previous version of this proposal
review: Disapprove

Unmerged revisions

22. By Xiang Hui

[Liang Chen, Hui Xiang] Use Ceph build FastCGI for chunked tranfer support.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'README.md'
2--- README.md 2013-05-10 09:25:06 +0000
3+++ README.md 2014-07-28 08:57:03 +0000
4@@ -80,3 +80,7 @@
5 As such it will try to automatically enable the multiverse pocket in
6 /etc/apt/sources.list. Note that there is noting 'wrong' with multiverse
7 components - they typically have less liberal licensing policies or suchlike.
8+
9+Note: For x86_64 arch, a Ceph build version of FastCGI will be installed to support
10+advanced features - 100 continue and chunked transfer. The later one in particular
11+is nesessary for a full compatibility with Swift.
12
13=== modified file 'config.yaml'
14--- config.yaml 2014-03-25 18:44:22 +0000
15+++ config.yaml 2014-07-28 08:57:03 +0000
16@@ -46,3 +46,9 @@
17 default: False
18 description: |
19 If set to True, supporting services will log to syslog.
20+ use-patched-fastcgi:
21+ type: boolean
22+ default: False
23+ description: |
24+ Ceph patched version of libfastcgi supports advanced features - 100 continue and chunked transfer.
25+ Chunked transfer is nesessary for a full compatibility with Swift.
26
27=== modified file 'hooks/hooks.py'
28--- hooks/hooks.py 2014-07-23 11:37:44 +0000
29+++ hooks/hooks.py 2014-07-28 08:57:03 +0000
30@@ -34,6 +34,7 @@
31 render_template,
32 get_host_ip,
33 enable_pocket,
34+ config_fastcgi_repo,
35 is_apache_24
36 )
37
38@@ -55,7 +56,10 @@
39 @hooks.hook('install')
40 def install():
41 execd_preinstall()
42- enable_pocket('multiverse')
43+ if config('use-patched-fastcgi'):
44+ config_fastcgi_repo()
45+ else:
46+ enable_pocket('multiverse')
47 add_source(config('source'), config('key'))
48 apt_update(fatal=True)
49 apt_install(['radosgw',
50
51=== modified file 'hooks/utils.py'
52--- hooks/utils.py 2014-01-24 16:21:42 +0000
53+++ hooks/utils.py 2014-07-28 08:57:03 +0000
54@@ -10,9 +10,13 @@
55 import socket
56 import re
57 import os
58+import subprocess
59
60 from charmhelpers.core.hookenv import unit_get
61+from charmhelpers.core.host import lsb_release
62 from charmhelpers.fetch import apt_install
63+from charmhelpers.fetch import add_source
64+from charmhelpers.fetch import apt_update, apt_upgrade
65
66 TEMPLATES_DIR = 'templates'
67
68@@ -67,3 +71,25 @@
69 return True
70 else:
71 return False
72+
73+
74+CEPH_FASTCGI_REPO = \
75+ "http://gitbuilder.ceph.com/libapache-mod-fastcgi-deb-" + \
76+ lsb_release()['DISTRIB_CODENAME'] + \
77+ "-x86_64-basic/ref/master "
78+CEPH_REPO_KEY = "6EAEAE2203C3951A"
79+
80+
81+def config_fastcgi_repo():
82+ arch = get_cpu_arch()
83+ if(arch == 'x86_64'):
84+ add_source(CEPH_FASTCGI_REPO, CEPH_REPO_KEY)
85+ else:
86+ enable_pocket('multiverse')
87+
88+
89+def get_cpu_arch():
90+ ''' Retrun CPU architecture info '''
91+ cmd = ['uname', '-m']
92+ arch_output = subprocess.check_output(cmd).split('\n')
93+ return arch_output[0]

Subscribers

People subscribed via source and target branches