Merge lp:~seyeongkim/charms/trusty/swift-proxy/lp1334648 into lp:~openstack-charmers-archive/charms/trusty/swift-proxy/next

Proposed by Seyeong Kim
Status: Superseded
Proposed branch: lp:~seyeongkim/charms/trusty/swift-proxy/lp1334648
Merge into: lp:~openstack-charmers-archive/charms/trusty/swift-proxy/next
Diff against target: 131 lines (+47/-7)
4 files modified
config.yaml (+12/-0)
hooks/swift_context.py (+12/-0)
templates/icehouse/proxy-server.conf (+10/-2)
tests/basic_deployment.py (+13/-5)
To merge this branch: bzr merge lp:~seyeongkim/charms/trusty/swift-proxy/lp1334648
Reviewer Review Type Date Requested Status
Ryan Beisner (community) Needs Fixing
OpenStack Charmers Pending
Edward Hope-Morley Pending
James Page Pending
Review via email: mp+255343@code.launchpad.net

This proposal supersedes a proposal from 2015-02-10.

To post a comment you must log in.
Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote : Posted in a previous version of this proposal

charm_lint_check #1297 swift-proxy-next for xtrusia mp247835
    LINT OK: passed

Build: http://10.245.162.77:8080/job/charm_lint_check/1297/

Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote : Posted in a previous version of this proposal

charm_unit_test #1250 swift-proxy-next for xtrusia mp247835
    UNIT OK: passed

Build: http://10.245.162.77:8080/job/charm_unit_test/1250/

Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote : Posted in a previous version of this proposal

charm_amulet_test #1351 swift-proxy-next for xtrusia mp247835
    AMULET FAIL: amulet-test failed

AMULET Results (max last 2 lines):
  ERROR subprocess encountered error code 1
  make: *** [test] Error 1

Full amulet test output: http://paste.ubuntu.com/9918423/
Build: http://10.245.162.77:8080/job/charm_amulet_test/1351/

Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote : Posted in a previous version of this proposal

charm_amulet_test #1352 swift-proxy-next for xtrusia mp247835
    AMULET FAIL: amulet-test failed

AMULET Results (max last 2 lines):
  ERROR subprocess encountered error code 1
  make: *** [test] Error 1

Full amulet test output: http://paste.ubuntu.com/9918904/
Build: http://10.245.162.77:8080/job/charm_amulet_test/1352/

Revision history for this message
Ryan Beisner (1chb1n) wrote : Posted in a previous version of this proposal

FYI I triggered another run of the amulet test to confirm failure.

review: Needs Fixing
Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote : Posted in a previous version of this proposal

charm_unit_test #1408 swift-proxy-next for xtrusia mp247835
    UNIT OK: passed

Build: http://10.245.162.77:8080/job/charm_unit_test/1408/

Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote : Posted in a previous version of this proposal

charm_lint_check #1455 swift-proxy-next for xtrusia mp247835
    LINT OK: passed

Build: http://10.245.162.77:8080/job/charm_lint_check/1455/

Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote : Posted in a previous version of this proposal

charm_amulet_test #1573 swift-proxy-next for xtrusia mp247835
    AMULET FAIL: amulet-test failed

AMULET Results (max last 2 lines):
  ERROR subprocess encountered error code 1
  make: *** [test] Error 1

Full amulet test output: http://paste.ubuntu.com/9965030/
Build: http://10.245.162.77:8080/job/charm_amulet_test/1573/

Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote : Posted in a previous version of this proposal

charm_lint_check #1457 swift-proxy-next for xtrusia mp247835
    LINT OK: passed

Build: http://10.245.162.77:8080/job/charm_lint_check/1457/

Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote : Posted in a previous version of this proposal

charm_unit_test #1410 swift-proxy-next for xtrusia mp247835
    UNIT OK: passed

Build: http://10.245.162.77:8080/job/charm_unit_test/1410/

Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote : Posted in a previous version of this proposal

charm_amulet_test #1575 swift-proxy-next for xtrusia mp247835
    AMULET FAIL: amulet-test failed

AMULET Results (max last 2 lines):
  ERROR subprocess encountered error code 1
  make: *** [test] Error 1

Full amulet test output: http://paste.ubuntu.com/9968017/
Build: http://10.245.162.77:8080/job/charm_amulet_test/1575/

Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote : Posted in a previous version of this proposal

charm_lint_check #1458 swift-proxy-next for xtrusia mp247835
    LINT OK: passed

Build: http://10.245.162.77:8080/job/charm_lint_check/1458/

Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote : Posted in a previous version of this proposal

charm_unit_test #1411 swift-proxy-next for xtrusia mp247835
    UNIT OK: passed

Build: http://10.245.162.77:8080/job/charm_unit_test/1411/

Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote : Posted in a previous version of this proposal

