"nova-manage network create" doesn't check length of label

Bug #965008 reported by Mandar Vaze
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Low
Mandar Vaze

Bug Description

"nova-manage network create" doesn't check length of label

Scenario:
When "nova-manage network create" is invoked with label greater than 255 characters, a network is created successfully, but label is truncated at 255 characters.

Expected Response:

We should see error like "label too long" (or similar) and "network create" command should fail i.e. network should NOT be created.

Actual Response:

We see following :

2012-03-25 22:41:15 WARNING nova.utils [req-1ee25b2d-68f9-42ee-889e-c133ce2ad367 None None] /usr/lib/python2.7/dist-packages/sqlalchemy/engine/default.py:299: Warning: Data truncated for column 'label' at row 1
  cursor.execute(statement, parameters)

Label is truncated at 255

Branch: master

Tags: ntt
Mandar Vaze (mandarvaze)
Changed in nova:
assignee: nobody → Mandar Vaze (mandarvaze)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

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

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

Reviewed: https://review.openstack.org/6076
Committed: http://github.com/openstack/nova/commit/2cea9b04139a0b64f1bda5b777c062e207d739f9
Submitter: Jenkins
Branch: master

commit 2cea9b04139a0b64f1bda5b777c062e207d739f9
Author: Mandar Vaze <email address hidden>
Date: Mon Apr 2 03:02:22 2012 -0700

    Disallow network creation when label > 255. Fixes bug 965008

    Added length check for label. Without length check,
    label is truncated. Warning is shown by sqlalchemy layer.

    Raise an InvalidInput exception when validation fails (like
    rest of the surroudning code)

    Change-Id: Iae517e03099e36f1c00f4742049834a9231a2fff

Changed in nova:
status: In Progress → Fix Committed
Devin Carlen (devcamcar)
Changed in nova:
milestone: none → folsom-1
importance: Undecided → Low
Thierry Carrez (ttx)
Changed in nova:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: folsom-1 → 2012.2
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.