Based on comment above the linked code it is intentional to send the
user id and project id of the _owner_ of the instance. Still I
understand the need to know which user initiated the reboot action.
Therefore I opened a blueprint to do this as a new addition to the
versioned instance action notifications
https://blueprints.launchpad.net/nova/+spec/add-action-initiator-to-
instance-action-notifications

** Changed in: nova
       Status: New => Invalid

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1742674

Title:
  [Newton] Nova notifications do not show the user which initiates the
  event.

Status in OpenStack Compute (nova):
  Invalid

Bug description:
  Description
  ===========
  Nova event notification does not show the actual user who initiated the 
event, instead show the owner of the VM.

  Steps to reproduce
  ==================
  1. Create a tenant "test-tenant".
  2. Create two users; an admin "test-admin" and a SSO user "test-user"
  3. Create a VM from "test-user"
  4. Reboot the VM created in #3 from "test-admin"

  Event notification show "test-user" in the events. It should rather
  show "test-user".

  This is because while generating the event notification payload,
  information from instance is used instead of context information.

  Code wise, in this line
  
https://github.com/openstack/nova/blob/808d36475103e373f1deb3344b6829ce68d6cdd5/nova/notifications/base.py#L432

  Here we use:
  user_id=instance.user_id

  Should'nt we use, user that has come from context, something like
  user_id=context.user_id

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1742674/+subscriptions

-- 
Mailing list: https://launchpad.net/~yahoo-eng-team
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~yahoo-eng-team
More help   : https://help.launchpad.net/ListHelp

Reply via email to