Revision c09c495c
b/lib/client/gnt_cluster.py | ||
---|---|---|
1867 | 1867 |
return (True, rollback) |
1868 | 1868 |
|
1869 | 1869 |
|
1870 |
def _VersionSpecificDowngrade(): |
|
1871 |
""" |
|
1872 |
Perform any additional downrade tasks that are version specific |
|
1873 |
and need to be done just after the configuration downgrade. This |
|
1874 |
function needs to be idempotent, so that it can be redone if the |
|
1875 |
downgrade procedure gets interrupted after changing the |
|
1876 |
configuration. |
|
1877 |
|
|
1878 |
Note that this function has to be reset with every version bump. |
|
1879 |
|
|
1880 |
@return: True upon success |
|
1881 |
""" |
|
1882 |
ToStdout("Performing version-specific downgrade tasks.") |
|
1883 |
|
|
1884 |
return True |
|
1885 |
|
|
1886 |
|
|
1870 | 1887 |
def _SwitchVersionAndConfig(versionstring, downgrade): |
1871 | 1888 |
""" |
1872 | 1889 |
Switch to the new Ganeti version and change the configuration, |
... | ... | |
1886 | 1903 |
ToStdout("Downgrading configuration") |
1887 | 1904 |
if not _RunCommandAndReport([pathutils.CFGUPGRADE, "--downgrade", "-f"]): |
1888 | 1905 |
return (False, rollback) |
1906 |
# Note: version specific downgrades need to be done before switching |
|
1907 |
# binaries, so that we still have the knowledgeable binary if the downgrade |
|
1908 |
# process gets interrupted at this point. |
|
1909 |
if not _VersionSpecificDowngrade(): |
|
1910 |
return (False, rollback) |
|
1889 | 1911 |
|
1890 | 1912 |
# Configuration change is the point of no return. From then onwards, it is |
1891 | 1913 |
# safer to push through the up/dowgrade than to try to roll it back. |
Also available in: Unified diff