HAProxy 130-radosgw.cfg is missing 'forwardfor' definition

Bug #1523906 reported by Adam Heczko
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Fix Released
Low
Michael Polenchuk

Bug Description

Observed on:
MOS/Fuel
 release: "8.0"
  openstack_version: "2015.1.0-8.0"
  api: "1.0"
  build_number: "242"

Problem description:
HAProxy config related to RadosGW doesn't forward X-Forward-For http header.
As a result it impossible to gather appropriate RadpsGW access log entries.

Solution proposal:
Enable X-Forward for on HAProxy and Apache2 daemons.
/etc/haproxy/conf.d/130-radosgw.cfg , add 'option forwardfor'
/etc/apache2/sites-available/rgw.conf, add option '%{X-Forwarded-For}i' to custom_log

Changed in fuel:
importance: Undecided → Low
assignee: nobody → Fuel Library Team (fuel-library)
milestone: none → 8.0
tags: added: area-library
Changed in fuel:
status: New → Confirmed
Changed in fuel:
assignee: Fuel Library Team (fuel-library) → Michael Polenchuk (mpolenchuk)
tags: added: team-bugfix
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to fuel-library (master)

Fix proposed to branch: master
Review: https://review.openstack.org/257377

Changed in fuel:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to fuel-library (master)

Reviewed: https://review.openstack.org/257377
Committed: https://git.openstack.org/cgit/openstack/fuel-library/commit/?id=fd2bf0ac464690bdf7029975fb8cc997b8255374
Submitter: Jenkins
Branch: master

commit fd2bf0ac464690bdf7029975fb8cc997b8255374
Author: Michael Polenchuk <email address hidden>
Date: Mon Dec 14 17:15:53 2015 +0300

    Enable X-Forwarded-For for RadosGW service

    Enable insertion of the X-Forwarded-For header to requests
    sent to RadosGW servers. Added "httpclose" on server side to ensure
    that every request will be rewritten and not only the first one of
    each session.

    Co-authored-by: Matthew Mosesohn <email address hidden>
    Change-Id: Ieed9d2cc7b06ba2b864b2751b76dce010178be65
    Closes-Bug: #1523906
    Closes-Bug: #1523895

Changed in fuel:
status: In Progress → Fix Committed
Revision history for this message
Dmitry Tyzhnenko (dtyzhnenko) wrote :

Haproxy conf for radosgw contains 'option forwardfor'

# grep forwardfor /etc/haproxy/conf.d/130-radosgw.cfg
  option forwardfor

forwarded tamplate contains '%{X-Forwarded-For}i' and used in /etc/apache2/sites-available/rgw.conf

# grep forwarded /etc/apache2/apache2.conf
LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %s %b \"%{Referer}i\" \"%{User-agent}i\"" forwarded
# grep forwarded /etc/apache2/sites-available/*
/etc/apache2/sites-available/rgw.conf: CustomLog "/var/log/apache2/radosgw_access.log" forwarded

Verified on 8.0-506
VERSION:
  feature_groups:
    - mirantis
  production: "docker"
  release: "8.0"
  api: "1.0"
  build_number: "506"
  build_id: "506"
  fuel-nailgun_sha: "8e954abd70ef0083109f34289de2553dcda544d4"
  python-fuelclient_sha: "4f234669cfe88a9406f4e438b1e1f74f1ef484a5"
  fuel-agent_sha: "658be72c4b42d3e1436b86ac4567ab914bfb451b"
  fuel-nailgun-agent_sha: "b2bb466fd5bd92da614cdbd819d6999c510ebfb1"
  astute_sha: "b81577a5b7857c4be8748492bae1dec2fa89b446"
  fuel-library_sha: "ec7e212972ead554f21b52b9e165156665f659df"
  fuel-ostf_sha: "ab5fd151fc6c1aa0b35bc2023631b1f4836ecd61"
  fuel-mirror_sha: "351d568fa3b3e4dd062054b91d766aa54d379867"
  fuelmenu_sha: "234cb4cbb30fbd2df00f388c28f31606d9cae15f"
  shotgun_sha: "63645dea384a37dde5c01d4f8905566978e5d906"
  network-checker_sha: "a43cf96cd9532f10794dce736350bf5bed350e9d"
  fuel-upgrade_sha: "616a7490ec7199f69759e97e42f9b97dfc87e85b"
  fuelmain_sha: "94507c5e4dad6d8cfbd8f5d41aa8389d5335990a"

Changed in fuel:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.