Wrong property to look up remote address

Bug #1967683 reported by Takashi Kajinami
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Low
Takashi Kajinami
OpenStack Compute (nova)
Fix Released
Undecided
Takashi Kajinami
OpenStack Shared File Systems Service (Manila)
Fix Released
Undecided
Takashi Kajinami
ec2-api
Fix Released
Low
Takashi Kajinami

Bug Description

Currently, remote_address attribute of the Reqeust object is used to look up client address in multiple places.

eg.
https://github.com/openstack/cinder/blob/7086157de07b77e8b67bbb767bc2ce25e86c2f51/cinder/api/middleware/auth.py#L64

~~~
def _set_request_context(req, **kwargs):
    """Sets request context based on parameters and request."""
    remote_address = getattr(req, 'remote_address', '127.0.0.1')
~~~

However, webob.Request has no remote_address attribute but only remote_addr attribute.
 https://docs.pylonsproject.org/projects/webob/en/stable/api/request.html#webob.request.BaseRequest.remote_addr

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (master)

Fix proposed to branch: master
Review: https://review.opendev.org/c/openstack/cinder/+/836247

Changed in cinder:
status: New → In Progress
Changed in nova:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.opendev.org/c/openstack/nova/+/836248

Changed in manila:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to manila (master)

Fix proposed to branch: master
Review: https://review.opendev.org/c/openstack/manila/+/836249

Changed in ec2-api:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to ec2-api (master)

Fix proposed to branch: master
Review: https://review.opendev.org/c/openstack/ec2-api/+/836250

no longer affects: masakari
Changed in cinder:
assignee: nobody → Takashi Kajinami (kajinamit)
Changed in nova:
assignee: nobody → Takashi Kajinami (kajinamit)
Changed in manila:
assignee: nobody → Takashi Kajinami (kajinamit)
Changed in ec2-api:
assignee: nobody → Takashi Kajinami (kajinamit)
Changed in ec2-api:
importance: Undecided → Low
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ec2-api (master)

Reviewed: https://review.opendev.org/c/openstack/ec2-api/+/836250
Committed: https://opendev.org/openstack/ec2-api/commit/ed85f5924cc0687a42032dcf363081a8c224032b
Submitter: "Zuul (22348)"
Branch: master

commit ed85f5924cc0687a42032dcf363081a8c224032b
Author: Takashi Kajinami <email address hidden>
Date: Mon Apr 4 00:18:55 2022 +0900

    Remove ineffective codes from the FaultWrapper middleware

    These three variables are initialized but unused.

    Closes-Bug: #1967683
    Change-Id: I5bab310fef66faa3291e7651106010761f636bc5

Changed in ec2-api:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.opendev.org/c/openstack/nova/+/836248
Committed: https://opendev.org/openstack/nova/commit/5e6b9a86984b854d0a717cff1c2ac49412ec6f47
Submitter: "Zuul (22348)"
Branch: master

commit 5e6b9a86984b854d0a717cff1c2ac49412ec6f47
Author: Takashi Kajinami <email address hidden>
Date: Mon Apr 4 00:14:58 2022 +0900

    Fix wrong attribute to find remote address

    The webob.Request class does not have the remote_address attribute but
    the remote_addr attribute. This change fixes usage of the non-existing
    attribute accordingly.

    Closes-Bug: #1967683
    Change-Id: I874e97ac6ad84daa20997345082cb4d1135699c4

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

Reviewed: https://review.opendev.org/c/openstack/manila/+/836249
Committed: https://opendev.org/openstack/manila/commit/c48be4141e12f6251efb95e7bd3af7e32add5575
Submitter: "Zuul (22348)"
Branch: master

commit c48be4141e12f6251efb95e7bd3af7e32add5575
Author: Takashi Kajinami <email address hidden>
Date: Mon Apr 4 00:17:14 2022 +0900

    Fix wrong attribute to find remote address

    The webob.Request class does not have the remote_address attribute but
    the remote_addr attribute. This change fixes usage of the non-existing
    attribute accordingly.

    Closes-Bug: #1967683
    Change-Id: Id5880142bd9472b4b3caff21a0d1f7b2900f0e48

Changed in manila:
status: In Progress → Fix Released
Changed in cinder:
importance: Undecided → Low
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (master)

Reviewed: https://review.opendev.org/c/openstack/cinder/+/836247
Committed: https://opendev.org/openstack/cinder/commit/90abed0a44bbf2c0c14169b670954a8f66831598
Submitter: "Zuul (22348)"
Branch: master

commit 90abed0a44bbf2c0c14169b670954a8f66831598
Author: Takashi Kajinami <email address hidden>
Date: Mon Apr 4 00:11:49 2022 +0900

    Fix wrong attribute to find remote address

    The webob.Request class does not have the remote_address attribute but
    the remote_addr attribute. This change fixes usage of the non-existing
    attribute accordingly.

    Closes-Bug: #1967683
    Change-Id: I233d706d49c795e67f4cdb32ff7ef3e9cdd36b00

Changed in cinder:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/nova 26.0.0.0rc1

This issue was fixed in the openstack/nova 26.0.0.0rc1 release candidate.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/ec2-api 15.0.0.0rc1

This issue was fixed in the openstack/ec2-api 15.0.0.0rc1 release candidate.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/manila 15.0.0.0rc1

This issue was fixed in the openstack/manila 15.0.0.0rc1 release candidate.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/cinder 21.0.0.0rc1

This issue was fixed in the openstack/cinder 21.0.0.0rc1 release candidate.

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.