)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"c73a56f257541cc31288cc176c6a92894adb0fba","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Vladik Romanovsky \u003cvromanso@redhat.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2016-05-02 16:15:52 -0400"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"libvirt: attach configdrive after instance spawn"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"In order to expose device tagging metadata in the configdrive, the"},{"line_number":10,"context_line":"latter needs to be attached once the instance has spawned and all"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":16,"id":"1a122d0e_b7b48582","line":7,"updated":"2016-05-03 14:31:53.000000000","message":"Just going to leave this review on my own patch as a reminder: it\u0027s no longer after instance spawn, it\u0027s after instance XML has been generated by libvirt, by before instance boot.","commit_id":"d49d12e0cd9a9d9f18dfdd9576cbfb569679edbf"}],"nova/virt/libvirt/driver.py":[{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"d4a241736fe68f85f70607da0be76863e515eef5","unresolved":false,"context_lines":[{"line_number":2784,"context_line":"        self._create_configdrive(context, instance, admin_pass\u003dadmin_password,"},{"line_number":2785,"context_line":"                                 files\u003dinjected_files,"},{"line_number":2786,"context_line":"                                 network_info\u003dnetwork_info)"},{"line_number":2787,"context_line":"        self._attach_configdrive(context, instance, disk_info)"},{"line_number":2788,"context_line":"        LOG.debug(\"Instance is running\", instance\u003dinstance)"},{"line_number":2789,"context_line":""},{"line_number":2790,"context_line":"        def _wait_for_boot():"}],"source_content_type":"text/x-python","patch_set":4,"id":"7a1b2928_533730e3","line":2787,"range":{"start_line":2787,"start_character":8,"end_line":2787,"end_character":62},"updated":"2016-04-11 10:44:15.000000000","message":"See below as to why I think we can\u0027t really do this after VM boot.","commit_id":"35d3f4ebef55e2d09f572b0b0590d6b43cc29f13"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"d4a241736fe68f85f70607da0be76863e515eef5","unresolved":false,"context_lines":[{"line_number":4864,"context_line":"            guest \u003d libvirt_guest.Guest(domain)"},{"line_number":4865,"context_line":""},{"line_number":4866,"context_line":"        if power_on or pause:"},{"line_number":4867,"context_line":"            guest.launch(pause\u003dpause)"},{"line_number":4868,"context_line":""},{"line_number":4869,"context_line":"        if not utils.is_neutron():"},{"line_number":4870,"context_line":"            guest.enable_hairpin()"}],"source_content_type":"text/x-python","patch_set":4,"id":"7a1b2928_b8be63fd","line":4867,"range":{"start_line":4867,"start_character":12,"end_line":4867,"end_character":37},"updated":"2016-04-11 10:44:15.000000000","message":"So we launch a guest as part of the _create_domain_and_networks... however looking at cloud-init code\n\nhttps://bazaar.launchpad.net/~cloud-init-dev/cloud-init/trunk/view/head:/systemd/cloud-init-local.service\n\nit seems that we rely on local-fs.target so we expect the drive mounted during VM boot most likely in most images using cloud-init.","commit_id":"35d3f4ebef55e2d09f572b0b0590d6b43cc29f13"},{"author":{"_account_id":8802,"name":"Vladik Romanovsky","email":"vromanso@redhat.com","username":"vladikr"},"change_message_id":"b6a5187a031e8ba99fa9242393e90082cf4e16a6","unresolved":false,"context_lines":[{"line_number":4864,"context_line":"            guest \u003d libvirt_guest.Guest(domain)"},{"line_number":4865,"context_line":""},{"line_number":4866,"context_line":"        if power_on or pause:"},{"line_number":4867,"context_line":"            guest.launch(pause\u003dpause)"},{"line_number":4868,"context_line":""},{"line_number":4869,"context_line":"        if not utils.is_neutron():"},{"line_number":4870,"context_line":"            guest.enable_hairpin()"}],"source_content_type":"text/x-python","patch_set":4,"id":"7a1b2928_daafc9e1","line":4867,"range":{"start_line":4867,"start_character":12,"end_line":4867,"end_character":37},"in_reply_to":"7a1b2928_b8be63fd","updated":"2016-04-11 13:41:08.000000000","message":"I think Nikola is right.\nMaybe an alternatively we can _inject_data into to the config drive, while the instance is paused.","commit_id":"35d3f4ebef55e2d09f572b0b0590d6b43cc29f13"},{"author":{"_account_id":8802,"name":"Vladik Romanovsky","email":"vromanso@redhat.com","username":"vladikr"},"change_message_id":"3fc179405129a5a4844274f95a608f375912b848","unresolved":false,"context_lines":[{"line_number":2760,"context_line":"                self._get_disk_config_image_type())"},{"line_number":2761,"context_line":"            self._set_cache_mode(diskconfig)"},{"line_number":2762,"context_line":"            guest \u003d self._host.get_guest(instance)"},{"line_number":2763,"context_line":"            guest.update_device(diskconfig, persistent\u003dTrue, live\u003dTrue)"},{"line_number":2764,"context_line":""},{"line_number":2765,"context_line":"    # NOTE(ilyaalekseyev): Implementation like in multinics"},{"line_number":2766,"context_line":"    # for xenapi(tr3buchet)"}],"source_content_type":"text/x-python","patch_set":6,"id":"5a18252c_05c1e7e4","line":2763,"range":{"start_line":2763,"start_character":66,"end_line":2763,"end_character":70},"updated":"2016-04-12 12:10:52.000000000","message":"Live has to be false here.\nWe only want to affect the persistent config, not to do operations on a live instance.","commit_id":"e37fb8be1ce7b2da74a7fe1e45c10642a82a8901"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"1595f4b1882bdf389aaa0b3235564446fe4de26f","unresolved":false,"context_lines":[{"line_number":3046,"context_line":"                                         swap_mb\u003dswap_mb)"},{"line_number":3047,"context_line":""},{"line_number":3048,"context_line":"        # Config drive"},{"line_number":3049,"context_line":"        if configdrive.required_by(instance):"},{"line_number":3050,"context_line":"            LOG.info(_LI(\u0027Using config drive\u0027), instance\u003dinstance)"},{"line_number":3051,"context_line":"            extra_md \u003d {}"},{"line_number":3052,"context_line":"            if admin_pass:"}],"source_content_type":"text/x-python","patch_set":19,"id":"dab17558_782379bd","side":"PARENT","line":3049,"updated":"2016-05-11 16:07:29.000000000","message":"Don\u0027t we want to have this condition outside of this method ?","commit_id":"541ac385b768aed1462021f5d12b58dbe1c7265b"},{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"cc43f23da339288e727c92cdad020131d3bdbd84","unresolved":false,"context_lines":[{"line_number":3449,"context_line":""},{"line_number":3450,"context_line":"            # Create a configdrive cdrom with no media. The real configdrive"},{"line_number":3451,"context_line":"            # needs metadata that is only available after instance boot and"},{"line_number":3452,"context_line":"            # will be attached at that point"},{"line_number":3453,"context_line":"            if \u0027disk.config\u0027 in disk_mapping:"},{"line_number":3454,"context_line":"                diskconfig \u003d self._get_guest_disk_config("},{"line_number":3455,"context_line":"                    instance, \u0027disk.config\u0027, disk_mapping, inst_type,"}],"source_content_type":"text/x-python","patch_set":26,"id":"7aa08908_06b6f2f8","line":3452,"range":{"start_line":3452,"start_character":39,"end_line":3452,"end_character":44},"updated":"2016-06-16 08:54:28.000000000","message":"AFAIR, we shouldn\u0027t need to wait for the instance to boot. Libvirt should be assigning addresses when you call the \"defineXML\" API.\n\nSo we should simply be generating the XML for the config disk normally here, including the filepath.\n\nWe merely need insert code in between the call to defineXML() and create() which generates the config drive, avoiding any hotplug/media change.","commit_id":"c3c6a4f196ccf09260e8d13b979c5a10e6ad5e84"},{"author":{"_account_id":8802,"name":"Vladik Romanovsky","email":"vromanso@redhat.com","username":"vladikr"},"change_message_id":"8727f209e7839fcbe0b8874923a0053ea55f19e2","unresolved":false,"context_lines":[{"line_number":3449,"context_line":""},{"line_number":3450,"context_line":"            # Create a configdrive cdrom with no media. The real configdrive"},{"line_number":3451,"context_line":"            # needs metadata that is only available after instance boot and"},{"line_number":3452,"context_line":"            # will be attached at that point"},{"line_number":3453,"context_line":"            if \u0027disk.config\u0027 in disk_mapping:"},{"line_number":3454,"context_line":"                diskconfig \u003d self._get_guest_disk_config("},{"line_number":3455,"context_line":"                    instance, \u0027disk.config\u0027, disk_mapping, inst_type,"}],"source_content_type":"text/x-python","patch_set":26,"id":"5a9d85d2_ae1b731a","line":3452,"range":{"start_line":3452,"start_character":39,"end_line":3452,"end_character":44},"in_reply_to":"7aa08908_06b6f2f8","updated":"2016-06-21 03:32:13.000000000","message":"That\u0027s what we are actually doing. The above comment wasn\u0027t updated and is miss leading.\nWe are updating the xml with updateDeviceFlags with a xml of a generated config drive.\nUnfortunately, updateDeviceFlags doesn\u0027t handle rbd and incorrectly sets protocol to nbd, instead of rbd and ignores cinder settings [1]\n\nThe newer version of the code will attach the config drive xml, using the attachDeviceFlags and will not generate the xml for the config drive here, but only after the call to defineXML\n\n[1] https://paste.fedoraproject.org/382398/46647949/","commit_id":"c3c6a4f196ccf09260e8d13b979c5a10e6ad5e84"},{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"f9772d6b8483f8e597e8d9d8d49b3148d6a412d5","unresolved":false,"context_lines":[{"line_number":2571,"context_line":"                self._get_disk_config_image_type())"},{"line_number":2572,"context_line":"            self._set_cache_mode(diskconfig)"},{"line_number":2573,"context_line":"            guest \u003d self._host.get_guest(instance)"},{"line_number":2574,"context_line":"            guest.attach_device(diskconfig, persistent\u003dTrue)"},{"line_number":2575,"context_line":""},{"line_number":2576,"context_line":"    def _create_and_attach_configdrive(self, context, instance, disk_info,"},{"line_number":2577,"context_line":"                                      admin_pass\u003dNone, files\u003dNone,"}],"source_content_type":"text/x-python","patch_set":34,"id":"3aaa91ec_903dbbbd","line":2574,"updated":"2016-06-23 13:51:34.000000000","message":"I still don\u0027t see why you\u0027re doing this. We should be able to provide the config drive in the XML right away, and not use attach_device().\n\nThe only thing that needs to be delayed is creation of the config drive ISO image on disk, not creation of the config driver in XML","commit_id":"ac6ef743a09b1f3198ad8dd824fc29abd1c8ad5a"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"58fc8186d383d7e4cc8bb38a767efed4eedbaa97","unresolved":false,"context_lines":[{"line_number":3065,"context_line":"                self._get_disk_config_image_type())"},{"line_number":3066,"context_line":""},{"line_number":3067,"context_line":"            # Don\u0027t overwrite an existing config drive"},{"line_number":3068,"context_line":"            if not config_drive_image.exists():"},{"line_number":3069,"context_line":"                extra_md \u003d {}"},{"line_number":3070,"context_line":"                if admin_pass:"},{"line_number":3071,"context_line":"                    extra_md[\u0027admin_pass\u0027] \u003d admin_pass"}],"source_content_type":"text/x-python","patch_set":40,"id":"3aaa91ec_54c4993e","line":3068,"updated":"2016-06-24 19:23:11.000000000","message":"Didn\u0027t we say that we need to always generate the configdrive on boot to make sure it\u0027s updated? I think the point of this patch adding the callback in all these places is so that we will, any time we spawn, rescue, etc, right? Unless I\u0027m missing something this existence check will defeat everything else you add in this patch, no?\n\nThe problem with just removing this line is that injected contents won\u0027t be available except on the first attempt to do this because they\u0027re not persisted outside the boot request. There was a bug for this quite recently, but I can\u0027t put my finger on it right this moment.\n\nPerhaps we need an cdb.update_drive() mechanism? That\u0027s easy for vfat-based config drives because we mount it anyway, we can just skip the create step and mount the existing one I think.\n\nFor ISO9660 we can use growisofs to append updates, which would require some thinking to avoid growing every time we boot. Also, isoinfo can be used to extract data from an iso image in place, which would let us extract things like the injected files and then just recreate as normal.","commit_id":"c9edb5d4a995b5e3c7291c32c5fcaf8e85561fcc"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"b6d866fa7b282faec80938f286f7547698fc4c0f","unresolved":false,"context_lines":[{"line_number":3065,"context_line":"                self._get_disk_config_image_type())"},{"line_number":3066,"context_line":""},{"line_number":3067,"context_line":"            # Don\u0027t overwrite an existing config drive"},{"line_number":3068,"context_line":"            if not config_drive_image.exists():"},{"line_number":3069,"context_line":"                extra_md \u003d {}"},{"line_number":3070,"context_line":"                if admin_pass:"},{"line_number":3071,"context_line":"                    extra_md[\u0027admin_pass\u0027] \u003d admin_pass"}],"source_content_type":"text/x-python","patch_set":40,"id":"3aaa91ec_b6e025ce","line":3068,"in_reply_to":"3aaa91ec_54c4993e","updated":"2016-06-27 14:21:10.000000000","message":"\u003e Didn\u0027t we say that we need to always generate the\n\u003e configdrive on boot to make sure it\u0027s updated?\n\nThat\u0027ll only be necessary once we implement interface and volume attachment with tags. Currently the API only support booting with tagged interfaces/volumes, so the tags metadata shouldn\u0027t changer over the lifetime of a VM. Unless volume and interface *detach* works with stuff that the VM was booted with? In which case yeah, config drive needs to be updated at every boot...","commit_id":"c9edb5d4a995b5e3c7291c32c5fcaf8e85561fcc"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"d4357d327984004f195131419c8b6a5028e37e86","unresolved":false,"context_lines":[{"line_number":3065,"context_line":"                self._get_disk_config_image_type())"},{"line_number":3066,"context_line":""},{"line_number":3067,"context_line":"            # Don\u0027t overwrite an existing config drive"},{"line_number":3068,"context_line":"            if not config_drive_image.exists():"},{"line_number":3069,"context_line":"                extra_md \u003d {}"},{"line_number":3070,"context_line":"                if admin_pass:"},{"line_number":3071,"context_line":"                    extra_md[\u0027admin_pass\u0027] \u003d admin_pass"}],"source_content_type":"text/x-python","patch_set":40,"id":"3aaa91ec_af2e4af8","line":3068,"in_reply_to":"3aaa91ec_54c4993e","updated":"2016-06-24 19:27:00.000000000","message":"This is the regression you\u0027ll trigger if you just remove that existence check:\n\nhttps://review.openstack.org/#/c/288334/9","commit_id":"c9edb5d4a995b5e3c7291c32c5fcaf8e85561fcc"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"80d2da1394981849997d0b39e7de22b52946e675","unresolved":false,"context_lines":[{"line_number":3065,"context_line":"                self._get_disk_config_image_type())"},{"line_number":3066,"context_line":""},{"line_number":3067,"context_line":"            # Don\u0027t overwrite an existing config drive"},{"line_number":3068,"context_line":"            if not config_drive_image.exists():"},{"line_number":3069,"context_line":"                extra_md \u003d {}"},{"line_number":3070,"context_line":"                if admin_pass:"},{"line_number":3071,"context_line":"                    extra_md[\u0027admin_pass\u0027] \u003d admin_pass"}],"source_content_type":"text/x-python","patch_set":40,"id":"3aaa91ec_53910452","line":3068,"in_reply_to":"3aaa91ec_b6e025ce","updated":"2016-06-27 18:03:01.000000000","message":"okay, I guess that makes sense. I guess calling from rescue then seems a little strange, but I guess it\u0027s probably easier to put that in now vs. later when it\u0027s actually used.","commit_id":"c9edb5d4a995b5e3c7291c32c5fcaf8e85561fcc"}]}
