)]}'
{"nova/virt/driver.py":[{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"f43f55041d4f8bacee24757de1c07eed438efe3b","unresolved":false,"context_lines":[{"line_number":590,"context_line":"            The instance that will be live resized."},{"line_number":591,"context_line":"        :param nova.objects.flavor.Flavor flavor:"},{"line_number":592,"context_line":"            The flavor to which the instance will be live resized to."},{"line_number":593,"context_line":"        \"\"\""},{"line_number":594,"context_line":"        raise NotImplementedError()"},{"line_number":595,"context_line":""},{"line_number":596,"context_line":"    def snapshot(self, context, instance, image_id, update_task_state):"}],"source_content_type":"text/x-python","patch_set":3,"id":"7a5de9d1_91de066c","line":593,"range":{"start_line":593,"start_character":8,"end_line":593,"end_character":11},"updated":"2016-01-28 11:55:54.000000000","message":"We really need to cover what the intended semantics are of this in more detail, and especially what behaviour is when failures occur. ie if memory resize failed, after we have already resized vcpus or disk.","commit_id":"64ab06de567f6ee018edd15a89339d6af43ddf16"}],"nova/virt/hardware.py":[{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"f43f55041d4f8bacee24757de1c07eed438efe3b","unresolved":false,"context_lines":[{"line_number":1174,"context_line":"        limits[\u0027max_ephemeral_disk\u0027] \u003d image_meta.properties.get("},{"line_number":1175,"context_line":"            \"os_live_resize_max_ephemeral_disk\", 0) * units.Ki"},{"line_number":1176,"context_line":"        limits[\u0027min_ephemeral_disk\u0027] \u003d image_meta.properties.get("},{"line_number":1177,"context_line":"            \"os_live_resize_min_ephemeral_disk\", 0) * units.Ki"},{"line_number":1178,"context_line":"    except Exception:"},{"line_number":1179,"context_line":"        LOG.warn(_LW(\"live_resize ImageMetaProp missing.\"))"},{"line_number":1180,"context_line":"    return limits"}],"source_content_type":"text/x-python","patch_set":3,"id":"7a5de9d1_4e946be1","line":1177,"range":{"start_line":1177,"start_character":60,"end_line":1177,"end_character":62},"updated":"2016-01-28 11:55:54.000000000","message":"I\u0027m not really seeing any point in adding all this stuff to ImageMeta. NB the preceeding change doesn\u0027t actually add any of these things to the ImageMeta object, so all of this code will just be returning the default values.\n\nI honestly don\u0027t think that any of this should be user specified. \n\nWhen booting the guest we need to know what upper limit for memory and vcpus to configure, in order to allow potential future resize. I think those limits should be defined in the flavour by the cloud administrator. That will allow a cloud admin to have control of whether each individual flavour will permit later resize.  if if \u0027max_vcpus\u0027 is not set in the flavour, then the user will never be able to resize vcpus in the future.\n\nStuff like min/max disk is just pointless, as there\u0027s no need to deal with any of it upfront. We can arbitrarily resize to any size when needed with disk, limited only by host available disk space and image format constraints.","commit_id":"64ab06de567f6ee018edd15a89339d6af43ddf16"}],"nova/virt/libvirt/config.py":[{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"f43f55041d4f8bacee24757de1c07eed438efe3b","unresolved":false,"context_lines":[{"line_number":1851,"context_line":"        self.name \u003d None"},{"line_number":1852,"context_line":"        self.memory \u003d 500 * units.Mi"},{"line_number":1853,"context_line":"        self.max_memory \u003d 0"},{"line_number":1854,"context_line":"        self.max_vcpus \u003d 0"},{"line_number":1855,"context_line":"        self.membacking \u003d None"},{"line_number":1856,"context_line":"        self.memtune \u003d None"},{"line_number":1857,"context_line":"        self.numatune \u003d None"}],"source_content_type":"text/x-python","patch_set":3,"id":"7a5de9d1_0e899326","line":1854,"range":{"start_line":1854,"start_character":25,"end_line":1854,"end_character":26},"updated":"2016-01-28 11:55:54.000000000","message":"Any changes to this file also need additions to test_config.py","commit_id":"64ab06de567f6ee018edd15a89339d6af43ddf16"},{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"f43f55041d4f8bacee24757de1c07eed438efe3b","unresolved":false,"context_lines":[{"line_number":1887,"context_line":"        else:"},{"line_number":1888,"context_line":"            currentmemory \u003d self._text_node(\"currentMemory\", self.memory)"},{"line_number":1889,"context_line":"            currentmemory.set(\"unit\", \"KiB\")"},{"line_number":1890,"context_line":"            root.append(currentmemory)"},{"line_number":1891,"context_line":"            root.append(self._text_node(\"memory\", self.max_memory))"},{"line_number":1892,"context_line":""},{"line_number":1893,"context_line":"        if self.membacking is not None:"}],"source_content_type":"text/x-python","patch_set":3,"id":"7a5de9d1_2ee1efd0","line":1890,"range":{"start_line":1890,"start_character":37,"end_line":1890,"end_character":38},"updated":"2016-01-28 11:55:54.000000000","message":"Using \u0027currentMemory\u0027 is a really terrible idea for this. This is used to control the balloon driver target in the guest. The guest OS will boot woith the *full* max_memory setting. You then rely on the guest co-operating to voluntarily release some of its allocated memory via the balloon. In a cloud environment we have to assume the guest is malicious and won\u0027t co-operate. As such we certainly cannot rely on using the balloon driver for this feature.\n\nIf we want to resize RAM, then you\u0027ll need to do proper RAM hotplug, not ballooning.","commit_id":"64ab06de567f6ee018edd15a89339d6af43ddf16"},{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"f43f55041d4f8bacee24757de1c07eed438efe3b","unresolved":false,"context_lines":[{"line_number":1910,"context_line":"            vcpu.set(\"current\", str(self.vcpus))"},{"line_number":1911,"context_line":"            if self.cpuset is not None:"},{"line_number":1912,"context_line":"                vcpu.set(\"cpuset\", hardware.format_cpu_spec(self.cpuset))"},{"line_number":1913,"context_line":"            root.append(vcpu)"},{"line_number":1914,"context_line":""},{"line_number":1915,"context_line":"        if len(self.metadata) \u003e 0:"},{"line_number":1916,"context_line":"            metadata \u003d etree.Element(\"metadata\")"}],"source_content_type":"text/x-python","patch_set":3,"id":"7a5de9d1_ae695f27","line":1913,"range":{"start_line":1913,"start_character":28,"end_line":1913,"end_character":29},"updated":"2016-01-28 11:55:54.000000000","message":"This is putting business logic in the XML formatters. We not have all this if/else logic in here. The calling code should decide whehter to set  max_vcpus or vcpus depending on what element it wants set. We don\u0027t have \u0027self.vcpus\u0027 being used to set different elements depending on whether certain other attributes are set.","commit_id":"64ab06de567f6ee018edd15a89339d6af43ddf16"},{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"f43f55041d4f8bacee24757de1c07eed438efe3b","unresolved":false,"context_lines":[{"line_number":2333,"context_line":"                self.projectname \u003d c.text"},{"line_number":2334,"context_line":"                for item in c.items():"},{"line_number":2335,"context_line":"                    if item[0] \u003d\u003d \"uuid\":"},{"line_number":2336,"context_line":"                        self.projectid \u003d item[1]"},{"line_number":2337,"context_line":""},{"line_number":2338,"context_line":"    def format_dom(self):"},{"line_number":2339,"context_line":"        meta \u003d super(LibvirtConfigGuestMetaNovaOwner, self).format_dom()"}],"source_content_type":"text/x-python","patch_set":3,"id":"7a5de9d1_8edca3e5","line":2336,"range":{"start_line":2336,"start_character":47,"end_line":2336,"end_character":48},"updated":"2016-01-28 11:55:54.000000000","message":"This really ought to be done in a separate commit from the cpu/memory changes, as they are separate unrelated changes.","commit_id":"64ab06de567f6ee018edd15a89339d6af43ddf16"}],"nova/virt/libvirt/driver.py":[{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"f43f55041d4f8bacee24757de1c07eed438efe3b","unresolved":false,"context_lines":[{"line_number":2782,"context_line":"        if deltas[\u0027vcpus\u0027]:"},{"line_number":2783,"context_line":"            live_resize_vcpus(guest, flavor)"},{"line_number":2784,"context_line":"        if deltas[\u0027memory\u0027]:"},{"line_number":2785,"context_line":"            live_resize_memory(guest, flavor)"},{"line_number":2786,"context_line":""},{"line_number":2787,"context_line":"        return deltas[\u0027vcpus\u0027] or deltas[\u0027memory\u0027]"},{"line_number":2788,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"7a5de9d1_b136a2e5","line":2785,"range":{"start_line":2785,"start_character":31,"end_line":2785,"end_character":36},"updated":"2016-01-28 11:55:54.000000000","message":"So when this memory resize call fails, the exception will just propagate up the stack to the user. The user will see the resize has failed, but in fact their VM has already had vCPUS changed. So they\u0027re left with a VM in a partially resized state which is pretty unpleasant.","commit_id":"64ab06de567f6ee018edd15a89339d6af43ddf16"},{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"f43f55041d4f8bacee24757de1c07eed438efe3b","unresolved":false,"context_lines":[{"line_number":2784,"context_line":"        if deltas[\u0027memory\u0027]:"},{"line_number":2785,"context_line":"            live_resize_memory(guest, flavor)"},{"line_number":2786,"context_line":""},{"line_number":2787,"context_line":"        return deltas[\u0027vcpus\u0027] or deltas[\u0027memory\u0027]"},{"line_number":2788,"context_line":""},{"line_number":2789,"context_line":"    def _live_resize_numa(self, old_flavor, flavor, limits, guest):"},{"line_number":2790,"context_line":"        \"\"\"Live-resize of memory/vcpu resources for guests with numa nodes."}],"source_content_type":"text/x-python","patch_set":3,"id":"7a5de9d1_b1ab02d6","line":2787,"range":{"start_line":2787,"start_character":48,"end_line":2787,"end_character":50},"updated":"2016-01-28 11:55:54.000000000","message":"In general I\u0027m not really feeling like all the code above is a very attractive code pattern. We\u0027ve got 150 lines of code added which ultimately end up just doing 2 actual libvirt API calls. At the very least I\u0027d expect the majority of this code to be in some place where it can be shared between virt drivers, so the actual code in the virt drivers is much clearer to understand.","commit_id":"64ab06de567f6ee018edd15a89339d6af43ddf16"}],"nova/virt/libvirt/guest.py":[{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"f43f55041d4f8bacee24757de1c07eed438efe3b","unresolved":false,"context_lines":[{"line_number":464,"context_line":"    def set_memory_size(self, mem_size):"},{"line_number":465,"context_line":"        flags \u003d (libvirt.VIR_DOMAIN_AFFECT_LIVE |"},{"line_number":466,"context_line":"                 libvirt.VIR_DOMAIN_AFFECT_CONFIG)"},{"line_number":467,"context_line":"        self._domain.setMemoryFlags(mem_size, flags)"},{"line_number":468,"context_line":""},{"line_number":469,"context_line":"    def set_vcpus_number(self, vcpus):"},{"line_number":470,"context_line":"        flags \u003d (libvirt.VIR_DOMAIN_AFFECT_LIVE |"}],"source_content_type":"text/x-python","patch_set":3,"id":"7a5de9d1_b1c0e27d","line":467,"range":{"start_line":467,"start_character":51,"end_line":467,"end_character":52},"updated":"2016-01-28 11:55:54.000000000","message":"As mention in other files, we really don\u0027t want to be using this as it is doing memory ballooning which cannot be trusted to work in cloud.","commit_id":"64ab06de567f6ee018edd15a89339d6af43ddf16"}]}