charm_amulet_test #1576 swift-proxy-next for xtrusia mp247835
    AMULET OK: passed

Build: http://10.245.162.77:8080/job/charm_amulet_test/1576/

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

Seyeong thanks a lot for adding this in it is very much needed indeed. I would like to deploy it before giving a +1 and will endeavour to do so asap. Thanks.

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

Ok finally tested this out and it seems to work well. There a few things that should be cleaned up though (see inline).

review: Needs Fixing
Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote : Posted in a previous version of this proposal

charm_lint_check #1825 swift-proxy-next for xtrusia mp247835
    LINT FAIL: lint-test failed
    LINT FAIL: charm-proof failed

LINT Results (max last 2 lines):
  W: config.yaml: option keystone-admin-password does not have the keys: default
  make: *** [lint] Error 100

Full lint test output: http://paste.ubuntu.com/10135958/
Build: http://10.245.162.77:8080/job/charm_lint_check/1825/

Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote : Posted in a previous version of this proposal

charm_unit_test #1653 swift-proxy-next for xtrusia mp247835
    UNIT OK: passed

Build: http://10.245.162.77:8080/job/charm_unit_test/1653/

Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote : Posted in a previous version of this proposal

charm_amulet_test #1844 swift-proxy-next for xtrusia mp247835
    AMULET OK: passed

Build: http://10.245.162.77:8080/job/charm_amulet_test/1844/

Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote : Posted in a previous version of this proposal

charm_unit_test #1660 swift-proxy-next for xtrusia mp247835
    UNIT OK: passed

Build: http://10.245.162.77:8080/job/charm_unit_test/1660/

Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote : Posted in a previous version of this proposal

charm_lint_check #1832 swift-proxy-next for xtrusia mp247835
    LINT FAIL: lint-test failed
    LINT FAIL: charm-proof failed

LINT Results (max last 2 lines):
  W: config.yaml: option keystone-admin-password does not have the keys: default
  make: *** [lint] Error 100

Full lint test output: http://paste.ubuntu.com/10156942/
Build: http://10.245.162.77:8080/job/charm_lint_check/1832/

Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote : Posted in a previous version of this proposal

charm_amulet_test #1851 swift-proxy-next for xtrusia mp247835
    AMULET OK: passed

Build: http://10.245.162.77:8080/job/charm_amulet_test/1851/

Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote : Posted in a previous version of this proposal

charm_lint_check #1835 swift-proxy-next for xtrusia mp249176
    LINT FAIL: lint-test failed
    LINT FAIL: charm-proof failed

LINT Results (max last 2 lines):
  W: config.yaml: option keystone-admin-password does not have the keys: default
  make: *** [lint] Error 100

Full lint test output: http://paste.ubuntu.com/10157220/
Build: http://10.245.162.77:8080/job/charm_lint_check/1835/

Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote : Posted in a previous version of this proposal

charm_unit_test #1663 swift-proxy-next for xtrusia mp249176
    UNIT OK: passed

Build: http://10.245.162.77:8080/job/charm_unit_test/1663/

Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote : Posted in a previous version of this proposal

charm_amulet_test #1854 swift-proxy-next for xtrusia mp249176
    AMULET OK: passed

Build: http://10.245.162.77:8080/job/charm_amulet_test/1854/

Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote : Posted in a previous version of this proposal

charm_lint_check #2279 swift-proxy-next for xtrusia mp249176
    LINT OK: passed

Build: http://10.245.162.77:8080/job/charm_lint_check/2279/

Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote : Posted in a previous version of this proposal

charm_unit_test #2068 swift-proxy-next for xtrusia mp249176
    UNIT OK: passed

Build: http://10.245.162.77:8080/job/charm_unit_test/2068/

Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote : Posted in a previous version of this proposal

charm_amulet_test #2184 swift-proxy-next for xtrusia mp249176
    AMULET FAIL: amulet-test failed

AMULET Results (max last 2 lines):
  ERROR subprocess encountered error code 1
  make: *** [test] Error 1

Full amulet test output: http://paste.ubuntu.com/10404137/
Build: http://10.245.162.77:8080/job/charm_amulet_test/2184/

Revision history for this message
James Page (james-page) wrote : Posted in a previous version of this proposal

A few queries - see inline comments.

review: Needs Information
Revision history for this message
Seyeong Kim (seyeongkim) wrote : Posted in a previous version of this proposal

please see inline reply

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

This still needs my feedback on my last review incorporating - we should not expose all swift configuration options via charm config:

"I'm keen we expose a charm configuration option that makes sense to the charm user, not all swift logging options. So please can we use the following config options: debug: [true|false] (this is consistent with other charms) log-headers: [true|false] (specific to swift) These should be translated into underlying swift configuration appropriately."

review: Needs Fixing
Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote :

