nova-manage vpn spawn won't work

Bug #904767 reported by Boris Filippov on 2011-12-15
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Undecided
Unassigned

Bug Description

Using nova 2011.3

Suppose, we want to start vpn:

bash4.1$ sudo nova-manage vpn spawn
WARNING: This method only works with deprecated auth
Command failed, please check log for more info

bash4.1$ sudo vim /var/log/nova/nova-manage.log

Here we get exception:

2011-12-15 17:23:50,786 CRITICAL nova [-] 'VpnCommands' object has no attribute '_vpn_for'
(nova): TRACE: Traceback (most recent call last):
(nova): TRACE: File "/usr/bin/nova-manage", line 2141, in <module>
(nova): TRACE: main()
(nova): TRACE: File "/usr/bin/nova-manage", line 2129, in main
(nova): TRACE: fn(*fn_args, **fn_kwargs)
(nova): TRACE: File "/usr/bin/nova-manage", line 179, in spawn
(nova): TRACE: if not self._vpn_for(p.id):
(nova): TRACE: AttributeError: 'VpnCommands' object has no attribute '_vpn_for'

bash4.1$ sudo vim /usr/bin/nova-manage

After fix, we try it again:

bash4.1$ sudo nova-manage vpn spawn
WARNING: This method only works with deprecated auth
Command failed, please check log for more info

bash4.1$ sudo vim /var/log/nova/nova-manage.log

And now we get this:

2011-12-15 17:30:05,172 CRITICAL nova [-] 'Instance' object has no attribute 'image_id'
(nova): TRACE: Traceback (most recent call last):
(nova): TRACE: File "/usr/bin/nova-manage", line 2145, in <module>
(nova): TRACE: main()
(nova): TRACE: File "/usr/bin/nova-manage", line 2133, in main
(nova): TRACE: fn(*fn_args, **fn_kwargs)
(nova): TRACE: File "/usr/bin/nova-manage", line 183, in spawn
(nova): TRACE: if self._vpn_for(ctxt, p.id):
(nova): TRACE: File "/usr/bin/nova-manage", line 176, in _vpn_for
(nova): TRACE: return AdminController()._vpn_for(context, project_id)
(nova): TRACE: File "/usr/lib/python2.7/site-packages/nova/api/ec2/admin.py", line 275, in _vpn_for
(nova): TRACE: if (instance['image_id'] == str(FLAGS.vpn_image_id)
(nova): TRACE: File "/usr/lib/python2.7/site-packages/nova/db/sqlalchemy/models.py", line 76, in __getitem__
(nova): TRACE: return getattr(self, key)
(nova): TRACE: AttributeError: 'Instance' object has no attribute 'image_id'

because of wrong key in nova/api/ec2/admin.py

Boris Filippov (bfilippov) wrote :
description: updated
Boris Filippov (bfilippov) wrote :

Hi Boris!

It would be better if you propose your patch to merge to trunk using docs
from here: http://wiki.openstack.org/GerritWorkflow. This approach should
be faster to merge.

Regards,
Ilya

15 декабря 2011 г. 19:20 пользователь Boris Filippov <
<email address hidden>> написал:

> ** Patch added: "fix this problem in 2011.3"
>
> https://bugs.launchpad.net/nova/+bug/904767/+attachment/2634492/+files/0001-Fix-nova-vpn-spawn-diablo.patch
>
> --
> You received this bug notification because you are subscribed to
> OpenStack Compute (nova).
> https://bugs.launchpad.net/bugs/904767
>
> Title:
> nova-manage vpn spawn won't work
>
> Status in OpenStack Compute (Nova):
> New
>
> Bug description:
> Using nova 2011.3
>
> Suppose, we want to start vpn:
>
> bash4.1$ sudo nova-manage vpn spawn
> WARNING: This method only works with deprecated auth
> Command failed, please check log for more info
>
> bash4.1$ sudo vim /var/log/nova/nova-manage.log
>
> Here we get exception:
>
> 2011-12-15 17:23:50,786 CRITICAL nova [-] 'VpnCommands' object has no
> attribute '_vpn_for'
> (nova): TRACE: Traceback (most recent call last):
> (nova): TRACE: File "/usr/bin/nova-manage", line 2141, in <module>
> (nova): TRACE: main()
> (nova): TRACE: File "/usr/bin/nova-manage", line 2129, in main
> (nova): TRACE: fn(*fn_args, **fn_kwargs)
> (nova): TRACE: File "/usr/bin/nova-manage", line 179, in spawn
> (nova): TRACE: if not self._vpn_for(p.id):
> (nova): TRACE: AttributeError: 'VpnCommands' object has no attribute
> '_vpn_for'
>
> bash4.1$ sudo vim /usr/bin/nova-manage
>
> After fix, we try it again:
>
> bash4.1$ sudo nova-manage vpn spawn
> WARNING: This method only works with deprecated auth
> Command failed, please check log for more info
>
> bash4.1$ sudo vim /var/log/nova/nova-manage.log
>
> And now we get this:
>
> 2011-12-15 17:30:05,172 CRITICAL nova [-] 'Instance' object has no
> attribute 'image_id'
> (nova): TRACE: Traceback (most recent call last):
> (nova): TRACE: File "/usr/bin/nova-manage", line 2145, in <module>
> (nova): TRACE: main()
> (nova): TRACE: File "/usr/bin/nova-manage", line 2133, in main
> (nova): TRACE: fn(*fn_args, **fn_kwargs)
> (nova): TRACE: File "/usr/bin/nova-manage", line 183, in spawn
> (nova): TRACE: if self._vpn_for(ctxt, p.id):
> (nova): TRACE: File "/usr/bin/nova-manage", line 176, in _vpn_for
> (nova): TRACE: return AdminController()._vpn_for(context, project_id)
> (nova): TRACE: File
> "/usr/lib/python2.7/site-packages/nova/api/ec2/admin.py", line 275, in
> _vpn_for
> (nova): TRACE: if (instance['image_id'] == str(FLAGS.vpn_image_id)
> (nova): TRACE: File
> "/usr/lib/python2.7/site-packages/nova/db/sqlalchemy/models.py", line 76,
> in __getitem__
> (nova): TRACE: return getattr(self, key)
> (nova): TRACE: AttributeError: 'Instance' object has no attribute
> 'image_id'
>
> because of wrong key in nova/api/ec2/admin.py
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/nova/+bug/904767/+subscriptions
>

Changed in nova:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers