error when generating novarc in get_environment_rc()

Bug #702164 reported by Kost
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
High
Vish Ishaya

Bug Description

$ nova/bin/nova-manage project environment admin admin novarc
Traceback (most recent call last):
  File "nova/bin/nova-manage", line 596, in <module>
    main()
  File "nova/bin/nova-manage", line 588, in main
    fn(*argv)
  File "nova/bin/nova-manage", line 349, in environment
    rc = self.manager.get_environment_rc(user_id, project_id)
  File "/home/kost/openstack/test/105/nova/nova/auth/manager.py", line 724, in get_environment_rc
    return self.__generate_rc(user.access, pid, use_dmz)
  File "/home/kost/openstack/test/105/nova/nova/auth/manager.py", line 741, in __generate_rc
    rc = rc % {'access': user.access,
AttributeError: 'unicode' object has no attribute 'access'

717 def get_environment_rc(self, user, project=None, use_dmz=True):
718 """Get credential zip for user in project"""
719 if not isinstance(user, User):
720 user = self.get_user(user)
721 if project is None:
722 project = user.id
723 pid = Project.safe_id(project)
724 return self.__generate_rc(user.access, user.secret, pid, use_dmz)

This can be fixed by changing line #724 to:
              return self.__generate_rc(user, pid, use_dmz)

Related branches

Revision history for this message
Vish Ishaya (vishvananda) wrote :

nice catch, putting a branch in for merge.

Changed in nova:
assignee: nobody → Vish Ishaya (vishvananda)
importance: Undecided → High
status: New → In Progress
Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → 2011.1
status: Fix Committed → Fix Released
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.