)]}'
{"nova/compute/manager.py":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"96404f38f46b0c8e171472acc42800c0cfc10081","unresolved":false,"context_lines":[{"line_number":1620,"context_line":"                                  instance[\u0027uuid\u0027],"},{"line_number":1621,"context_line":"                                  host\u003dself.host,"},{"line_number":1622,"context_line":"                                  power_state\u003dcurrent_power_state,"},{"line_number":1623,"context_line":"                                  vm_state\u003dvm_states.ACTIVE)"},{"line_number":1624,"context_line":""},{"line_number":1625,"context_line":"            self._notify_about_instance_usage(context, instance, \"resize.end\","},{"line_number":1626,"context_line":"                                              network_info\u003dnetwork_info)"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAALH%2F%2FO54%3D","line":1623,"updated":"2012-10-01 23:22:43.000000000","message":"so the compute_rpcapi method just above here is a cast, and the manager is going to put the vm in the \"RESIZED\" state.  I removed new code here entirely and unittests started passing, and functional testing seemed to validate the manager is doing the needful.  I don\u0027t think we need to do anything here.","commit_id":"4a61bc6c0de53d5cb04044a53f381235839f0442"},{"author":{"_account_id":67,"name":"Vish Ishaya","email":"vishvananda@gmail.com","username":"vishvananda"},"change_message_id":"3b1ec9936dd340792d299894b1d78ac2bc5548de","unresolved":false,"context_lines":[{"line_number":1591,"context_line":"            disk_info \u003d self.driver.migrate_disk_and_power_off("},{"line_number":1592,"context_line":"                    context, instance, migration_ref[\u0027dest_host\u0027],"},{"line_number":1593,"context_line":"                    instance_type_ref, self._legacy_nw_info(network_info),"},{"line_number":1594,"context_line":"                    block_device_info)"},{"line_number":1595,"context_line":""},{"line_number":1596,"context_line":"            # Detaching volumes."},{"line_number":1597,"context_line":"            for bdm in self._get_instance_volume_bdms(context,"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAALH%2F%2FOco%3D","line":1594,"updated":"2012-10-02 20:13:21.000000000","message":"block device info is passed here so the driver can remove volumes","commit_id":"567b95edb4905e2c98747d6698123a008b06d372"},{"author":{"_account_id":67,"name":"Vish Ishaya","email":"vishvananda@gmail.com","username":"vishvananda"},"change_message_id":"3b1ec9936dd340792d299894b1d78ac2bc5548de","unresolved":false,"context_lines":[{"line_number":1595,"context_line":""},{"line_number":1596,"context_line":"            # Detaching volumes."},{"line_number":1597,"context_line":"            for bdm in self._get_instance_volume_bdms(context,"},{"line_number":1598,"context_line":"                                                      instance[\u0027uuid\u0027]):"},{"line_number":1599,"context_line":"                # NOTE: We don\u0027t want to actually mark the volume"},{"line_number":1600,"context_line":"                #       detached, or delete the bdm, just remove the"},{"line_number":1601,"context_line":"                #       connection from this host."}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAALH%2F%2FOc0%3D","line":1598,"updated":"2012-10-02 20:13:21.000000000","message":"this should actually just be calling volume_api.terminate_connection","commit_id":"567b95edb4905e2c98747d6698123a008b06d372"},{"author":{"_account_id":67,"name":"Vish Ishaya","email":"vishvananda@gmail.com","username":"vishvananda"},"change_message_id":"3b1ec9936dd340792d299894b1d78ac2bc5548de","unresolved":false,"context_lines":[{"line_number":1650,"context_line":"            network_info\u003dnetwork_info)"},{"line_number":1651,"context_line":""},{"line_number":1652,"context_line":"        block_device_info \u003d self._get_instance_volume_block_device_info("},{"line_number":1653,"context_line":"                            context, instance[\u0027uuid\u0027])"},{"line_number":1654,"context_line":""},{"line_number":1655,"context_line":"        self.driver.finish_migration(context, migration_ref, instance,"},{"line_number":1656,"context_line":"                                     disk_info,"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAALH%2F%2FOcw%3D","line":1653,"updated":"2012-10-02 20:13:21.000000000","message":"need a for bdm in ...: volume_api initialize.connection here","commit_id":"567b95edb4905e2c98747d6698123a008b06d372"},{"author":{"_account_id":67,"name":"Vish Ishaya","email":"vishvananda@gmail.com","username":"vishvananda"},"change_message_id":"3b1ec9936dd340792d299894b1d78ac2bc5548de","unresolved":false,"context_lines":[{"line_number":1661,"context_line":"        for bdm in self._get_instance_volume_bdms(context,"},{"line_number":1662,"context_line":"                                                  instance[\u0027uuid\u0027]):"},{"line_number":1663,"context_line":"            self.create_volume_connection(context, bdm[\u0027volume_id\u0027],"},{"line_number":1664,"context_line":"                                          instance)"},{"line_number":1665,"context_line":""},{"line_number":1666,"context_line":"        instance \u003d self._instance_update(context,"},{"line_number":1667,"context_line":"                                         instance[\u0027uuid\u0027],"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAALH%2F%2FOcs%3D","line":1664,"updated":"2012-10-02 20:13:21.000000000","message":"This should be done in the driver","commit_id":"567b95edb4905e2c98747d6698123a008b06d372"},{"author":{"_account_id":67,"name":"Vish Ishaya","email":"vishvananda@gmail.com","username":"vishvananda"},"change_message_id":"3b1ec9936dd340792d299894b1d78ac2bc5548de","unresolved":false,"context_lines":[{"line_number":2039,"context_line":"        try:"},{"line_number":2040,"context_line":"            name_label \u003d instance[\u0027name\u0027]"},{"line_number":2041,"context_line":"            if isresize:"},{"line_number":2042,"context_line":"                name_label \u003d name_label + \u0027-orig\u0027"},{"line_number":2043,"context_line":"            self.driver.detach_volume(connection_info,"},{"line_number":2044,"context_line":"                                      name_label,"},{"line_number":2045,"context_line":"                                      mp)"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAALH%2F%2FOck%3D","line":2042,"updated":"2012-10-02 20:13:21.000000000","message":"unneeded because this will be done in the driver","commit_id":"567b95edb4905e2c98747d6698123a008b06d372"},{"author":{"_account_id":67,"name":"Vish Ishaya","email":"vishvananda@gmail.com","username":"vishvananda"},"change_message_id":"3b1ec9936dd340792d299894b1d78ac2bc5548de","unresolved":false,"context_lines":[{"line_number":2068,"context_line":""},{"line_number":2069,"context_line":"    @exception.wrap_exception(notifier\u003dnotifier, publisher_id\u003dpublisher_id())"},{"line_number":2070,"context_line":"    def remove_volume_connection(self, context, volume_id, instance,"},{"line_number":2071,"context_line":"                                 isresize\u003dNone):"},{"line_number":2072,"context_line":"        \"\"\"Remove a volume connection using the volume api\"\"\""},{"line_number":2073,"context_line":"        # NOTE(vish): We don\u0027t want to actually mark the volume"},{"line_number":2074,"context_line":"        #             detached, or delete the bdm, just remove the"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAALH%2F%2FOcg%3D","line":2071,"updated":"2012-10-02 20:13:21.000000000","message":"ditto","commit_id":"567b95edb4905e2c98747d6698123a008b06d372"},{"author":{"_account_id":67,"name":"Vish Ishaya","email":"vishvananda@gmail.com","username":"vishvananda"},"change_message_id":"3b1ec9936dd340792d299894b1d78ac2bc5548de","unresolved":false,"context_lines":[{"line_number":2085,"context_line":"            pass"},{"line_number":2086,"context_line":""},{"line_number":2087,"context_line":"    @exception.wrap_exception(notifier\u003dnotifier, publisher_id\u003dpublisher_id())"},{"line_number":2088,"context_line":"    def create_volume_connection(self, context, volume_id, instance):"},{"line_number":2089,"context_line":"        volume \u003d self.volume_api.get(context, volume_id)"},{"line_number":2090,"context_line":"        mountpoint \u003d volume[\u0027mountpoint\u0027]"},{"line_number":2091,"context_line":"        context \u003d context.elevated()"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAALH%2F%2FOcc%3D","line":2088,"updated":"2012-10-02 20:13:21.000000000","message":"ditto","commit_id":"567b95edb4905e2c98747d6698123a008b06d372"}],"nova/virt/xenapi/vm_utils.py":[{"author":{"_account_id":1030,"name":"Chris Behrens","email":"cbehrens@codestud.com","username":"cbehrens"},"change_message_id":"b7be2ae63a204b8147abec4d74570da009075316","unresolved":false,"context_lines":[{"line_number":546,"context_line":"                                                    snapshot_ref))"},{"line_number":547,"context_line":""},{"line_number":548,"context_line":"    except session.XenAPI.Failure as exc:"},{"line_number":549,"context_line":"        LOG(exc)"},{"line_number":550,"context_line":"        raise"},{"line_number":551,"context_line":"    finally:"},{"line_number":552,"context_line":"        return new_vdis"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAALH%2F%2FN6Q%3D","line":549,"updated":"2012-10-03 21:56:42.000000000","message":"LOG.exception() or something meant here, I assume.","commit_id":"567b95edb4905e2c98747d6698123a008b06d372"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"d4cc4b93ce744cb78e541ac83f3993b90419b3fd","unresolved":false,"context_lines":[{"line_number":546,"context_line":"    \"\"\""},{"line_number":547,"context_line":"    new_vdis \u003d []"},{"line_number":548,"context_line":"    try:"},{"line_number":549,"context_line":"        vbd_refs \u003d session.call_xenapi(\"VM.get_VBDs\", vm_ref)"},{"line_number":550,"context_line":"        for vbd_ref in vbd_refs:"},{"line_number":551,"context_line":"            oc \u003d session.call_xenapi(\"VBD.get_other_config\", vbd_ref)"},{"line_number":552,"context_line":"            if \u0027osvol\u0027 not in oc:"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAALH%2F%2FNxU%3D","line":549,"updated":"2012-10-04 09:00:02.000000000","message":"I thought we were only meant to snapshot the root disk, not all the extra disks (like the ephemeral disk)? I am certainly ready to be corrected about that. I think user_device\u003d0 should do the trick for finding the root disk, given how we create the disks?\n\nThe check for the osvol other config is certainly still required given if we do just get the root disk.","commit_id":"359527501604ea720b594a2ed1b32cd29fe6adbc"},{"author":{"_account_id":1030,"name":"Chris Behrens","email":"cbehrens@codestud.com","username":"cbehrens"},"change_message_id":"2ee12f04af05b428529a64304297c1e0583ab10b","unresolved":false,"context_lines":[{"line_number":546,"context_line":"    \"\"\""},{"line_number":547,"context_line":"    new_vdis \u003d []"},{"line_number":548,"context_line":"    try:"},{"line_number":549,"context_line":"        vbd_refs \u003d session.call_xenapi(\"VM.get_VBDs\", vm_ref)"},{"line_number":550,"context_line":"        for vbd_ref in vbd_refs:"},{"line_number":551,"context_line":"            oc \u003d session.call_xenapi(\"VBD.get_other_config\", vbd_ref)"},{"line_number":552,"context_line":"            if \u0027osvol\u0027 not in oc:"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAALH%2F%2FNXE%3D","line":549,"in_reply_to":"AAAALH%2F%2FNxU%3D","updated":"2012-10-04 19:20:55.000000000","message":"John:  Good question.  We do want to snapshot all local disks.  They all get uploaded to glance... The old code did a VM.snapshot which would do this...","commit_id":"359527501604ea720b594a2ed1b32cd29fe6adbc"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"1b745b9155955b7d82108cac0d07afed6666bf7a","unresolved":false,"context_lines":[{"line_number":546,"context_line":"    \"\"\""},{"line_number":547,"context_line":"    new_vdis \u003d []"},{"line_number":548,"context_line":"    try:"},{"line_number":549,"context_line":"        vbd_refs \u003d session.call_xenapi(\"VM.get_VBDs\", vm_ref)"},{"line_number":550,"context_line":"        for vbd_ref in vbd_refs:"},{"line_number":551,"context_line":"            oc \u003d session.call_xenapi(\"VBD.get_other_config\", vbd_ref)"},{"line_number":552,"context_line":"            if \u0027osvol\u0027 not in oc:"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAALH%2F%2FNrA%3D","line":549,"in_reply_to":"AAAALH%2F%2FNxU%3D","updated":"2012-10-04 14:25:27.000000000","message":"just below this renuka/comstud check the other_config for the osvol tag before appending to new_vdis - i believe this is necessary and sufficient.","commit_id":"359527501604ea720b594a2ed1b32cd29fe6adbc"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"d4cc4b93ce744cb78e541ac83f3993b90419b3fd","unresolved":false,"context_lines":[{"line_number":567,"context_line":"def _destroy_snapshots(session, instance, vdi_snapshot_recs):"},{"line_number":568,"context_line":"    vdi_refs \u003d [session.call_xenapi(\"VDI.get_by_uuid\", vdi_rec[\u0027uuid\u0027])"},{"line_number":569,"context_line":"                 for vdi_rec in vdi_snapshot_recs]"},{"line_number":570,"context_line":"    safe_destroy_vdis(session, vdi_refs)"},{"line_number":571,"context_line":""},{"line_number":572,"context_line":""},{"line_number":573,"context_line":"def get_sr_path(session):"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAALH%2F%2FNxQ%3D","line":570,"updated":"2012-10-04 09:00:02.000000000","message":"Removing destroy VM seems like the correct thing here. good spot.","commit_id":"359527501604ea720b594a2ed1b32cd29fe6adbc"}],"nova/virt/xenapi/vmops.py":[{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"d4cc4b93ce744cb78e541ac83f3993b90419b3fd","unresolved":false,"context_lines":[{"line_number":208,"context_line":"                        vm_utils.ImageType.RAMDISK)"},{"line_number":209,"context_line":"            ramdisk_file \u003d vdis[\u0027ramdisk\u0027].get(\u0027file\u0027)"},{"line_number":210,"context_line":""},{"line_number":211,"context_line":"        vm_ref \u003d self._create_vm(context, instance, instance[\u0027name\u0027],"},{"line_number":212,"context_line":"                                 {\u0027root\u0027: root_vdi},"},{"line_number":213,"context_line":"                                 network_info, image_meta, kernel_file,"},{"line_number":214,"context_line":"                                 ramdisk_file)"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAALH%2F%2FNxM%3D","line":211,"updated":"2012-10-04 09:00:02.000000000","message":"I think this is the correct thing to do. But wanted to point out that this means the kernel and ramdisk might actually be updated during the migration/resize.\n\nI wondering about the cases where resize doesn\u0027t move machine? Do we get a storage leak because we create a duplicate ramdisk and kernel? Haven\u0027t double checked the cleanup logic on that one.","commit_id":"359527501604ea720b594a2ed1b32cd29fe6adbc"},{"author":{"_account_id":1030,"name":"Chris Behrens","email":"cbehrens@codestud.com","username":"cbehrens"},"change_message_id":"2ee12f04af05b428529a64304297c1e0583ab10b","unresolved":false,"context_lines":[{"line_number":208,"context_line":"                        vm_utils.ImageType.RAMDISK)"},{"line_number":209,"context_line":"            ramdisk_file \u003d vdis[\u0027ramdisk\u0027].get(\u0027file\u0027)"},{"line_number":210,"context_line":""},{"line_number":211,"context_line":"        vm_ref \u003d self._create_vm(context, instance, instance[\u0027name\u0027],"},{"line_number":212,"context_line":"                                 {\u0027root\u0027: root_vdi},"},{"line_number":213,"context_line":"                                 network_info, image_meta, kernel_file,"},{"line_number":214,"context_line":"                                 ramdisk_file)"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAALH%2F%2FNXA%3D","line":211,"in_reply_to":"AAAALH%2F%2FNxM%3D","updated":"2012-10-04 19:20:55.000000000","message":"Good question.. I am not sure.  This code was here when I took over the patch... so I am not sure.","commit_id":"359527501604ea720b594a2ed1b32cd29fe6adbc"}],"nova/virt/xenapi/volumeops.py":[{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"d4cc4b93ce744cb78e541ac83f3993b90419b3fd","unresolved":false,"context_lines":[{"line_number":218,"context_line":"            vm_rec \u003d self._session.call_xenapi(\"VM.get_record\", vm_ref)"},{"line_number":219,"context_line":"            sr_ref \u003d volume_utils.find_sr_from_vbd(self._session, vbd_ref)"},{"line_number":220,"context_line":"            if vm_rec[\u0027power_state\u0027] !\u003d \u0027Halted\u0027:"},{"line_number":221,"context_line":"                vm_utils.unplug_vbd(self._session, vbd_ref)"},{"line_number":222,"context_line":"        except volume_utils.StorageError, exc:"},{"line_number":223,"context_line":"            LOG.exception(exc)"},{"line_number":224,"context_line":"            raise Exception(_(\u0027Unable to detach volume %s\u0027) % mountpoint)"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAALH%2F%2FNxA%3D","line":221,"updated":"2012-10-04 09:00:02.000000000","message":"Is this a worth an extra bug report?","commit_id":"359527501604ea720b594a2ed1b32cd29fe6adbc"},{"author":{"_account_id":2535,"name":"renukaapte","email":"renuka.apte@citrix.com","username":"renukaapte"},"change_message_id":"c5d724cd69e71da5616e1a6deb1b5494f6ce35e4","unresolved":false,"context_lines":[{"line_number":218,"context_line":"            vm_rec \u003d self._session.call_xenapi(\"VM.get_record\", vm_ref)"},{"line_number":219,"context_line":"            sr_ref \u003d volume_utils.find_sr_from_vbd(self._session, vbd_ref)"},{"line_number":220,"context_line":"            if vm_rec[\u0027power_state\u0027] !\u003d \u0027Halted\u0027:"},{"line_number":221,"context_line":"                vm_utils.unplug_vbd(self._session, vbd_ref)"},{"line_number":222,"context_line":"        except volume_utils.StorageError, exc:"},{"line_number":223,"context_line":"            LOG.exception(exc)"},{"line_number":224,"context_line":"            raise Exception(_(\u0027Unable to detach volume %s\u0027) % mountpoint)"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAALH%2F%2FNWw%3D","line":221,"in_reply_to":"AAAALH%2F%2FNW8%3D","updated":"2012-10-04 19:32:52.000000000","message":"This is required. unplug_vbd fails when a VM is halted already... therefore detach fails. Usually, a VM is not halted when we do a detach volume, so we need call unplug.","commit_id":"359527501604ea720b594a2ed1b32cd29fe6adbc"},{"author":{"_account_id":1030,"name":"Chris Behrens","email":"cbehrens@codestud.com","username":"cbehrens"},"change_message_id":"2ee12f04af05b428529a64304297c1e0583ab10b","unresolved":false,"context_lines":[{"line_number":218,"context_line":"            vm_rec \u003d self._session.call_xenapi(\"VM.get_record\", vm_ref)"},{"line_number":219,"context_line":"            sr_ref \u003d volume_utils.find_sr_from_vbd(self._session, vbd_ref)"},{"line_number":220,"context_line":"            if vm_rec[\u0027power_state\u0027] !\u003d \u0027Halted\u0027:"},{"line_number":221,"context_line":"                vm_utils.unplug_vbd(self._session, vbd_ref)"},{"line_number":222,"context_line":"        except volume_utils.StorageError, exc:"},{"line_number":223,"context_line":"            LOG.exception(exc)"},{"line_number":224,"context_line":"            raise Exception(_(\u0027Unable to detach volume %s\u0027) % mountpoint)"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAALH%2F%2FNW8%3D","line":221,"in_reply_to":"AAAALH%2F%2FNxA%3D","updated":"2012-10-04 19:20:55.000000000","message":"This was also in the patch when I took it over.  I saw it... and it seems like it\u0027s a separate issue from the resize issue.. as the original VM is definitely halted when this is called.\n\nSo, it definitely seems like a separate bug with detaching volumes while instances are running.  We could rip this out into a separate review if you really want...","commit_id":"359527501604ea720b594a2ed1b32cd29fe6adbc"}],"plugins/xenserver/xenapi/etc/xapi.d/plugins/utils.py":[{"author":{"_account_id":475,"name":"Rick Harris","email":"rick.harris@rackspace.com","username":"rconradharris"},"change_message_id":"ebce9fe241588e28f613419bfceca5936e300d80","unresolved":false,"context_lines":[{"line_number":35,"context_line":"    os.rename(src, dst)"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"def _move(src, dst):"},{"line_number":38,"context_line":"    # safer because is falls back to os.rename only if the"},{"line_number":39,"context_line":"    # destination is on the current filesystem"},{"line_number":40,"context_line":"    logging.info(\"Moving file \u0027%s\u0027 -\u003e \u0027%s\u0027\" % (src, dst))"},{"line_number":41,"context_line":"    shutil.move(src, dst)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAALH%2F%2FoxQ%3D","line":38,"updated":"2012-08-24 00:05:15.000000000","message":"I\u0027m curious as to why this is needed?\n\nThe code intentionally restricts itself to using `os.rename` so that it would fail-fast if it inadvertently performing a copy-then-unlink.\n\nThe assumption made is that the staging area would always reside on the same FS as the SR to ensure that cheap renames would be possible w/o cross-link device errors.\n\nThe rationale for doing this is two-fold:\n\n1. We want to avoid any unecessary IO on the machine; if we\u0027re having to perform a copy, it\u0027s means we\u0027ve misconfigured the machine so that the staging area is on a separate FS from the SR.\n\n2. We need the movement of the VDI chain into the SR to be as \u0027atomic-as-possible\u0027 since there\u0027s a potential race-window where a VDI marked \u0027hidden\u0027 could be in the SR without it\u0027s corresponding leaf VDI.\n\nIf we\u0027re too slow in moving the whole VDI chain (for example, we\u0027ere copying the rather-large leaf VDI), the SR could be re-scanned, detect the hidden VDI without a parent, delete it, and cause build failures.\n\nBy enforcing a cheap `os.rename`s we make this race-window as small as possible.\n\nLong term, it would be nice to use locking to avoid the race entirely, but for now, if we stick to renaming, I think we\u0027re relatively safe.","commit_id":"e51055b0383e30e1220c85057a5b9d18a75a7307"},{"author":{"_account_id":475,"name":"Rick Harris","email":"rick.harris@rackspace.com","username":"rconradharris"},"change_message_id":"4bc82bef0c8578496010855a31f2af9ff0719f98","unresolved":false,"context_lines":[{"line_number":35,"context_line":"    os.rename(src, dst)"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"def _move(src, dst):"},{"line_number":38,"context_line":"    # safer because is falls back to os.rename only if the"},{"line_number":39,"context_line":"    # destination is on the current filesystem"},{"line_number":40,"context_line":"    logging.info(\"Moving file \u0027%s\u0027 -\u003e \u0027%s\u0027\" % (src, dst))"},{"line_number":41,"context_line":"    shutil.move(src, dst)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAALH%2F%2FkQE%3D","line":38,"in_reply_to":"AAAALH%2F%2Fk1c%3D","updated":"2012-08-30 18:34:54.000000000","message":"The solution we\u0027re using is to symlink /images -\u003e /var/run/sr-mount/AAAA-BBBB-CCCC-DDDD/images\n\nIt\u0027s a bit of a hack, but it solves addresses the core problem of ensuring the moving of files into the SR is \u0027cheap\u0027.","commit_id":"e51055b0383e30e1220c85057a5b9d18a75a7307"},{"author":{"_account_id":2535,"name":"renukaapte","email":"renuka.apte@citrix.com","username":"renukaapte"},"change_message_id":"5b0bda1d409f6c8c8d492e197b5f9b2218cd8ca8","unresolved":false,"context_lines":[{"line_number":35,"context_line":"    os.rename(src, dst)"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"def _move(src, dst):"},{"line_number":38,"context_line":"    # safer because is falls back to os.rename only if the"},{"line_number":39,"context_line":"    # destination is on the current filesystem"},{"line_number":40,"context_line":"    logging.info(\"Moving file \u0027%s\u0027 -\u003e \u0027%s\u0027\" % (src, dst))"},{"line_number":41,"context_line":"    shutil.move(src, dst)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAALH%2F%2FjOo%3D","line":38,"in_reply_to":"AAAALH%2F%2FkQE%3D","updated":"2012-08-31 17:24:25.000000000","message":"Sounds good, so I will add that to the documentation and devstack scripts.","commit_id":"e51055b0383e30e1220c85057a5b9d18a75a7307"},{"author":{"_account_id":2535,"name":"renukaapte","email":"renuka.apte@citrix.com","username":"renukaapte"},"change_message_id":"f7a3d76add4190fd6e1a1d4d23b64127e8e6557b","unresolved":false,"context_lines":[{"line_number":35,"context_line":"    os.rename(src, dst)"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"def _move(src, dst):"},{"line_number":38,"context_line":"    # safer because is falls back to os.rename only if the"},{"line_number":39,"context_line":"    # destination is on the current filesystem"},{"line_number":40,"context_line":"    logging.info(\"Moving file \u0027%s\u0027 -\u003e \u0027%s\u0027\" % (src, dst))"},{"line_number":41,"context_line":"    shutil.move(src, dst)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAALH%2F%2Fk1c%3D","line":38,"in_reply_to":"AAAALH%2F%2FoxQ%3D","updated":"2012-08-30 00:30:04.000000000","message":"The \"_rsync_vhds\" and \"move_vhds_into_sr\" assume that the vhd files will be in /images/instance%s, which is why I had to add the _move, because the destination of the vhd will be in /var/run/sr-mount, which is not the same filesystem.\n\nIs the correct solution to fix the above functions to use the correct staging area then?","commit_id":"e51055b0383e30e1220c85057a5b9d18a75a7307"},{"author":{"_account_id":475,"name":"Rick Harris","email":"rick.harris@rackspace.com","username":"rconradharris"},"change_message_id":"ebce9fe241588e28f613419bfceca5936e300d80","unresolved":false,"context_lines":[{"line_number":39,"context_line":"    # destination is on the current filesystem"},{"line_number":40,"context_line":"    logging.info(\"Moving file \u0027%s\u0027 -\u003e \u0027%s\u0027\" % (src, dst))"},{"line_number":41,"context_line":"    shutil.move(src, dst)"},{"line_number":42,"context_line":"    "},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"def make_subprocess(cmdline, stdout\u003dFalse, stderr\u003dFalse, stdin\u003dFalse):"},{"line_number":45,"context_line":"    \"\"\"Make a subprocess according to the given command-line string"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAALH%2F%2FoxM%3D","line":42,"updated":"2012-08-24 00:05:15.000000000","message":"Whitespace.","commit_id":"e51055b0383e30e1220c85057a5b9d18a75a7307"}]}
