Skip to content

Commit

Permalink
Add ask whether to continue the upgrade without RPM (fix #24)
Browse files Browse the repository at this point in the history
  • Loading branch information
jfut committed Feb 28, 2020
1 parent 93d08c4 commit b3d0f24
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
diff -urN ganeti-2.16.1.default/lib/client/gnt_cluster.py ganeti-2.16.1/lib/client/gnt_cluster.py
--- ganeti-2.16.1.default/lib/client/gnt_cluster.py 2019-04-01 15:29:37.000000000 +0900
+++ ganeti-2.16.1/lib/client/gnt_cluster.py 2020-02-28 14:38:17.455632899 +0900
@@ -2376,6 +2376,11 @@
" has to be given")
return 1

+ usertext = ("This Ganeti is installed by RPM package, so it is recommended"
+ " to upgrade using RPM. Continue?")
+ if not AskUser(usertext):
+ return 1
+
# If we're not told to resume, verify there is no upgrade
# in progress.
if not opts.resume:
3 changes: 3 additions & 0 deletions rpmbuild/ganeti/SPECS/ganeti.spec
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ Patch5: ganeti-2.16.1-fix-new-cluster-node-certificates.patch
Patch6: ganeti-2.16.1-default-kvmd-args.patch
Patch7: ganeti-2.16.1-rapi-require-authentication.patch
Patch8: ganeti-2.16.1-systemd-ambient-capabilities.patch
Patch9: ganeti-2.16.1-ask-whether-upgrade-without-rpm.patch

BuildRequires: python
BuildRequires: pyOpenSSL
Expand Down Expand Up @@ -145,6 +146,7 @@ It is not required when the init system used is systemd.
%patch6 -p1
%patch7 -p1
%patch8 -p1
%patch9 -p1

%build
%configure \
Expand Down Expand Up @@ -256,6 +258,7 @@ rm -rf ${RPM_BUILD_ROOT}
%changelog
* Fri Feb 28 2020 Jun Futagawa <[email protected]> - 2.16.1-3
- Add AmbientCapabilities in ganeti-metad.service (#26)
- Add ask whether to continue the upgrade without RPM (#24)

* Tue Feb 25 2020 Jun Futagawa <[email protected]> - 2.16.1-2
- Add build dependencies for metad and mond and enable them in the build (#25, thanks @ramereth)
Expand Down

0 comments on commit b3d0f24

Please sign in to comment.