murano uses hardcoded project/user domain_name 'default'
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Murano |
Fix Released
|
High
|
Kirill Zaitsev | ||
Mitaka |
Fix Committed
|
High
|
Unassigned | ||
Newton |
Fix Released
|
High
|
Kirill Zaitsev |
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/
Details (versions, log, tcpdump) http://
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.
affects: | murano → murano (Ubuntu) |
affects: | keystone → murano |
Changed in murano: | |
status: | Incomplete → Confirmed |
tags: | added: mitaka-backport-potential |
Changed in murano: | |
milestone: | none → newton-1 |
Changed in murano: | |
assignee: | Nikolay Starodubtsev (starodubcevna) → Kirill Zaitsev (kzaitsev) |
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 python2. 7/dist- packages/ keystone/ resource/ backends/ sql.py 2016-05-17 01:36:22.186652560 +0300
+++ /usr/lib/
@@ -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 @@ by_name( self, project_name, domain_id): for_read( ) as session: query(Project) by(name= project_ name) func.lower( Project. name)== func.lower( project_ name))
query = query.filter_by(
domain_ id=keystone_ resource. NULL_DOMAIN_ ID)
def get_project_
with sql.session_
query = session.
- query = query.filter_
+ query = query.filter(
if domain_id is None: