Creating share-network fails with SQL error

Bug #1594824 reported by Marc Koderer on 2016-06-21
22
This bug affects 4 people
Affects Status Importance Assigned to Milestone
OpenStack Shared File Systems Service (Manila)
Critical
Marc Koderer

Bug Description

This issue only occours when keystone is connected to LDAP and the user_id is larger than 36 chars.

2016-06-21 13:30:11.844 ERROR oslo_db.sqlalchemy.exc_filters [^[[01;36mreq-1017c221-6916-407f-b3d3-dcebac2bd98d ^[[00;36m8106e27607584232efea29ac92f7c7386d920d7dc818ab42fa11aabc01157923 6da2466be238480e878f9b24a3fdacca] ^[[01;35mDBAPIError exception wrapped from (psycopg2.DataError) value too long for type character varying(36)
 [SQL: 'INSERT INTO share_networks (created_at, updated_at, deleted_at, id, deleted, project_id, user_id, nova_net_id, neutron_net_id, neutron_subnet_id, network_type, segmentation_id, cidr, ip_version, name, description) VALUES (%(created_at)s, %(updated_at)s, %(deleted_at)s, %(id)s, %(deleted)s, %(project_id)s, %(user_id)s, %(nova_net_id)s, %(neutron_net_id)s, %(neutron_subnet_id)s, %(network_type)s, %(segmentation_id)s, %(cidr)s, %(ip_version)s, %(name)s, %(description)s)'] [parameters: {'project_id': u'6da2466bf238480e878f9b24a3fdacca', 'user_id': u'9106e27607584232efea29ac92f7c7386d920d7dc818ab42fa11aabc01157923', 'description': None, 'deleted': 'False', 'neutron_net_id': u'9eed90ae-f050-422c-bf9e-9f1b528a98a2', 'created_at': datetime.datetime(2016, 6, 21, 13, 30, 11, 843165), 'neutron_subnet_id': u'11726e89-eb26-4749-8339-ba886265a06e', 'updated_at': None, 'id': '37ac35b3-b97f-441e-9274-751aa3d5a75d', 'segmentation_id': None, 'ip_version': None, 'nova_net_id': None, 'cidr': None, 'deleted_at': None, 'network_type': None, 'name': u'gmp1'}]^[[00m
2016-06-21 13:30:11.844 TRACE oslo_db.sqlalchemy.exc_filters ^[[01;35m^[[00mTraceback (most recent call last):
2016-06-21 13:30:11.844 TRACE oslo_db.sqlalchemy.exc_filters ^[[01;35m^[[00m File "/var/lib/kolla/venv/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1139, in _execute_context
2016-06-21 13:30:11.844 TRACE oslo_db.sqlalchemy.exc_filters ^[[01;35m^[[00m context)
2016-06-21 13:30:11.844 TRACE oslo_db.sqlalchemy.exc_filters ^[[01;35m^[[00m File "/var/lib/kolla/venv/local/lib/python2.7/site-packages/sqlalchemy/engine/default.py", line 450, in do_execute
2016-06-21 13:30:11.844 TRACE oslo_db.sqlalchemy.exc_filters ^[[01;35m^[[00m cursor.execute(statement, parameters)
2016-06-21 13:30:11.844 TRACE oslo_db.sqlalchemy.exc_filters ^[[01;35m^[[00mDataError: value too long for type character varying(36)
2016-06-21 13:30:11.844 TRACE oslo_db.sqlalchemy.exc_filters ^[[01;35m^[[00m
2016-06-21 13:30:11.844 TRACE oslo_db.sqlalchemy.exc_filters ^[[01;35m^[[00m

Marc Koderer (m-koderer) on 2016-06-21
Changed in manila:
importance: Undecided → Critical
assignee: nobody → Marc Koderer (m-koderer)
Marc Koderer (m-koderer) on 2016-06-21
description: updated
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to manila (master)

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

Changed in manila:
status: New → In Progress
Changed in manila:
milestone: none → newton-2
tags: added: db mitaka-backport-potential
Changed in manila:
status: In Progress → Confirmed
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to manila (stable/mitaka)

Fix proposed to branch: stable/mitaka
Review: https://review.openstack.org/332763

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

Reviewed: https://review.openstack.org/332194
Committed: https://git.openstack.org/cgit/openstack/manila/commit/?id=33ebd2742c9434ca1e196200d2389dba71f2d2d3
Submitter: Jenkins
Branch: master

commit 33ebd2742c9434ca1e196200d2389dba71f2d2d3
Author: Marc Koderer <email address hidden>
Date: Tue Jun 21 16:56:06 2016 +0200

    Change user_id and project_id to 255 length

    In case keystone is used with LDAP the user_id/project_id can be more
    than 60 characters. This will cause the issue that users cannot create
    any share-network or security_service.

    Change-Id: I2e2ccce32bf31850c9ffd74d9612cf5237d782fe
    Closes-bug: #1594824

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

Reviewed: https://review.openstack.org/332763
Committed: https://git.openstack.org/cgit/openstack/manila/commit/?id=44a2d41797aaf575a3e4b8c9c0bbf4f94bee3aca
Submitter: Jenkins
Branch: stable/mitaka

commit 44a2d41797aaf575a3e4b8c9c0bbf4f94bee3aca
Author: Marc Koderer <email address hidden>
Date: Tue Jun 21 16:56:06 2016 +0200

    Change user_id and project_id to 255 length

    In case keystone is used with LDAP the user_id/project_id can be more
    than 60 characters. This will cause the issue that users cannot create
    any share-network or security_service.

    Change-Id: I2e2ccce32bf31850c9ffd74d9612cf5237d782fe
    Closes-bug: #1594824
    (cherry picked from commit 33ebd2742c9434ca1e196200d2389dba71f2d2d3)

tags: added: in-stable-mitaka
Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/manila 3.0.0.0b2

This issue was fixed in the openstack/manila 3.0.0.0b2 development milestone.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers