← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1187629] Re: "injected_files" doesn't work for nova rebuild

 

Reviewed:  https://review.openstack.org/35473
Committed: http://github.com/openstack/tempest/commit/21599a9d463a6b6263f90824c25542f2c175d6c6
Submitter: Jenkins
Branch:    master

commit 21599a9d463a6b6263f90824c25542f2c175d6c6
Author: Mahesh Panchaksharaiah <maheshp@xxxxxxxxxxxxxxxx>
Date:   Wed Jul 3 15:28:58 2013 +0530

    Using relative path for personality file in rebuild server test.
    
    Personality files with absolute paths e.g /etc/rebuild.txt breaks on the test
    cirros image. This is because cirros has an empty root filesystem.
    
    fixes lp 1187629
    
    Change-Id: I5b2b37224b722686c3163214fbd53227ac9ce49f


** Changed in: tempest
       Status: In Progress => Fix Released

-- 
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/1187629

Title:
  "injected_files" doesn't work for nova rebuild

Status in OpenStack Compute (Nova):
  In Progress
Status in Tempest:
  Fix Released

Bug description:
  nova-compute manager doesn't send the argument "injected_files" to
  "driver.spawn":

  "nova/compute/manager.py"
      def rebuild_instance(self, context, instance, orig_image_ref, image_ref,
                           injected_files, new_pass, orig_sys_metadata=None):

              instance.injected_files = injected_files                                                           
              network_info = self.network_api.get_instance_nw_info(context,                                      
                                                                   instance)
              device_info = self._setup_block_device_mapping(context, instance)                                  

              instance = self._instance_update(context,                                                          
                                               instance['uuid'],
                                               task_state=task_states.                                           
                                                   REBUILD_SPAWNING,
                                               expected_task_state=task_states.
                                                   REBUILD_BLOCK_DEVICE_MAPPING)
              # pull in new password here since the original password isn't in
              # the db
              admin_password = new_pass

              self.driver.spawn(context, instance, image_meta,
                                [], admin_password,     <--- Here.
                                self._legacy_nw_info(network_info),
                                device_info)

  
  The definition for "driver.spawn" is as following:
  "nova/virt/libvirt/driver.py"
  def spawn(self, context, instance, image_meta, injected_files,
  		  admin_password, network_info=None, block_device_info=None):

  
  The possible fix is as following:
              # instance.injected_files = injected_files 
              ...
              self.driver.spawn(context, instance, image_meta,
                                # [], admin_password,                                  
                                injected_files, admin_password,
                                self._legacy_nw_info(network_info),                    
                                device_info)

  This should be a bug, and exists in the Folsom and master branch.

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