← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1580611] Re: murano-engine cannot authenticate to keystone

 

in postgresql case sensitive comparison =(

To get murano-engine to pass domain_name instead of domain_id I did not
succeed. devstack all in the works, as a comparison
query.filter_by(name=project_name) in mysql are case insensitive

workaround:

--- /usr/lib/python2.7/dist-packages/keystone/resource/backends/sql.py.old	2016-05-17 01:46:39.653472179 +0300
+++ /usr/lib/python2.7/dist-packages/keystone/resource/backends/sql.py	2016-05-17 01:36:22.186652560 +0300
@@ -18,6 +18,7 @@
 from keystone import exception
 from keystone.i18n import _LE, _LW
 from keystone import resource as keystone_resource
+from sqlalchemy import func

 LOG = log.getLogger(__name__)

@@ -51,7 +52,7 @@
     def get_project_by_name(self, project_name, domain_id):
         with sql.session_for_read() as session:
             query = session.query(Project)
-            query = query.filter_by(name=project_name)
+            query = query.filter(func.lower(Project.name)==func.lower(project_name))
             if domain_id is None:
                 query = query.filter_by(
                     domain_id=keystone_resource.NULL_DOMAIN_ID)


** Package changed: murano (Ubuntu) => murano

** Project changed: murano => keystone

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Identity (keystone).
https://bugs.launchpad.net/bugs/1580611

Title:
  murano-engine cannot authenticate to keystone

Status in OpenStack Identity (keystone):
  New

Bug description:
  mitaka release

  murano-api and murano-engine is running, muranoclient works too
  (murano environment-list or environment-create is works), but after
  the launch environment-deploy in murano-engine fails to attempt to
  login to keystone: error 401 "Exception Could not find domain:
  default" and KeyError: 'model' in /usr/lib/python2.7/dist-
  packages/murano/common/server.py

  Details (versions, log, tcpdump)
  http://paste.openstack.org/show/496729/

  The problem is that from murano-engine queries come to keystone
  incorrect domain_name and a blank password, i.e:

  {"auth": {"scope": {"project": {"domain": {"name": "default"}, "name":
  "admin"}}, "identity": {"password": {"user": {"password": null}},
  "methods": ["password"]}}}

  If you specify in murano.conf instead project_domain_id and
  user_domain_id:

  project_domain_name = "Default"
  user_domain_name = "Default"

  then nothing changes and the error remains.

To manage notifications about this bug go to:
https://bugs.launchpad.net/keystone/+bug/1580611/+subscriptions