)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"32f528b8151ee8d9764f4c33f58cf6ae139a7db2","unresolved":false,"context_lines":[{"line_number":9,"context_line":"tl;dr: This is to ensure guests are not starved to entropy during boot"},{"line_number":10,"context_line":"       time."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Looking at the Nova Git history, back in Jan-2014, when configuring RNG"},{"line_number":13,"context_line":"devices was introduced (in commit: b94550f -- \"libvirt: configuration"},{"line_number":14,"context_line":"element for a random number generator device\"), Nova _did_ have a"},{"line_number":15,"context_line":"default of RNG device (which used its entropy source as \u0027/dev/random\u0027)."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"However, it was immediately removed (in commit: 605677c -- \"libvirt:"},{"line_number":18,"context_line":"remove explicit /dev/random rng default\"), with this \u0027rationale\u0027:"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"    \"libvirt (or rather qemu) will default to /dev/random if no rng device"},{"line_number":21,"context_line":"    path is specified [...]"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"    \"It\u0027s preferable for us to not duplicate this default to allow for a"},{"line_number":24,"context_line":"    future where libvirt or the hypervisor needs to make more intelligent"},{"line_number":25,"context_line":"    decisions about the default device to use.\""},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"The above reasoning doesn\u0027t quite hold up:"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"(a) libvirt does not make \"policy\" decisions, such as choosing an"},{"line_number":30,"context_line":"    entropy source (or any other such).  Therefore Nova, as a management"},{"line_number":31,"context_line":"    application, should make the decision here."},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"(b) More importantly, when QEMU exposes a VirtIO-RNG device to the"},{"line_number":34,"context_line":"    guest, that device needs a source of entropy; and QEMU by default"},{"line_number":35,"context_line":"    uses the legacy and problematic `/dev/random` as the source —"},{"line_number":36,"context_line":"    instead of the preferred `/dev/urandom`.  So QEMU\u0027s default for"},{"line_number":37,"context_line":"    VirtIO-RNG devices is not sufficient, and Nova should not rely on"},{"line_number":38,"context_line":"    it."},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"    I raised the topic on \u0027qemu-devel\u0027 list to consider changing QEMU\u0027s"},{"line_number":41,"context_line":"    default:"},{"line_number":42,"context_line":"    https://lists.nongnu.org/archive/html/qemu-devel/2018-09/msg02724.html"},{"line_number":43,"context_line":"    (\"[RFC] Virtio RNG: Consider changing the default entropy source to"},{"line_number":44,"context_line":"    /dev/urandom?\")"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"Therefore make Nova configure a VirtIO-RNG device by default for guests."},{"line_number":47,"context_line":"And use `/dev/urandom` as the default entropy source.  This will also"},{"line_number":48,"context_line":"work for Windows guests, when using VirtIO-Win drivers[*] on the Linux"},{"line_number":49,"context_line":"host."},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"[*]"},{"line_number":52,"context_line":"https://docs.pagure.org/docs-fedora/create-windows-vms-using-virtio.html"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"Closes-Bug: #1789868"},{"line_number":55,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":11,"id":"3fa7e38b_b1a58cb6","line":52,"range":{"start_line":12,"start_character":0,"end_line":52,"end_character":72},"updated":"2020-01-20 14:42:41.000000000","message":"while this commit message was proably orignally relevent the change of the default entropy source was split out so this is nolonger reflective of what this chage is doing so i would delete all of this and just copy the conten of the release note or similar here instead.","commit_id":"9f5d6e64bd1e474a518d9c21328ade85810b04a7"},{"author":{"_account_id":6962,"name":"Kashyap Chamarthy","email":"kchamart@redhat.com","username":"kashyapc"},"change_message_id":"7b17402d0ba2901285bcb6c44ea0242dc33dd6bb","unresolved":false,"context_lines":[{"line_number":9,"context_line":"tl;dr: This is to ensure guests are not starved to entropy during boot"},{"line_number":10,"context_line":"       time."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Looking at the Nova Git history, back in Jan-2014, when configuring RNG"},{"line_number":13,"context_line":"devices was introduced (in commit: b94550f -- \"libvirt: configuration"},{"line_number":14,"context_line":"element for a random number generator device\"), Nova _did_ have a"},{"line_number":15,"context_line":"default of RNG device (which used its entropy source as \u0027/dev/random\u0027)."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"However, it was immediately removed (in commit: 605677c -- \"libvirt:"},{"line_number":18,"context_line":"remove explicit /dev/random rng default\"), with this \u0027rationale\u0027:"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"    \"libvirt (or rather qemu) will default to /dev/random if no rng device"},{"line_number":21,"context_line":"    path is specified [...]"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"    \"It\u0027s preferable for us to not duplicate this default to allow for a"},{"line_number":24,"context_line":"    future where libvirt or the hypervisor needs to make more intelligent"},{"line_number":25,"context_line":"    decisions about the default device to use.\""},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"The above reasoning doesn\u0027t quite hold up:"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"(a) libvirt does not make \"policy\" decisions, such as choosing an"},{"line_number":30,"context_line":"    entropy source (or any other such).  Therefore Nova, as a management"},{"line_number":31,"context_line":"    application, should make the decision here."},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"(b) More importantly, when QEMU exposes a VirtIO-RNG device to the"},{"line_number":34,"context_line":"    guest, that device needs a source of entropy; and QEMU by default"},{"line_number":35,"context_line":"    uses the legacy and problematic `/dev/random` as the source —"},{"line_number":36,"context_line":"    instead of the preferred `/dev/urandom`.  So QEMU\u0027s default for"},{"line_number":37,"context_line":"    VirtIO-RNG devices is not sufficient, and Nova should not rely on"},{"line_number":38,"context_line":"    it."},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"    I raised the topic on \u0027qemu-devel\u0027 list to consider changing QEMU\u0027s"},{"line_number":41,"context_line":"    default:"},{"line_number":42,"context_line":"    https://lists.nongnu.org/archive/html/qemu-devel/2018-09/msg02724.html"},{"line_number":43,"context_line":"    (\"[RFC] Virtio RNG: Consider changing the default entropy source to"},{"line_number":44,"context_line":"    /dev/urandom?\")"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"Therefore make Nova configure a VirtIO-RNG device by default for guests."},{"line_number":47,"context_line":"And use `/dev/urandom` as the default entropy source.  This will also"},{"line_number":48,"context_line":"work for Windows guests, when using VirtIO-Win drivers[*] on the Linux"},{"line_number":49,"context_line":"host."},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"[*]"},{"line_number":52,"context_line":"https://docs.pagure.org/docs-fedora/create-windows-vms-using-virtio.html"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"Closes-Bug: #1789868"},{"line_number":55,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":11,"id":"3fa7e38b_71fe343a","line":52,"range":{"start_line":12,"start_character":0,"end_line":52,"end_character":72},"in_reply_to":"3fa7e38b_b1a58cb6","updated":"2020-01-20 15:12:44.000000000","message":"I\u0027d prefer to keep it in for two reasons:\n\n- The \"tl;dr\" at the top clearly captures what is the purpose (along with the one-line summary).  And the last paragraph again shows what we\u0027re doing.\n\n- The history in the middle is still useful for developers.  Why? It is tracing the path of howe there *used* to be *have* a default RNG device, but it was removed later with an erroneous reason.\n\nHope that makes sense.  I\u0027ll reword parts of the commit message; also the \u0027tl;dr\u0027 to make the purpose explicit.","commit_id":"9f5d6e64bd1e474a518d9c21328ade85810b04a7"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"1cf5b61f82ddcff7c4c149aa30cb6628ef4be634","unresolved":false,"context_lines":[{"line_number":9,"context_line":"tl;dr: We\u0027re adding a default VirtIO-RNG device to ensure guests are"},{"line_number":10,"context_line":"       not starved of entropy (and thus not hang) during boot time."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Background"},{"line_number":13,"context_line":"----------"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Looking at the Nova Git history, Nova commit b94550f419 (libvirt:"},{"line_number":16,"context_line":"configuration element for a random number generator device, 2014-01-16)"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":12,"id":"3fa7e38b_fcb2fbe7","line":13,"range":{"start_line":12,"start_character":0,"end_line":13,"end_character":10},"updated":"2020-01-20 15:30:39.000000000","message":"calling it out as background makes this a little less confusing but i think a reference to the change id or commit is enough. that said i wont block on this if other are ok with it. without calling this out as Background it was actively harmful to understanding what the patch was doing as context i would say its of neutral value.","commit_id":"768eca25f039b4341b2d0aa7793fb6e39313b2cb"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"397c9f70c622b2fb0cd16692de58be0b176b0fec","unresolved":false,"context_lines":[{"line_number":49,"context_line":"    This will also work for Windows guests, when using VirtIO-Win"},{"line_number":50,"context_line":"    drivers[*] on the Linux host."},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"  - The \u0027hw_rng_model\u0027 image metadata property is now rendered"},{"line_number":53,"context_line":"    (temporarily) useless -- as it\u0027s not used anywhere outside the"},{"line_number":54,"context_line":"    _add_rng_device() method.  But we don\u0027t want to deprecate it yet, as"},{"line_number":55,"context_line":"    we may extend it (see code comment for details); docucment that."},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"[*] https://docs.pagure.org/docs-fedora/create-windows-vms-using-virtio.html"},{"line_number":58,"context_line":"[+] https://lists.nongnu.org/archive/html/qemu-devel/2018-09/msg02724.html"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":17,"id":"3fa7e38b_eec0cc7f","line":55,"range":{"start_line":52,"start_character":4,"end_line":55,"end_character":68},"updated":"2020-01-23 12:42:07.000000000","message":"+1","commit_id":"de512f2c025429b72ade5a5ec38a6f1bde60af3c"}],"nova/objects/fields.py":[{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"eeb958655af68552aa67291708f2b9c31499d6cb","unresolved":false,"context_lines":[{"line_number":480,"context_line":""},{"line_number":481,"context_line":"class RNGModel(BaseNovaEnum):"},{"line_number":482,"context_line":""},{"line_number":483,"context_line":"    # TODO(kchamart): Along with \"virtio\", we may need to extend this to"},{"line_number":484,"context_line":"    # allow two more values for VirtIO transitional and non-transitional"},{"line_number":485,"context_line":"    # devices (available since libvirt 5.2.0):"},{"line_number":486,"context_line":"    #"}],"source_content_type":"text/x-python","patch_set":14,"id":"3fa7e38b_b406c5cb","line":483,"range":{"start_line":483,"start_character":6,"end_line":483,"end_character":10},"updated":"2020-01-21 16:47:11.000000000","message":"nit: i would make this a NOTE rather then a TODO but that is minor. the content makes sence but since virtio 1.0 was standardis in 2016  http://docs.oasis-open.org/virtio/virtio/v1.0/virtio-v1.0.html im really not sure that we should should be considering exposing explictly requesting virtio-transitinal with out a very strong reason and a direct upstream bug or customer request.","commit_id":"37d594c80f0f07eee694fc96e880586edb1150b5"},{"author":{"_account_id":6962,"name":"Kashyap Chamarthy","email":"kchamart@redhat.com","username":"kashyapc"},"change_message_id":"15309fcc355013e996295e1e74e51d602be1ce70","unresolved":false,"context_lines":[{"line_number":480,"context_line":""},{"line_number":481,"context_line":"class RNGModel(BaseNovaEnum):"},{"line_number":482,"context_line":""},{"line_number":483,"context_line":"    # TODO(kchamart): Along with \"virtio\", we may need to extend this to"},{"line_number":484,"context_line":"    # allow two more values for VirtIO transitional and non-transitional"},{"line_number":485,"context_line":"    # devices (available since libvirt 5.2.0):"},{"line_number":486,"context_line":"    #"}],"source_content_type":"text/x-python","patch_set":14,"id":"3fa7e38b_74f5ad83","line":483,"range":{"start_line":483,"start_character":6,"end_line":483,"end_character":10},"in_reply_to":"3fa7e38b_b406c5cb","updated":"2020-01-21 16:58:14.000000000","message":"Fixed the wording (and also added a \"if a good reason shows up\") :-)","commit_id":"37d594c80f0f07eee694fc96e880586edb1150b5"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"397c9f70c622b2fb0cd16692de58be0b176b0fec","unresolved":false,"context_lines":[{"line_number":480,"context_line":""},{"line_number":481,"context_line":"class RNGModel(BaseNovaEnum):"},{"line_number":482,"context_line":""},{"line_number":483,"context_line":"    # NOTE(kchamart): Along with \"virtio\", we may need to extend this (if a"},{"line_number":484,"context_line":"    # good reason shows up) to allow two more values for VirtIO"},{"line_number":485,"context_line":"    # transitional and non-transitional devices (available since libvirt"},{"line_number":486,"context_line":"    # 5.2.0):"}],"source_content_type":"text/x-python","patch_set":17,"id":"3fa7e38b_6e329cc2","line":483,"range":{"start_line":483,"start_character":6,"end_line":483,"end_character":10},"updated":"2020-01-23 12:42:07.000000000","message":"thanks from making it a NOTE instead of a TODO","commit_id":"de512f2c025429b72ade5a5ec38a6f1bde60af3c"}],"nova/objects/image_meta.py":[{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"1ce24370e8de9d2ccaafcd56cb5c8128e84f9705","unresolved":false,"context_lines":[{"line_number":360,"context_line":""},{"line_number":361,"context_line":"        # name of the RNG device type eg virtio"},{"line_number":362,"context_line":"        # NOTE(kchamart): Although this is currently not used anymore,"},{"line_number":363,"context_line":"        # we should not remove / deprecate it yet, this as we are likely"},{"line_number":364,"context_line":"        # to extend this field to allow two more values to support"},{"line_number":365,"context_line":"        # \"VirtIO transitional/non-transitional devices\" (refer to the"},{"line_number":366,"context_line":"        # note in RNGModel() class in nova/objects/fields.py), and thus"}],"source_content_type":"text/x-python","patch_set":15,"id":"3fa7e38b_53fc2770","line":363,"range":{"start_line":363,"start_character":51,"end_line":363,"end_character":55},"updated":"2020-01-23 11:57:43.000000000","message":"is this \u0027this\u0027 necessary here?","commit_id":"650bf5987660d68aa8188fcd620d7ac4d5a5e061"},{"author":{"_account_id":6962,"name":"Kashyap Chamarthy","email":"kchamart@redhat.com","username":"kashyapc"},"change_message_id":"0f407816cc14891d291949a63738d4314f0d643d","unresolved":false,"context_lines":[{"line_number":360,"context_line":""},{"line_number":361,"context_line":"        # name of the RNG device type eg virtio"},{"line_number":362,"context_line":"        # NOTE(kchamart): Although this is currently not used anymore,"},{"line_number":363,"context_line":"        # we should not remove / deprecate it yet, this as we are likely"},{"line_number":364,"context_line":"        # to extend this field to allow two more values to support"},{"line_number":365,"context_line":"        # \"VirtIO transitional/non-transitional devices\" (refer to the"},{"line_number":366,"context_line":"        # note in RNGModel() class in nova/objects/fields.py), and thus"}],"source_content_type":"text/x-python","patch_set":15,"id":"3fa7e38b_33c88b1e","line":363,"range":{"start_line":363,"start_character":51,"end_line":363,"end_character":55},"in_reply_to":"3fa7e38b_53fc2770","updated":"2020-01-23 12:08:27.000000000","message":"Not necessary :-)  Thinko.","commit_id":"650bf5987660d68aa8188fcd620d7ac4d5a5e061"}],"nova/virt/libvirt/config.py":[{"author":{"_account_id":9373,"name":"Vlad Gusev","email":"vlad.esten@gmail.com","username":"s10"},"change_message_id":"a167c9ad7985c32119700652643627610eeb0480","unresolved":false,"context_lines":[{"line_number":2711,"context_line":"                                                      **kwargs)"},{"line_number":2712,"context_line":""},{"line_number":2713,"context_line":"        self.model \u003d \u0027random\u0027"},{"line_number":2714,"context_line":"        self.backend \u003d \u0027/dev/urandom\u0027"},{"line_number":2715,"context_line":"        self.rate_period \u003d None"},{"line_number":2716,"context_line":"        self.rate_bytes \u003d None"},{"line_number":2717,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"3f79a3b5_b65bfd52","line":2714,"updated":"2018-11-08 17:05:31.000000000","message":"If I\u0027m not mistaken, /dev/urandom is already a default source for the entropy since Rocky: Ia39402a045ffb1943463b5741655d84071613e8c\n\nThe problem is that virtio-rng is enabled only for instances with qemu-guest-agent enabled and with hw_rng_model\u003dvirtio and hw_rng:allowed\u003dTrue in image metadata.","commit_id":"9a2ba75c07af6f006ae99f38295c21fc6cc51939"},{"author":{"_account_id":6962,"name":"Kashyap Chamarthy","email":"kchamart@redhat.com","username":"kashyapc"},"change_message_id":"e8eedca5344bf24bec3f5c4c21acf8e99d402f50","unresolved":false,"context_lines":[{"line_number":2711,"context_line":"                                                      **kwargs)"},{"line_number":2712,"context_line":""},{"line_number":2713,"context_line":"        self.model \u003d \u0027random\u0027"},{"line_number":2714,"context_line":"        self.backend \u003d \u0027/dev/urandom\u0027"},{"line_number":2715,"context_line":"        self.rate_period \u003d None"},{"line_number":2716,"context_line":"        self.rate_bytes \u003d None"},{"line_number":2717,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"3f79a3b5_9078dec2","line":2714,"in_reply_to":"3f79a3b5_b65bfd52","updated":"2018-11-15 14:34:44.000000000","message":"\u003e If I\u0027m not mistaken, /dev/urandom is already a default source for\n \u003e the entropy since Rocky: Ia39402a045ffb1943463b5741655d84071613e8c\n\nYeah, I remember making that change. :-) It is the default source of entropy for `rng_dev_path`, which, as you pointed out below, comes into picture when we set the image metadata to allow the RNG model to be of \u0027virtio\u0027.\n\n \u003e The problem is that virtio-rng is enabled only for instances with\n \u003e qemu-guest-agent enabled and with hw_rng_model\u003dvirtio and\n \u003e hw_rng:allowed\u003dTrue in image metadata.\n\nHmm, I need to re-test to refresh my memory here, but as we discussed in the hallway in Berlin, what want is to configure a default RNG device, where sensible; e.g. Nova should generate something like:\n\n    \u003crng model\u003d\u0027virtio\u0027\u003e\n      \u003cbackend model\u003d\u0027random\u0027\u003e/dev/urandom\u003c/backend\u003e\n      \u003calias name\u003d\u0027rng0\u0027/\u003e\n      \u003caddress type\u003d\u0027pci\u0027 domain\u003d\u00270x0000\u0027 bus\u003d\u00270x00\u0027 slot\u003d\u00270x07\u0027 function\u003d\u00270x0\u0027/\u003e\n    \u003c/rng\u003e\n\nThis change needs more work.  Just wanted to post the context in the commit message before I forget.","commit_id":"9a2ba75c07af6f006ae99f38295c21fc6cc51939"}],"nova/virt/libvirt/driver.py":[{"author":{"_account_id":20498,"name":"Spyros Trigazis","email":"spyridon.trigazis@cern.ch","username":"strigazi"},"change_message_id":"ca4cd3fe5910ea7b453cfa4e9bf01e7666052ece","unresolved":false,"context_lines":[{"line_number":4679,"context_line":""},{"line_number":4680,"context_line":"    def _add_rng_device(self, guest, flavor):"},{"line_number":4681,"context_line":"        rng_device \u003d vconfig.LibvirtConfigGuestRng()"},{"line_number":4682,"context_line":"        rate_bytes \u003d flavor.extra_specs.get(\u0027hw_rng:rate_bytes\u0027, 0)"},{"line_number":4683,"context_line":"        period \u003d flavor.extra_specs.get(\u0027hw_rng:rate_period\u0027, 0)"},{"line_number":4684,"context_line":"        if rate_bytes:"},{"line_number":4685,"context_line":"            rng_device.rate_bytes \u003d int(rate_bytes)"},{"line_number":4686,"context_line":"            rng_device.rate_period \u003d int(period)"}],"source_content_type":"text/x-python","patch_set":7,"id":"3f79a3b5_dce46fd5","line":4683,"range":{"start_line":4682,"start_character":8,"end_line":4683,"end_character":64},"updated":"2018-11-28 15:35:02.000000000","message":"We might need some defaults for hw_rng:rate_bytes and hw_rng:rate_period.I\u0027m not sure what 0 means.\n\nOr maybe configuration options to control the default behavior?","commit_id":"26822f845ddc1b704cd914cfa6c3e05872b955a4"},{"author":{"_account_id":9373,"name":"Vlad Gusev","email":"vlad.esten@gmail.com","username":"s10"},"change_message_id":"49df8eeb38c30dcb3f4aa95fc2ed8e3732154819","unresolved":false,"context_lines":[{"line_number":4679,"context_line":""},{"line_number":4680,"context_line":"    def _add_rng_device(self, guest, flavor):"},{"line_number":4681,"context_line":"        rng_device \u003d vconfig.LibvirtConfigGuestRng()"},{"line_number":4682,"context_line":"        rate_bytes \u003d flavor.extra_specs.get(\u0027hw_rng:rate_bytes\u0027, 0)"},{"line_number":4683,"context_line":"        period \u003d flavor.extra_specs.get(\u0027hw_rng:rate_period\u0027, 0)"},{"line_number":4684,"context_line":"        if rate_bytes:"},{"line_number":4685,"context_line":"            rng_device.rate_bytes \u003d int(rate_bytes)"},{"line_number":4686,"context_line":"            rng_device.rate_period \u003d int(period)"}],"source_content_type":"text/x-python","patch_set":7,"id":"3f79a3b5_a7aeb49d","line":4683,"range":{"start_line":4682,"start_character":8,"end_line":4683,"end_character":64},"in_reply_to":"3f79a3b5_dce46fd5","updated":"2018-12-18 12:51:14.000000000","message":"0 means \"Don\u0027t add rate limit\", see below:\n...\nif rate_bytes:\n\nI think, configuration option would be useful, if we wanted to preserve original behaviour or set it like it was before by default. I\u0027m not sure if original behaviour is desirable by anyone.","commit_id":"26822f845ddc1b704cd914cfa6c3e05872b955a4"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"16d6d7351ebeb5e3a6c8b8758ab8079289ba39bf","unresolved":false,"context_lines":[{"line_number":5111,"context_line":"    def _add_rng_device(self, guest, flavor, image_meta):"},{"line_number":5112,"context_line":"        rng_allowed_str \u003d flavor.extra_specs.get(\u0027hw_rng:allowed\u0027, True)"},{"line_number":5113,"context_line":"        rng_allowed \u003d strutils.bool_from_string(rng_allowed_str)"},{"line_number":5114,"context_line":"        if rng_allowed:"},{"line_number":5115,"context_line":"            rng_device \u003d vconfig.LibvirtConfigGuestRng()"},{"line_number":5116,"context_line":"            rate_bytes \u003d flavor.extra_specs.get(\u0027hw_rng:rate_bytes\u0027, 0)"},{"line_number":5117,"context_line":"            period \u003d flavor.extra_specs.get(\u0027hw_rng:rate_period\u0027, 0)"}],"source_content_type":"text/x-python","patch_set":10,"id":"3fa7e38b_81af1fdf","line":5114,"updated":"2020-01-15 14:41:09.000000000","message":"So, why would someone *not* want this enabled? With this change, the semantics of the \u0027hw_rng:allowed\u0027 extra spec change. Previously, it had to be explicitly set to a truey value to do something (enable the thing) while now it would have to be explicitly set to a falsey value to something (disable the thing). This needs a reno, for a start, but does raise the question of whether we actually need this extra spec now.\n\nOn a similar but perhaps even more pressing note, the \u0027hw_rng_model\u0027 image metadata property is now totally useless with this change. We should document it as such and leave a TODO on the corresponding field of the ImageMetaProps object to remind us to remove it in a future version bump. We should also update the docs here and in glance to note its new uselessness.","commit_id":"9890b6b786aaa86ad636a5bac71936e3d77fd1f1"},{"author":{"_account_id":6962,"name":"Kashyap Chamarthy","email":"kchamart@redhat.com","username":"kashyapc"},"change_message_id":"04f5619248158f69ef6b3e6927965854581721f6","unresolved":false,"context_lines":[{"line_number":5111,"context_line":"    def _add_rng_device(self, guest, flavor, image_meta):"},{"line_number":5112,"context_line":"        rng_allowed_str \u003d flavor.extra_specs.get(\u0027hw_rng:allowed\u0027, True)"},{"line_number":5113,"context_line":"        rng_allowed \u003d strutils.bool_from_string(rng_allowed_str)"},{"line_number":5114,"context_line":"        if rng_allowed:"},{"line_number":5115,"context_line":"            rng_device \u003d vconfig.LibvirtConfigGuestRng()"},{"line_number":5116,"context_line":"            rate_bytes \u003d flavor.extra_specs.get(\u0027hw_rng:rate_bytes\u0027, 0)"},{"line_number":5117,"context_line":"            period \u003d flavor.extra_specs.get(\u0027hw_rng:rate_period\u0027, 0)"}],"source_content_type":"text/x-python","patch_set":10,"id":"3fa7e38b_c299601e","line":5114,"in_reply_to":"3fa7e38b_5716c54c","updated":"2020-01-20 10:12:01.000000000","message":"Whoops, I don\u0027t think we should remove the \u0027hw_rng_model\u0027 property.  When I wrote the above I didn\u0027t bear in mind that from libvirt 5.2.0 onwards, it now allows \"VirtIO transitional / non-transitional devices\"[1]—to choose whether you want to have compatibility with older guest operating systems, which in turn will decide the PCI topology.  With that the  possible values for \u0027hw_rng_model\u0027 will be:\n\n* virtio\n* virtio-transitional (since libvirt 5.2.0)\n* virtio-non-transitional (since libvirt 5.2.0)\n\n[1]  https://libvirt.org/formatdomain.html#elementsVirtioTransitional","commit_id":"9890b6b786aaa86ad636a5bac71936e3d77fd1f1"},{"author":{"_account_id":6962,"name":"Kashyap Chamarthy","email":"kchamart@redhat.com","username":"kashyapc"},"change_message_id":"ac0b05d3db82adc4b480e7807af8b42d146aa9c3","unresolved":false,"context_lines":[{"line_number":5111,"context_line":"    def _add_rng_device(self, guest, flavor, image_meta):"},{"line_number":5112,"context_line":"        rng_allowed_str \u003d flavor.extra_specs.get(\u0027hw_rng:allowed\u0027, True)"},{"line_number":5113,"context_line":"        rng_allowed \u003d strutils.bool_from_string(rng_allowed_str)"},{"line_number":5114,"context_line":"        if rng_allowed:"},{"line_number":5115,"context_line":"            rng_device \u003d vconfig.LibvirtConfigGuestRng()"},{"line_number":5116,"context_line":"            rate_bytes \u003d flavor.extra_specs.get(\u0027hw_rng:rate_bytes\u0027, 0)"},{"line_number":5117,"context_line":"            period \u003d flavor.extra_specs.get(\u0027hw_rng:rate_period\u0027, 0)"}],"source_content_type":"text/x-python","patch_set":10,"id":"3fa7e38b_5716c54c","line":5114,"in_reply_to":"3fa7e38b_81af1fdf","updated":"2020-01-15 15:59:50.000000000","message":"I can\u0027t think of a reason why someone does _not_ want an RNG device by default; I was trying to be cautious.  I\u0027d say we can unconditionally add the VirtIO-RNG device.\n\nOn change of semantics for \u0027hw_rng:allowed\u0027: yes, needs a reno.  And I\u0027ll wait for any other views before we consider dropping the extra spec altogether.\n\nOn \u0027hw_rng_model\u0027: yes, good reminders on documentation across the board (and eventual removal).","commit_id":"9890b6b786aaa86ad636a5bac71936e3d77fd1f1"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"43c33ad7151984a6cdafdf137b21610deaf34aba","unresolved":false,"context_lines":[{"line_number":5112,"context_line":"        rng_is_virtio \u003d image_meta.properties.get(\u0027hw_rng_model\u0027) \u003d\u003d \u0027virtio\u0027"},{"line_number":5113,"context_line":"        rng_allowed_str \u003d flavor.extra_specs.get(\u0027hw_rng:allowed\u0027, \u0027True\u0027)"},{"line_number":5114,"context_line":"        rng_allowed \u003d strutils.bool_from_string(rng_allowed_str)"},{"line_number":5115,"context_line":""},{"line_number":5116,"context_line":"        if not rng_is_virtio and not rng_allowed:"},{"line_number":5117,"context_line":"            return"},{"line_number":5118,"context_line":""},{"line_number":5119,"context_line":"        rng_device \u003d vconfig.LibvirtConfigGuestRng()"},{"line_number":5120,"context_line":"        rate_bytes \u003d flavor.extra_specs.get(\u0027hw_rng:rate_bytes\u0027, 0)"}],"source_content_type":"text/x-python","patch_set":11,"id":"3fa7e38b_314f5c36","line":5117,"range":{"start_line":5115,"start_character":0,"end_line":5117,"end_character":18},"updated":"2020-01-20 14:37:33.000000000","message":"ok so this is filtering out when it is explictly disaled in the flavor or an incorrect value is set in the image.\n\nrng_allowed makes sense however im not sure we need to check rng_is_virtio. the image property field is defiend to only allow virtio https://github.com/openstack/nova/blob/824bc358c25564ed6603d8f94587abd8902fe5af/nova/objects/fields.py#L481-L486 so if its set it must be virtio\n\nanyway this will definetly work and we are already doing \n\nrng_is_virtio \u003d image_meta.properties.get(\u0027hw_rng_model\u0027) \u003d\u003d \u0027virtio\u0027\n\nbut its not realy required we could jsut check if its set rather then the direct comparision to virtio.","commit_id":"9f5d6e64bd1e474a518d9c21328ade85810b04a7"},{"author":{"_account_id":6962,"name":"Kashyap Chamarthy","email":"kchamart@redhat.com","username":"kashyapc"},"change_message_id":"7b17402d0ba2901285bcb6c44ea0242dc33dd6bb","unresolved":false,"context_lines":[{"line_number":5112,"context_line":"        rng_is_virtio \u003d image_meta.properties.get(\u0027hw_rng_model\u0027) \u003d\u003d \u0027virtio\u0027"},{"line_number":5113,"context_line":"        rng_allowed_str \u003d flavor.extra_specs.get(\u0027hw_rng:allowed\u0027, \u0027True\u0027)"},{"line_number":5114,"context_line":"        rng_allowed \u003d strutils.bool_from_string(rng_allowed_str)"},{"line_number":5115,"context_line":""},{"line_number":5116,"context_line":"        if not rng_is_virtio and not rng_allowed:"},{"line_number":5117,"context_line":"            return"},{"line_number":5118,"context_line":""},{"line_number":5119,"context_line":"        rng_device \u003d vconfig.LibvirtConfigGuestRng()"},{"line_number":5120,"context_line":"        rate_bytes \u003d flavor.extra_specs.get(\u0027hw_rng:rate_bytes\u0027, 0)"}],"source_content_type":"text/x-python","patch_set":11,"id":"3fa7e38b_911ad07d","line":5117,"range":{"start_line":5115,"start_character":0,"end_line":5117,"end_character":18},"in_reply_to":"3fa7e38b_314f5c36","updated":"2020-01-20 15:12:44.000000000","message":"Yeah, I did it in one of the local iterations and forgot to keep it in.  So I will (a) tweak it to only check if \u0027hw_rng_model\u0027 is set; and (b) remove the \u0027rng_is_virtio\u0027 check from the \u0027if\u0027 conditional.  (In the config class, LibvirtConfiguGuestRng(), we set the self.device_model to \u0027virtio\u0027: https://github.com/openstack/nova/blob/master/nova/virt/libvirt/config.py#L3032)","commit_id":"9f5d6e64bd1e474a518d9c21328ade85810b04a7"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"1cf5b61f82ddcff7c4c149aa30cb6628ef4be634","unresolved":false,"context_lines":[{"line_number":5112,"context_line":"        rng_is_virtio \u003d image_meta.properties.get(\u0027hw_rng_model\u0027) \u003d\u003d \u0027virtio\u0027"},{"line_number":5113,"context_line":"        rng_allowed_str \u003d flavor.extra_specs.get(\u0027hw_rng:allowed\u0027, \u0027True\u0027)"},{"line_number":5114,"context_line":"        rng_allowed \u003d strutils.bool_from_string(rng_allowed_str)"},{"line_number":5115,"context_line":""},{"line_number":5116,"context_line":"        if not rng_is_virtio and not rng_allowed:"},{"line_number":5117,"context_line":"            return"},{"line_number":5118,"context_line":""},{"line_number":5119,"context_line":"        rng_device \u003d vconfig.LibvirtConfigGuestRng()"},{"line_number":5120,"context_line":"        rate_bytes \u003d flavor.extra_specs.get(\u0027hw_rng:rate_bytes\u0027, 0)"}],"source_content_type":"text/x-python","patch_set":11,"id":"3fa7e38b_9c8ae71b","line":5117,"range":{"start_line":5115,"start_character":0,"end_line":5117,"end_character":18},"in_reply_to":"3fa7e38b_911ad07d","updated":"2020-01-20 15:30:39.000000000","message":"i assume your going to do that in a FUP since its not in the v12 revision. anyway it was only a nit so no need to respin this again.","commit_id":"9f5d6e64bd1e474a518d9c21328ade85810b04a7"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"dca8e5ef4007dd07ac50ee99153123689d86d40c","unresolved":false,"context_lines":[{"line_number":5109,"context_line":"        guest.add_device(qga)"},{"line_number":5110,"context_line":""},{"line_number":5111,"context_line":"    def _add_rng_device(self, guest, flavor, image_meta):"},{"line_number":5112,"context_line":"        rng_is_virtio \u003d image_meta.properties.get(\u0027hw_rng_model\u0027, \u0027\u0027)"},{"line_number":5113,"context_line":"        rng_allowed_str \u003d flavor.extra_specs.get(\u0027hw_rng:allowed\u0027, \u0027True\u0027)"},{"line_number":5114,"context_line":"        rng_allowed \u003d strutils.bool_from_string(rng_allowed_str)"},{"line_number":5115,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"3fa7e38b_2396244c","line":5112,"range":{"start_line":5112,"start_character":65,"end_line":5112,"end_character":68},"updated":"2020-01-21 12:14:14.000000000","message":"False","commit_id":"768eca25f039b4341b2d0aa7793fb6e39313b2cb"},{"author":{"_account_id":6962,"name":"Kashyap Chamarthy","email":"kchamart@redhat.com","username":"kashyapc"},"change_message_id":"c321f6e6ededb98c2db77144587f276cbc468300","unresolved":false,"context_lines":[{"line_number":5109,"context_line":"        guest.add_device(qga)"},{"line_number":5110,"context_line":""},{"line_number":5111,"context_line":"    def _add_rng_device(self, guest, flavor, image_meta):"},{"line_number":5112,"context_line":"        rng_is_virtio \u003d image_meta.properties.get(\u0027hw_rng_model\u0027, \u0027\u0027)"},{"line_number":5113,"context_line":"        rng_allowed_str \u003d flavor.extra_specs.get(\u0027hw_rng:allowed\u0027, \u0027True\u0027)"},{"line_number":5114,"context_line":"        rng_allowed \u003d strutils.bool_from_string(rng_allowed_str)"},{"line_number":5115,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"3fa7e38b_fbb750f7","line":5112,"range":{"start_line":5112,"start_character":65,"end_line":5112,"end_character":68},"in_reply_to":"3fa7e38b_2396244c","updated":"2020-01-21 15:25:13.000000000","message":"In the next iter, I\u0027ve changed it to:\n\n    rng_is_virtio \u003d image_meta.properties.get(\u0027hw_rng_model\u0027) is not None\n\n(I.e. if the value is not get configured, the image_meta.properties.get() returns None.)","commit_id":"768eca25f039b4341b2d0aa7793fb6e39313b2cb"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"dca8e5ef4007dd07ac50ee99153123689d86d40c","unresolved":false,"context_lines":[{"line_number":5113,"context_line":"        rng_allowed_str \u003d flavor.extra_specs.get(\u0027hw_rng:allowed\u0027, \u0027True\u0027)"},{"line_number":5114,"context_line":"        rng_allowed \u003d strutils.bool_from_string(rng_allowed_str)"},{"line_number":5115,"context_line":""},{"line_number":5116,"context_line":"        if not rng_is_virtio and not rng_allowed:"},{"line_number":5117,"context_line":"            return"},{"line_number":5118,"context_line":""},{"line_number":5119,"context_line":"        rng_device \u003d vconfig.LibvirtConfigGuestRng()"}],"source_content_type":"text/x-python","patch_set":12,"id":"3fa7e38b_83c83875","line":5116,"range":{"start_line":5116,"start_character":29,"end_line":5116,"end_character":32},"updated":"2020-01-21 12:14:14.000000000","message":"this is not the negation of the original condition. that would be \n\n    not rng_is_virtio or not rng_allowed\n\nSo in the baseline we only added the device if \u0027hw_rng_model\u0027 was \u0027virtio\u0027 and the \u0027hw_rng:allowed\u0027 was True. But now if the \u0027hw_rng:allowed\u0027 is True but the \u0027hw_rng_model\u0027 is non virtio then we go ahead and add the device.","commit_id":"768eca25f039b4341b2d0aa7793fb6e39313b2cb"},{"author":{"_account_id":6962,"name":"Kashyap Chamarthy","email":"kchamart@redhat.com","username":"kashyapc"},"change_message_id":"c321f6e6ededb98c2db77144587f276cbc468300","unresolved":false,"context_lines":[{"line_number":5113,"context_line":"        rng_allowed_str \u003d flavor.extra_specs.get(\u0027hw_rng:allowed\u0027, \u0027True\u0027)"},{"line_number":5114,"context_line":"        rng_allowed \u003d strutils.bool_from_string(rng_allowed_str)"},{"line_number":5115,"context_line":""},{"line_number":5116,"context_line":"        if not rng_is_virtio and not rng_allowed:"},{"line_number":5117,"context_line":"            return"},{"line_number":5118,"context_line":""},{"line_number":5119,"context_line":"        rng_device \u003d vconfig.LibvirtConfigGuestRng()"}],"source_content_type":"text/x-python","patch_set":12,"id":"3fa7e38b_5bbea4ce","line":5116,"range":{"start_line":5116,"start_character":29,"end_line":5116,"end_character":32},"in_reply_to":"3fa7e38b_83c83875","updated":"2020-01-21 15:25:13.000000000","message":"Yes, the actual negation would be \u0027or\u0027.  However, we _do_ need the \u0027and\u0027 here.  (The `hw_rng_model` property will have no effect _unless_ `hw_rng:allowed` is \u0027True\u0027.)  Also \u0027hw_rng_model\u0027 allows only \u0027virtio\u0027 currently: https://github.com/openstack/nova/blob/824bc358c25564ed6603d8f94587abd8902fe5af/nova/objects/fields.py#L481-L486","commit_id":"768eca25f039b4341b2d0aa7793fb6e39313b2cb"}],"releasenotes/notes/virtio-rng-by-default-9cc1366ed1634129.yaml":[{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"dca8e5ef4007dd07ac50ee99153123689d86d40c","unresolved":false,"context_lines":[{"line_number":6,"context_line":"    default.  This is to ensure guests are not starved of entropy during"},{"line_number":7,"context_line":"    boot time.  In case you want to *disallow* setting an RNG device for"},{"line_number":8,"context_line":"    some reason, it can be done by setting the flavor Extra Spec"},{"line_number":9,"context_line":"    property ``hw_rng:allowed\u0027`` to ``False``."}],"source_content_type":"text/x-yaml","patch_set":12,"id":"3fa7e38b_a3de940c","line":9,"range":{"start_line":9,"start_character":29,"end_line":9,"end_character":30},"updated":"2020-01-21 12:14:14.000000000","message":"unmatched single quote","commit_id":"768eca25f039b4341b2d0aa7793fb6e39313b2cb"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"a24f072a6f5cba2c2a2ad140202afff6e43b083a","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    With Ussuri release onwards, when using the libvirt driver, Nova"},{"line_number":5,"context_line":"    instances will get a VirtIO-RNG (Random Number Generator) device by"},{"line_number":6,"context_line":"    default.  This is to ensure guests are not starved of entropy during"},{"line_number":7,"context_line":"    boot time.  In case you want to *disallow* setting an RNG device for"}],"source_content_type":"text/x-yaml","patch_set":16,"id":"3fa7e38b_5310a758","line":4,"range":{"start_line":4,"start_character":4,"end_line":4,"end_character":34},"updated":"2020-01-23 12:21:53.000000000","message":"This could/should be dropped. It\u0027s already obvious from the place it appears in release notes and would be problematic if we ever chose to backport this.","commit_id":"391031417f6411049eac07fcfb29a6793e1ce94a"},{"author":{"_account_id":6962,"name":"Kashyap Chamarthy","email":"kchamart@redhat.com","username":"kashyapc"},"change_message_id":"253c86cf7e8479ef82b3579d0a8f078667568639","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    With Ussuri release onwards, when using the libvirt driver, Nova"},{"line_number":5,"context_line":"    instances will get a VirtIO-RNG (Random Number Generator) device by"},{"line_number":6,"context_line":"    default.  This is to ensure guests are not starved of entropy during"},{"line_number":7,"context_line":"    boot time.  In case you want to *disallow* setting an RNG device for"}],"source_content_type":"text/x-yaml","patch_set":16,"id":"3fa7e38b_2e0024ff","line":4,"range":{"start_line":4,"start_character":4,"end_line":4,"end_character":34},"in_reply_to":"3fa7e38b_5310a758","updated":"2020-01-23 12:23:39.000000000","message":"Yeah, I hesitated about that already; let me fix it real quick.","commit_id":"391031417f6411049eac07fcfb29a6793e1ce94a"}]}
