Project

General

Profile

Bug #12523

Openstack doesn't work with fog 1.36

Added by Daniel Lobato Garcia almost 4 years ago. Updated about 1 year ago.

Status:
Closed
Priority:
High
Category:
Compute resources - OpenStack
Target version:
Difficulty:
Triaged:
Bugzilla link:
Team Backlog:
Fixed in Releases:
Found in Releases:

Description

Our code (test_connection and more) relies on calling list_tenants on the Openstack Fog object - https://github.com/fog/fog/blob/master/lib/fog/openstack/requests/compute/list_tenants.rb
This object needs an instance variable @identity_connection to make requests to Openstack Keystone. On fog versions prior to 1.36, this variable was automatically set during authentication.

However, this commit https://github.com/fog/fog/commit/4d5287020d961e794ac279c640c69a66238c33f7#diff-3aa267766daa7f21447cd3c77b43bf39R412 moves the instance variable setup to a `self.` (class) method.
Therefore the variable is simply never accessible so all parts on Fog 1.36 that call this instance variable from outside a Class (self. in ruby) context are broken.


Related issues

Related to Foreman - Refactor #12494: Update fog to 1.36.0Closed2015-11-16

Associated revisions

Revision 72eececc (diff)
Added by Daniel Lobato Garcia over 3 years ago

Fixes #12523 - Openstack does not work with Fog 1.36

Problem:
In a recent refactor of Openstack in Fog, defining @identity_connection
was moved to a class method. This causes it to be unavailable in
instances of Fog::Compute::Openstack::Real which we use to retrieve
servers and so forth. More info on:
https://github.com/fog/fog/commit/4d5287020d961e794ac279c640c69a66238c33f7#commitcomment-14475988

Solution:
Monkeypatch until a new version of Fog is released. This patch just
modifies the authenticate method slightly so that the
@identity_connection variable is set up at the end of it.

History

#1 Updated by Dominic Cleal almost 4 years ago

  • Legacy Backlogs Release (now unused) set to 71

#2 Updated by Dominic Cleal almost 4 years ago

#5 Updated by The Foreman Bot over 3 years ago

  • Status changed from New to Ready For Testing
  • Assignee set to Daniel Lobato Garcia
  • Pull request https://github.com/theforeman/foreman/pull/2942 added

#6 Updated by Daniel Lobato Garcia over 3 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

Also available in: Atom PDF