charm_lint_check #3100 swift-proxy-next for xtrusia mp255343
    LINT FAIL: lint-test failed
    LINT FAIL: charm-proof failed

LINT Results (max last 2 lines):
make: *** [lint] Error 200
ERROR:root:Make target returned non-zero.

Full lint test output: http://paste.ubuntu.com/10760802/
Build: http://10.245.162.77:8080/job/charm_lint_check/3100/

Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote :

charm_unit_test #2888 swift-proxy-next for xtrusia mp255343
    UNIT OK: passed

Build: http://10.245.162.77:8080/job/charm_unit_test/2888/

92. By Seyeong Kim

fix debug type

Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote :

charm_amulet_test #2922 swift-proxy-next for xtrusia mp255343
    AMULET FAIL: amulet-test failed

AMULET Results (max last 2 lines):
make: *** [test] Error 1
ERROR:root:Make target returned non-zero.

Full amulet test output: http://paste.ubuntu.com/10760863/
Build: http://10.245.162.77:8080/job/charm_amulet_test/2922/

Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote :

charm_lint_check #3101 swift-proxy-next for xtrusia mp255343
    LINT OK: passed

Build: http://10.245.162.77:8080/job/charm_lint_check/3101/

Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote :

charm_unit_test #2889 swift-proxy-next for xtrusia mp255343
    UNIT OK: passed

Build: http://10.245.162.77:8080/job/charm_unit_test/2889/

Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote :

charm_amulet_test #2923 swift-proxy-next for xtrusia mp255343
    AMULET FAIL: amulet-test failed

AMULET Results (max last 2 lines):
make: *** [test] Error 1
ERROR:root:Make target returned non-zero.

Full amulet test output: http://paste.ubuntu.com/10761155/
Build: http://10.245.162.77:8080/job/charm_amulet_test/2923/

Revision history for this message
Ryan Beisner (1chb1n) wrote :

Baseline amulet tests for swift-proxy/next are passing. Please see in-line comment regarding missing comma and duplicate key:pair definition. Thank you.

review: Needs Fixing
93. By Seyeong Kim

fix mistake on basic_deployment.py

Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote :

charm_lint_check #3102 swift-proxy-next for xtrusia mp255343
    LINT OK: passed

Build: http://10.245.162.77:8080/job/charm_lint_check/3102/

Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote :

charm_unit_test #2890 swift-proxy-next for xtrusia mp255343
    UNIT OK: passed

Build: http://10.245.162.77:8080/job/charm_unit_test/2890/

Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote :

charm_amulet_test #2924 swift-proxy-next for xtrusia mp255343
    AMULET FAIL: amulet-test failed

AMULET Results (max last 2 lines):
make: *** [test] Error 1
ERROR:root:Make target returned non-zero.

Full amulet test output: http://paste.ubuntu.com/10761450/
Build: http://10.245.162.77:8080/job/charm_amulet_test/2924/

94. By Seyeong Kim

amulet test

95. By Seyeong Kim

fix config.yaml

96. By Seyeong Kim

test

97. By Seyeong Kim

fix some amulet test

98. By Seyeong Kim

fix some amulet test

99. By Seyeong Kim

default things to template, more option on if branch

100. By Seyeong Kim

remove test timeout

Unmerged revisions

100. By Seyeong Kim

remove test timeout

99. By Seyeong Kim

default things to template, more option on if branch

98. By Seyeong Kim

fix some amulet test

97. By Seyeong Kim

fix some amulet test

96. By Seyeong Kim

test

95. By Seyeong Kim

fix config.yaml

94. By Seyeong Kim

amulet test

93. By Seyeong Kim

fix mistake on basic_deployment.py

92. By Seyeong Kim

fix debug type

91. By Seyeong Kim

