Quantum cli gives an unhelpful error message if the attachment is is invalid

Bug #907123 reported by Brad Hall on 2011-12-21
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Undecided
Hitesh Wadekar

Bug Description

Currently we get a 500, which as mentioned in another bug is unhelpful:

Exception:<type 'exceptions.Exception'> - [{'status_code': 500, 'message': ''}]
Command failed with error code: 500
Error message:<missing>

We could change the exception on an invalid attachment to be a new exception (with a new http status code) that will allow us to use the arguments passed in to attach_resource in the client_lib.

Brad Hall (bgh) on 2011-12-21
Changed in quantum:
status: New → Confirmed
assignee: nobody → Brad Hall (bgh)
Maru Newby (maru) on 2012-03-10
tags: added: low-hanging-fruit
Hitesh Wadekar (hitesh-wadekar) wrote :

Brad/Dan,

I would love to fix this issue. Would you please give me some an overview about it?

Will it be helpful if we add new status code?

Thanks,
Hitesh

Changed in quantum:
assignee: Brad Hall (bgh) → Hitesh Wadekar (hitesh-wadekar)
Hitesh Wadekar (hitesh-wadekar) wrote :

Maru,

Could you please tell me what commands did you try for this?

Sorry I was busy with other stuff, thus I was not able to reach out for this bug early?

Thanks,
Hitesh

Maru Newby (maru) wrote :

Hitesh: Brad, the bug's reporter, would be the best person to talk to.

Brad Hall (bgh) wrote :

Hi Hitesh,

If you use the plug_attachment quantum cli command with an attachment that is invalid [defined by the plugin] then the error message is unhelpful (just a 500). It would be better to have a new exception: InvalidAttachmentException (or something like that) to indicate what the problem was.

Thanks Brad and Maru,

I will fix it as soon as possible and will send the file for review soon.

Thanks once again.

Regards,
Hitesh Wadekar

On Tue, Apr 24, 2012 at 1:46 AM, Brad Hall <email address hidden>wrote:

> Hi Hitesh,
>
> If you use the plug_attachment quantum cli command with an attachment
> that is invalid [defined by the plugin] then the error message is
> unhelpful (just a 500). It would be better to have a new exception:
> InvalidAttachmentException (or something like that) to indicate what the
> problem was.
>
> --
> You received this bug notification because you are a bug assignee.
> https://bugs.launchpad.net/bugs/907123
>
> Title:
> Quantum cli gives an unhelpful error message if the attachment is is
> invalid
>
> Status in OpenStack Quantum (virtual network service):
> Confirmed
>
> Bug description:
> Currently we get a 500, which as mentioned in another bug is
> unhelpful:
>
> Exception:<type 'exceptions.Exception'> - [{'status_code': 500,
> 'message': ''}]
> Command failed with error code: 500
> Error message:<missing>
>
> We could change the exception on an invalid attachment to be a new
> exception (with a new http status code) that will allow us to use the
> arguments passed in to attach_resource in the client_lib.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/quantum/+bug/907123/+subscriptions
>

hi ,

i was trying to fix this bug, i need some information
>is this bug still valid??
>could you give more info on what do you mean by plug_attachment invalid???
>what command did you try exactly??

Hitesh Wadekar (hitesh-wadekar) wrote :

Hi Vinay,

When we attach invalid plugin it should give an error message like "Invalid
attachment", even I am fixing this bug, still working on ...We will have to
add more partmeters to API. or API should return something which we can
recognize as a invlid attachment.

Invalid attachment would be anything that wouldn't fit the requirements.

1. Not present in the database.
2. any random string or number or combinations.

Brad or Maru, Could you please confirm this?

Thanks,
Hitesh

On Mon, May 14, 2012 at 9:51 PM, VINAY PATKAR <email address hidden>wrote:

> hi ,
>
> i was trying to fix this bug, i need some information
> >is this bug still valid??
> >could you give more info on what do you mean by plug_attachment invalid???
> >what command did you try exactly??
>
> --
> You received this bug notification because you are a bug assignee.
> https://bugs.launchpad.net/bugs/907123
>
> Title:
> Quantum cli gives an unhelpful error message if the attachment is is
> invalid
>
> Status in OpenStack Quantum (virtual network service):
> Confirmed
>
> Bug description:
> Currently we get a 500, which as mentioned in another bug is
> unhelpful:
>
> Exception:<type 'exceptions.Exception'> - [{'status_code': 500,
> 'message': ''}]
> Command failed with error code: 500
> Error message:<missing>
>
> We could change the exception on an invalid attachment to be a new
> exception (with a new http status code) that will allow us to use the
> arguments passed in to attach_resource in the client_lib.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/quantum/+bug/907123/+subscriptions
>

Hi Hitesh,

 According to Hall "If you use the plug_attachment quantum cli command with an attachment that is invalid [defined by the plugin]", I was looking into quantum code, i couldn't find any plug_attachment. I was trying to reproduce the bug.

1. Which branch of quantum you are using?
2. Are you able to reproduce the bug??

dan wendlandt (danwent) wrote :

Hi Vinay,

I'm not sure what plugin was used to create the bug, but you should easily recreate the circumstances by tweaking the SamplePlugin to raise an exception any time plug_attachment is called.

I will note that in the v2.0 version of the API, the use of an explicit "plug_attachment" call will go away, so this bug may soon become less important.

Hi Vinay,

Use this command from cli 'plug_iface'. Attach the invalide attachment.

Please look at the code, python-quantumclient->quantum->client->cli_lib.py

I am also fixing this.

Thanks,
Hitesh

On Tue, May 15, 2012 at 8:39 PM, dan wendlandt <email address hidden>wrote:

> Hi Vinay,
>
> I'm not sure what plugin was used to create the bug, but you should
> easily recreate the circumstances by tweaking the SamplePlugin to raise
> an exception any time plug_attachment is called.
>
> I will note that in the v2.0 version of the API, the use of an explicit
> "plug_attachment" call will go away, so this bug may soon become less
> important.
>
> --
> You received this bug notification because you are a bug assignee.
> https://bugs.launchpad.net/bugs/907123
>
> Title:
> Quantum cli gives an unhelpful error message if the attachment is is
> invalid
>
> Status in OpenStack Quantum (virtual network service):
> Confirmed
>
> Bug description:
> Currently we get a 500, which as mentioned in another bug is
> unhelpful:
>
> Exception:<type 'exceptions.Exception'> - [{'status_code': 500,
> 'message': ''}]
> Command failed with error code: 500
> Error message:<missing>
>
> We could change the exception on an invalid attachment to be a new
> exception (with a new http status code) that will allow us to use the
> arguments passed in to attach_resource in the client_lib.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/quantum/+bug/907123/+subscriptions
>

hey , i've been trying to recreate this bug but haven't been able to do so...frm what i see the exception codes are more or less plugin dependant, so is there a possibility of giving me info about the specific plugin that gave up this bug??

dan wendlandt (danwent) wrote :

Hi Chinmay,

we're actually working on a new version of the API (v2) which does not include a "plug_iface" operation, so perhaps we should just close this bug, as I want to make sure your time is well spent.

hey Dan,

That's great!! Thanks a lot for this update, will get to working on the other bugs then!

dan wendlandt (danwent) on 2012-06-07
Changed in quantum:
status: Confirmed → Invalid
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers