Commit 9cac2a8
committed
libvirt: Do not destroy volume secrets during _hard_reboot
Ia2007bc63ef09931ea0197cef29d6a5614ed821a unfortunately missed that
resume_state_on_host_boot calls down into _hard_reboot always removing
volume secrets rendering that change useless.
This change seeks to address this by using the destroy_secrets kwarg
introduced by I856268b371f7ba712b02189db3c927cd762a4dc3 within the
_hard_reboot method of the libvirt driver to ensure secrets are not
removed during a hard reboot.
This resolves the original issue in bug #1905701 *and* allows admins to
hard reboot a users instance when that instance has encrypted volumes
attached with secrets stored in Barbican. This latter use case being
something we can easily test within tempest unlike the compute reboot in
bug #1905701.
This change is kept small as it should ideally be backported alongside
Ia2007bc63ef09931ea0197cef29d6a5614ed821a to stable/queens. Follow up
changes on master will improve formatting, doc text and introduce
functional tests to further validate this new behaviour of hard reboot
within the libvirt driver.
Closes-Bug: #1905701
Change-Id: I3d1b21ba6eb3f5eb728693197c24b4b315eef821
(cherry picked from commit 26d65fc)1 parent f2ba671 commit 9cac2a8
File tree
2 files changed
+124
-11
lines changed- nova
- tests/unit/virt/libvirt
- virt/libvirt
2 files changed
+124
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9046 | 9046 | | |
9047 | 9047 | | |
9048 | 9048 | | |
| 9049 | + | |
| 9050 | + | |
| 9051 | + | |
| 9052 | + | |
| 9053 | + | |
| 9054 | + | |
| 9055 | + | |
| 9056 | + | |
| 9057 | + | |
| 9058 | + | |
| 9059 | + | |
| 9060 | + | |
| 9061 | + | |
9049 | 9062 | | |
9050 | 9063 | | |
9051 | 9064 | | |
| |||
10109 | 10122 | | |
10110 | 10123 | | |
10111 | 10124 | | |
| 10125 | + | |
| 10126 | + | |
| 10127 | + | |
| 10128 | + | |
| 10129 | + | |
| 10130 | + | |
| 10131 | + | |
| 10132 | + | |
| 10133 | + | |
| 10134 | + | |
| 10135 | + | |
| 10136 | + | |
| 10137 | + | |
| 10138 | + | |
| 10139 | + | |
| 10140 | + | |
| 10141 | + | |
| 10142 | + | |
| 10143 | + | |
| 10144 | + | |
| 10145 | + | |
| 10146 | + | |
| 10147 | + | |
| 10148 | + | |
| 10149 | + | |
| 10150 | + | |
| 10151 | + | |
| 10152 | + | |
| 10153 | + | |
| 10154 | + | |
10112 | 10155 | | |
10113 | 10156 | | |
10114 | 10157 | | |
| |||
15710 | 15753 | | |
15711 | 15754 | | |
15712 | 15755 | | |
15713 | | - | |
| 15756 | + | |
| 15757 | + | |
15714 | 15758 | | |
15715 | 15759 | | |
15716 | 15760 | | |
| |||
15730 | 15774 | | |
15731 | 15775 | | |
15732 | 15776 | | |
15733 | | - | |
| 15777 | + | |
| 15778 | + | |
15734 | 15779 | | |
15735 | 15780 | | |
15736 | 15781 | | |
| |||
15951 | 15996 | | |
15952 | 15997 | | |
15953 | 15998 | | |
15954 | | - | |
| 15999 | + | |
| 16000 | + | |
15955 | 16001 | | |
15956 | 16002 | | |
15957 | 16003 | | |
| |||
19236 | 19282 | | |
19237 | 19283 | | |
19238 | 19284 | | |
| 19285 | + | |
| 19286 | + | |
| 19287 | + | |
| 19288 | + | |
| 19289 | + | |
| 19290 | + | |
| 19291 | + | |
| 19292 | + | |
| 19293 | + | |
| 19294 | + | |
| 19295 | + | |
| 19296 | + | |
| 19297 | + | |
| 19298 | + | |
| 19299 | + | |
| 19300 | + | |
| 19301 | + | |
| 19302 | + | |
| 19303 | + | |
| 19304 | + | |
| 19305 | + | |
| 19306 | + | |
| 19307 | + | |
| 19308 | + | |
| 19309 | + | |
| 19310 | + | |
| 19311 | + | |
| 19312 | + | |
| 19313 | + | |
| 19314 | + | |
| 19315 | + | |
| 19316 | + | |
| 19317 | + | |
| 19318 | + | |
| 19319 | + | |
| 19320 | + | |
| 19321 | + | |
| 19322 | + | |
| 19323 | + | |
| 19324 | + | |
| 19325 | + | |
| 19326 | + | |
| 19327 | + | |
| 19328 | + | |
| 19329 | + | |
| 19330 | + | |
| 19331 | + | |
| 19332 | + | |
| 19333 | + | |
| 19334 | + | |
| 19335 | + | |
| 19336 | + | |
| 19337 | + | |
19239 | 19338 | | |
19240 | 19339 | | |
19241 | 19340 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1408 | 1408 | | |
1409 | 1409 | | |
1410 | 1410 | | |
1411 | | - | |
| 1411 | + | |
1412 | 1412 | | |
1413 | 1413 | | |
1414 | 1414 | | |
| |||
1482 | 1482 | | |
1483 | 1483 | | |
1484 | 1484 | | |
1485 | | - | |
| 1485 | + | |
| 1486 | + | |
1486 | 1487 | | |
1487 | 1488 | | |
1488 | 1489 | | |
1489 | | - | |
| 1490 | + | |
1490 | 1491 | | |
1491 | 1492 | | |
1492 | 1493 | | |
| |||
1527 | 1528 | | |
1528 | 1529 | | |
1529 | 1530 | | |
1530 | | - | |
| 1531 | + | |
| 1532 | + | |
| 1533 | + | |
1531 | 1534 | | |
1532 | 1535 | | |
1533 | 1536 | | |
| |||
1844 | 1847 | | |
1845 | 1848 | | |
1846 | 1849 | | |
1847 | | - | |
1848 | | - | |
| 1850 | + | |
| 1851 | + | |
| 1852 | + | |
| 1853 | + | |
| 1854 | + | |
| 1855 | + | |
| 1856 | + | |
1849 | 1857 | | |
1850 | 1858 | | |
1851 | 1859 | | |
| |||
1958 | 1966 | | |
1959 | 1967 | | |
1960 | 1968 | | |
1961 | | - | |
| 1969 | + | |
| 1970 | + | |
1962 | 1971 | | |
1963 | 1972 | | |
1964 | 1973 | | |
| |||
1970 | 1979 | | |
1971 | 1980 | | |
1972 | 1981 | | |
| 1982 | + | |
| 1983 | + | |
| 1984 | + | |
1973 | 1985 | | |
| 1986 | + | |
1974 | 1987 | | |
1975 | 1988 | | |
1976 | 1989 | | |
| |||
3726 | 3739 | | |
3727 | 3740 | | |
3728 | 3741 | | |
3729 | | - | |
| 3742 | + | |
| 3743 | + | |
3730 | 3744 | | |
3731 | 3745 | | |
3732 | 3746 | | |
| |||
0 commit comments