{"push_id":2396067649,"size":9,"distinct_size":1,"ref":"refs/heads/shutdown-retry-interval","head":"019b8f8b406dbe6a80cd7aab7da3a5c4ad27d534","before":"0b4b958448aba4445de36400ab1d8e7b1a2e035c","commits":[{"sha":"0e9cd6c4d66ca4afb95bb60edb412af9e96c546e","author":{"name":"Brooks Kaminski","email":"e693cf339cb01e8166e843e2978e19e9dcf98baf@rackspace.com"},"message":"XenAPI: XCP2.1+ Swallow VDI_NOT_IN_MAP Exception\n\nChanges within XenAPI have enforced a more strict policy when checking\nassert_can_migrate.  In particular when checking the source_vdi:dest_sr\nmapping it insists that the SR actually exist.  This is not a problem for\nlocal disks, however this assertation is called extremely early in the\nlive migration process (check_can_migrate_source) which is called from\nconductor, which makes a problem for attached volumes.\n\nThis early in the process the host has just barely been chosen and no SR\ninformation has been configured yet for these volumes or their initiators.\nAdditionally we cannot prepare this SR any earlier as BDM information is\nnot set up until the pre_live_migration method. With the options to either\nskip this assertion completely or swallow the exception, I have chosen to\nswallow the exception.  My reasons for this are two-fold:\n\n1. --block-migration can be called without regard for whether an iSCSI\nvolume is attached, and we still want to ensure that VIF, CPU and other\nfactors are checked, and not just skip all checks entirely.\n2. Currently the Assert only exists within the --block-migration code\nbase but this needs to change. A future commit will remove this logic\nto ensure that the commit runs without this flag. Once that is done we\nwant to be able to continue to use this Exception swallow logic rather\nthan continuing to skip the assert for all XCP2.1.0+ even without volumes.\n\nThis decision should help us handle less work in a future commit and does not\nseem to align with the goals of that commit, where it does align properly here.\nThis commit still changes very little of the current codebase and puts us in\na good position to refactor the way this is handled at a later date, while\nadding a TODO note to correct VM.assert_can_migrate only running during a\nblock migration.\n\nAdditionally there seems to be some confusion that the mapping data that is\ngenerated during this initial trip through _call_live_migrate_command is needed\nto continue along the code, however this data appears to be purely used to send\nthe mapping information through the assertation call, and is then discarded.\nThe only data returned from these methods is the original dest_data which\nis carried into the live_migration method. The _call_live_migration method is\ncalled again during the live_migration() method, and during this time it does\nneed that mapping to send along to XenAPI for the actual migration, but not\nyet. Because this codebase is so confusing, I am providing a little bit of\ncontext on the movement of these variables with some psuedocode:\n\n---CONDUCTOR.TASKS.LIVE_MIGRATE---\nLiveMigrationTask.Execute()\n\tself._find_destination() <-----\n\tUnrelated Work\n\tcompute.live_migration(self, host, instance, destination,\n\t\t\t       block_migrate, migration, migrate_data)\n\nLiveMigrationTask._find_destination()\n\tScheduler Things.  Gets a Dest ref.\n\t_check_compatible_with_source_hyp\n\t_call_livem_checks_on_host(host) <-----\n\t\t_check_can_live_migrate_destination()\n\treturns Host Node Name and Host Compute.  That's all.\n\n---COMPUTE.MANAGER---\n_do / _check_live_migration_destination\n\tdest_check_data = xenops.can_live_migrate_destination\n\n\t(Checks for the Assert)\n\ttry:\n\t\tmigrate_data = check_can_live_migrate_source(dest_check_data)\n\n\treturn migrate_data\n\n---VMOPS--\ncheck_can_migrate_source(self, ctxt, instance_ref, dest_check_data)\n\tif block_migration:\n\t\t_call_live_migration_command(assert_can_migrate)\n\t\t\t_generate_vdi_map()\n\t\t\t\tDoes NOT return\n\t\t\tALSO Does NOT return\nreturn dest_check_data\n\nThe changes made to address this issue are a fairly simple oslo_utils\nversion check. To pull this data I created two new host related methods\nwithin VMops as well as a new import of oslo_config.versionutils.\nI believe these methods ultimately belong in the xenapi.host class, but\nfor two very small methods I believed it better to avoid such a large import\nto get minimal data.\n\nFinally, an adjustment to the Fake XenAPI driver had to be made as it currently\ndoes not include the host details beyond hostname environment in the\ncreate_host check.  The change amends the stub dictionary to include this data.\n\nChange-Id: Ie5295564a68f877fc061376c00f3fa706370a251\nCloses-Bug: #1704071","distinct":false,"url":"https://api.github.com/repos/RaoulHC/nova/commits/0e9cd6c4d66ca4afb95bb60edb412af9e96c546e"},{"sha":"c52d34f1b46f88ae2786cfb873f9b12a1a01b629","author":{"name":"Balazs Gibizer","email":"3ca90a7a61626546187e313311ea1b1da1ea892d@ericsson.com"},"message":"Raise a proper exception in unit test\n\nUsing the raise statement without parameter outside of an except block\nis not a valid python constuct. The original intention was to simulate\na failure to see if the context manager handles it properly. This patch\nreplaces that invalid statement with a proper exception raise.\n\nTrivialFix\n\nChange-Id: I3c6fc0ab617796c70bac2a853504f46ae2adb536\nCloses-Bug: #1754409","distinct":false,"url":"https://api.github.com/repos/RaoulHC/nova/commits/c52d34f1b46f88ae2786cfb873f9b12a1a01b629"},{"sha":"a4a04a6a4d55f9d10ff809db53398d5c05186030","author":{"name":"Thomas Goirand","email":"569764fda7b64ecab20837cb59fffef5c3808a95@debian.org"},"message":"Make nova build reproducible\n\nWhilst working on the Reproducible Builds effort [0], the team\nnoticed that nova could not be built reproducibly as the docs etc\ncontain the absolute build path.\n\nThis was originally filed in Debian as #892420 [1], and I'm here\nonly forwarding the patch.\n\n [0] https://reproducible-builds.org/\n [1] https://bugs.debian.org/892420\n\nChange-Id: Ia50c549da9e8ca44d19adb72dd87711da00df210\nSigned-off-by: Chris Lamb <lamby@debian.org>","distinct":false,"url":"https://api.github.com/repos/RaoulHC/nova/commits/a4a04a6a4d55f9d10ff809db53398d5c05186030"},{"sha":"fcda5c2d1a8653242e580cc2c00d130a5d4f4e2e","author":{"name":"David Rabel","email":"0485fd159805803ea3f6fa5df163069cb88ba985@b1-systems.de"},"message":"Fix indentation in doc/source/cli/*\n\nCurrent indentation was wrongly interpreted as quotes.\n\nChange-Id: I731d8833e69e6bed12f5637d6bb3248b890c18ab","distinct":false,"url":"https://api.github.com/repos/RaoulHC/nova/commits/fcda5c2d1a8653242e580cc2c00d130a5d4f4e2e"},{"sha":"2d738f7082616d418412968564abd0674acddda3","author":{"name":"OpenStack Proposal Bot","email":"72e85dd038dd9f7feff502caf6a8bd817c5004ad@lists.openstack.org"},"message":"Updated from global requirements\n\nChange-Id: Ibe70f1f60180a7c8da9887e4466dd1e1d25b157f","distinct":false,"url":"https://api.github.com/repos/RaoulHC/nova/commits/2d738f7082616d418412968564abd0674acddda3"},{"sha":"d7c46b279686308f5431410bfccb3e40031e380a","author":{"name":"Zuul","email":"b5147e09c50e2df98187d616e488bd7083ad47b4@review.openstack.org"},"message":"Merge \"Raise a proper exception in unit test\"","distinct":false,"url":"https://api.github.com/repos/RaoulHC/nova/commits/d7c46b279686308f5431410bfccb3e40031e380a"},{"sha":"4f29ee379777a9a84a69555d352e92fa3a357fcf","author":{"name":"Zuul","email":"b5147e09c50e2df98187d616e488bd7083ad47b4@review.openstack.org"},"message":"Merge \"XenAPI: XCP2.1+ Swallow VDI_NOT_IN_MAP Exception\"","distinct":false,"url":"https://api.github.com/repos/RaoulHC/nova/commits/4f29ee379777a9a84a69555d352e92fa3a357fcf"},{"sha":"a0dc24dc1a63ecaf9737fbd5ed14f583322d27fd","author":{"name":"Zuul","email":"b5147e09c50e2df98187d616e488bd7083ad47b4@review.openstack.org"},"message":"Merge \"Make nova build reproducible\"","distinct":false,"url":"https://api.github.com/repos/RaoulHC/nova/commits/a0dc24dc1a63ecaf9737fbd5ed14f583322d27fd"},{"sha":"019b8f8b406dbe6a80cd7aab7da3a5c4ad27d534","author":{"name":"Raoul Hidalgo Charman","email":"a24b6b3c23c9ca904da6eb513c094c7f8b999a5b@gmail.com"},"message":"Expose shutdown retry interval as config setting\n\nThis option is in the driver interface but was hard coded in the manager\nclass.\n\nDefaults to old value (10 seconds) if not set in configuration file.","distinct":true,"url":"https://api.github.com/repos/RaoulHC/nova/commits/019b8f8b406dbe6a80cd7aab7da3a5c4ad27d534"}]}
{"actor":{"display_login":"RaoulHC"}}