fix conflicts

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'config.yaml'
2--- config.yaml 2015-03-05 02:03:29 +0000
3+++ config.yaml 2015-04-07 11:48:02 +0000
4@@ -116,6 +116,18 @@
5 Timeouts from these requests can be recovered from so setting this to
6 something lower than node-timeout would provide quicker error recovery
7 while allowing for a longer timeout for non-recoverable requests (PUTs).
8+ # Logging configuration
9+ debug:
10+ default: false
11+ type: boolean
12+ description: |
13+ Set log-name, log-facility, log-level, log-address
14+ log-headers:
15+ default: false
16+ type: boolean
17+ description: |
18+ Enables the ability to log request headers.
19+ The default is False.
20 # Manual Keystone configuration.
21 keystone-auth-host:
22 type: string
23
24=== modified file 'hooks/swift_context.py'
25--- hooks/swift_context.py 2015-03-31 08:39:46 +0000
26+++ hooks/swift_context.py 2015-04-07 11:48:02 +0000
27@@ -81,6 +81,11 @@
28 def __call__(self):
29 bind_port = config('bind-port')
30 workers = config('workers')
31+ log_name = 'swift'
32+ log_facility = 'LOG_LOCAL0'
33+ log_level = 'INFO'
34+ log_address = '/dev/log'
35+
36 if workers == 0:
37 import multiprocessing
38 workers = multiprocessing.cpu_count()
39@@ -100,8 +105,15 @@
40 'delay_auth_decision': config('delay-auth-decision'),
41 'node_timeout': config('node-timeout'),
42 'recoverable_node_timeout': config('recoverable-node-timeout'),
43+ 'log_headers': config('log-headers'),
44 }
45
46+ if config('debug'):
47+ ctxt['log_name'] = log_name
48+ ctxt['log_facility'] = log_facility
49+ ctxt['log_level'] = log_level
50+ ctxt['log_address'] = log_address
51+
52 # Instead of duplicating code lets use charm-helpers to set signing_dir
53 # TODO(hopem): refactor this context handler to use charm-helpers
54 # code.
55
56=== modified file 'templates/icehouse/proxy-server.conf'
57--- templates/icehouse/proxy-server.conf 2015-02-20 10:20:45 +0000
58+++ templates/icehouse/proxy-server.conf 2015-04-07 11:48:02 +0000
59@@ -3,6 +3,11 @@
60 workers = {{ workers }}
61 user = swift
62 bind_ip = {{ bind_host }}
63+log_name = {{ log_name }}
64+log_facility = {{ log_facility }}
65+log_level = {{ log_level }}
66+log_headers = {{ log_headers }}
67+log_address = {{ log_address }}
68 {% if ssl %}
69 cert_file = {{ ssl_cert }}
70 key_file = {{ ssl_key }}
71@@ -10,10 +15,10 @@
72
73 {% if auth_type == 'keystone' %}
74 [pipeline:main]
75-pipeline = gatekeeper healthcheck cache swift3 s3token container_sync bulk tempurl slo dlo formpost authtoken keystoneauth staticweb container-quotas account-quotas proxy-server
76+pipeline = gatekeeper healthcheck proxy-logging cache swift3 s3token container_sync bulk tempurl slo dlo formpost authtoken keystoneauth staticweb container-quotas account-quotas proxy-logging proxy-server
77 {% else %}
78 [pipeline:main]
79-pipeline = gatekeeper healthcheck cache container_sync bulk tempurl slo dlo formpost tempauth staticweb container-quotas account-quotas proxy-server
80+pipeline = gatekeeper healthcheck proxy-logging cache container_sync bulk tempurl slo dlo formpost tempauth staticweb container-quotas account-quotas proxy-logging proxy-server
81 {% endif %}
82
83 [app:proxy-server]
84@@ -40,6 +45,9 @@
85 [filter:container-quotas]
86 use = egg:swift#container_quotas
87
88+[filter:proxy-logging]
89+use = egg:swift#proxy_logging
90+
91 [filter:staticweb]
92 use = egg:swift#staticweb
93
94
95=== modified file 'tests/basic_deployment.py'
96--- tests/basic_deployment.py 2015-03-25 17:54:29 +0000
97+++ tests/basic_deployment.py 2015-04-07 11:48:02 +0000
98@@ -368,13 +368,20 @@
99 expected = {
100 'DEFAULT': {
101 'bind_port': '8070',
102- 'user': 'swift'
103+ 'workers': '0',
104+ 'user': 'swift',
105+ 'log_name': 'swift',
106+ 'log_facility': 'LOG_LOCAL0',
107+ 'log_level': 'INFO',
108+ 'log_headers': 'False',
109+ 'log_address': '/dev/log'
110 },
111 'pipeline:main': {
112- 'pipeline': 'gatekeeper healthcheck cache swift3 s3token '
113- 'container_sync bulk tempurl slo dlo formpost '
114- 'authtoken keystoneauth staticweb '
115- 'container-quotas account-quotas proxy-server'
116+ 'pipeline': 'gatekeeper healthcheck proxy-logging cache swift3 '
117+ 's3token container_sync bulk tempurl slo dlo '
118+ 'formpost authtoken keystoneauth staticweb '
119+ 'container-quotas account-quotas proxy-logging '
120+ 'proxy-server'
121 },
122 'app:proxy-server': {
123 'use': 'egg:swift#proxy',
124@@ -395,6 +402,7 @@
125 },
126 'filter:account-quotas': {'use': 'egg:swift#account_quotas'},
127 'filter:container-quotas': {'use': 'egg:swift#container_quotas'},
128+ 'filter:proxy-logging': {'use': 'egg:swift#proxy_logging'},
129 'filter:staticweb': {'use': 'egg:swift#staticweb'},
130 'filter:bulk': {'use': 'egg:swift#bulk'},
131 'filter:slo': {'use': 'egg:swift#slo'},

Subscribers

People subscribed via source and target branches