Description of problem: To change the port setting on Civetweb, the end user must add the following to a ceph configuration file, rgw_frontends = "civetweb port=80" If the string is not enclosed in quotes, it doesn't work. If there is white space between port = 80, it doesn't work. Sometimes end users, for their own aesthetic reasons like a little bit of white space, or omitting quotes when there is only one setting. It would be nice if the parser was a bit more forgiving. Version-Release number of selected component (if applicable): How reproducible: Every time. Steps to Reproduce: 1. Add [client.rgw.<node-name>]\rgw_frontends = 2. rgw_frontends = civetweb port 80 3. rgw_frontends = civetweb port = 80 4. rgw_frontends = civetweb port=80 Etc. It only works if you add it as rgw_frontends = "civetweb port=80" It does not work if you add it as rgw_frontends = "civetweb port = 80" It's very finnicky. Actual results: Expected results: Additional info:
added upstream ticket
Upstream PR is still undergoing review to master, so I'm re-targeting this to 1.3.2
I'm having second thoughts about the necessity of this one. It can lead to ambiguous parsing, maybe the solution here is to have rgw be more verbose when it sees such a config?
How about a solution where when there's a space before an equal sign in the rgw frontends configurable we dump an explicit warning?
I think warnings are okay if we can warn uniformly for all such problems (and maybe suggest quotes where appropriate?).
Matt will create a PR for this issue next week.
https://github.com/ceph/ceph/pull/6944 was merged upstream; the exact commit to cherry-pick is 93497e576a946ed7e59f4a4299e447b65aa1774b , "rgw: warn on suspicious civetweb frontend parameters"
Testing this BZ on ceph-radosgw-0.94.5-3.el7cp.x86_64 From the comments I understand that we are warning about the space before and after the '=' in civetweb frontend param. This is my observation: 1. Without '=' b/w port and 80. rgw_frontends = "civetweb port 80" or rgw_frontends = civetweb port 80 ============== 2016-01-22 12:36:36.733979 7eff3a1cc900 0 starting handler: civetweb 2016-01-22 12:36:36.734004 7eff3a1cc900 0 civetweb: 0xaa05a0: Invalid option: 80 ============== Maybe we can warn about the missing '=' in rgw_frontends param? Ensures consistency. 2. With space. rgw_frontends = "civetweb port = 80" ============== 2016-01-22 12:36:36.733942 7eff3a1cc900 -1 WARNING: civetweb frontend config found unexpected spacing around 'port' (ensure civetweb port parameter has the form 'port=80' with no spaces before or after '=') 2016-01-22 12:36:36.733979 7eff3a1cc900 0 starting handler: civetweb 2016-01-22 12:36:36.734004 7eff3a1cc900 0 civetweb: 0xaa05a0: Invalid option: ============== This seems fine to me. 3. With and without quotes. Expected to start civetweb on port 80 works fine. rgw_frontends = civetweb port=80 rgw_frontends = "civetweb port=80"
I don't think that introducing more ad hoc checks for the 'port 80' use case is worth our time.
(In reply to Yehuda Sadeh from comment #12) > I don't think that introducing more ad hoc checks for the 'port 80' use > case is worth our time. Agreed. Fix works as expected. Verified.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2016:0313