summaryrefslogtreecommitdiff
path: root/gnu/packages/patches
diff options
context:
space:
mode:
authorMarius Bakke <marius@gnu.org>2021-10-10 13:54:07 +0200
committerMarius Bakke <marius@gnu.org>2021-10-11 18:59:44 +0200
commit93f69b02a290e0c82a4d166d84e1cbe056e6cc18 (patch)
tree8adc72153ae647cffbf5cad1eb5e75fd0ee55599 /gnu/packages/patches
parentfafa127d80d41df8afe96357ab30ec3dc6499122 (diff)
gnu: ganeti: Update to 3.0.1.
* gnu/packages/virtualization.scm (ganeti): Update to 3.0.1. [source](patches): Remove obsolete. * gnu/tests/ganeti.scm (%ganeti-os): Adjust network configuration so QEMU port forwarding can work. (run-ganeti-test): Remove unused port mapping. Adjust and enable previously failing test. * gnu/packages/patches/ganeti-deterministic-manual.patch, gnu/packages/patches/ganeti-drbd-compat.patch, gnu/packages/patches/ganeti-os-disk-size.patch: Delete files. * gnu/local.mk (dist_patch_DATA): Adjust accordingly.
Diffstat (limited to 'gnu/packages/patches')
-rw-r--r--gnu/packages/patches/ganeti-deterministic-manual.patch16
-rw-r--r--gnu/packages/patches/ganeti-drbd-compat.patch166
-rw-r--r--gnu/packages/patches/ganeti-os-disk-size.patch17
3 files changed, 0 insertions, 199 deletions
diff --git a/gnu/packages/patches/ganeti-deterministic-manual.patch b/gnu/packages/patches/ganeti-deterministic-manual.patch
deleted file mode 100644
index 2d90aa740e..0000000000
--- a/gnu/packages/patches/ganeti-deterministic-manual.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-Sort the ecode list in the gnt-cluster manual for deterministic results.
-
-Submitted upstream: <https://github.com/ganeti/ganeti/pull/1504>.
-
-diff --git a/lib/build/sphinx_ext.py b/lib/build/sphinx_ext.py
---- a/lib/build/sphinx_ext.py
-+++ b/lib/build/sphinx_ext.py
-@@ -108,7 +108,7 @@ CV_ECODES_DOC = "ecodes"
- # pylint: disable=W0621
- CV_ECODES_DOC_LIST = [(name, doc) for (_, name, doc) in constants.CV_ALL_ECODES]
- DOCUMENTED_CONSTANTS = {
-- CV_ECODES_DOC: CV_ECODES_DOC_LIST,
-+ CV_ECODES_DOC: sorted(CV_ECODES_DOC_LIST, key=lambda tup: tup[0]),
- }
-
-
diff --git a/gnu/packages/patches/ganeti-drbd-compat.patch b/gnu/packages/patches/ganeti-drbd-compat.patch
deleted file mode 100644
index 32f46bc7ed..0000000000
--- a/gnu/packages/patches/ganeti-drbd-compat.patch
+++ /dev/null
@@ -1,166 +0,0 @@
-This patch adds support for newer versions of DRBD.
-
-Submitted upstream: <https://github.com/ganeti/ganeti/pull/1496>.
-
-diff --git a/lib/storage/drbd.py b/lib/storage/drbd.py
---- a/lib/storage/drbd.py
-+++ b/lib/storage/drbd.py
-@@ -315,6 +315,13 @@ class DRBD8Dev(base.BlockDev):
- """
- return self._show_info_cls.GetDevInfo(self._GetShowData(minor))
-
-+ @staticmethod
-+ def _NeedsLocalSyncerParams():
-+ # For DRBD >= 8.4, syncer init must be done after local, not in net.
-+ info = DRBD8.GetProcInfo()
-+ version = info.GetVersion()
-+ return version["k_minor"] >= 4
-+
- def _MatchesLocal(self, info):
- """Test if our local config matches with an existing device.
-
-@@ -397,6 +404,20 @@ class DRBD8Dev(base.BlockDev):
- base.ThrowError("drbd%d: can't attach local disk: %s",
- minor, result.output)
-
-+ def _WaitForMinorSyncParams():
-+ """Call _SetMinorSyncParams and raise RetryAgain on errors.
-+ """
-+ if self._SetMinorSyncParams(minor, self.params):
-+ raise utils.RetryAgain()
-+
-+ if self._NeedsLocalSyncerParams():
-+ # Retry because disk config for DRBD resource may be still uninitialized.
-+ try:
-+ utils.Retry(_WaitForMinorSyncParams, 1.0, 5.0)
-+ except utils.RetryTimeout as e:
-+ base.ThrowError("drbd%d: can't set the synchronization parameters: %s" %
-+ (minor, utils.CommaJoin(e.args[0])))
-+
- def _AssembleNet(self, minor, net_info, dual_pri=False, hmac=None,
- secret=None):
- """Configure the network part of the device.
-@@ -432,21 +453,24 @@ class DRBD8Dev(base.BlockDev):
- # sync speed only after setting up both sides can race with DRBD
- # connecting, hence we set it here before telling DRBD anything
- # about its peer.
-- sync_errors = self._SetMinorSyncParams(minor, self.params)
-- if sync_errors:
-- base.ThrowError("drbd%d: can't set the synchronization parameters: %s" %
-- (minor, utils.CommaJoin(sync_errors)))
-+
-+ if not self._NeedsLocalSyncerParams():
-+ sync_errors = self._SetMinorSyncParams(minor, self.params)
-+ if sync_errors:
-+ base.ThrowError("drbd%d: can't set the synchronization parameters: %s" %
-+ (minor, utils.CommaJoin(sync_errors)))
-
- family = self._GetNetFamily(minor, lhost, rhost)
-
-- cmd = self._cmd_gen.GenNetInitCmd(minor, family, lhost, lport,
-+ cmds = self._cmd_gen.GenNetInitCmds(minor, family, lhost, lport,
- rhost, rport, protocol,
- dual_pri, hmac, secret, self.params)
-
-- result = utils.RunCmd(cmd)
-- if result.failed:
-- base.ThrowError("drbd%d: can't setup network: %s - %s",
-- minor, result.fail_reason, result.output)
-+ for cmd in cmds:
-+ result = utils.RunCmd(cmd)
-+ if result.failed:
-+ base.ThrowError("drbd%d: can't setup network: %s - %s",
-+ minor, result.fail_reason, result.output)
-
- def _CheckNetworkConfig():
- info = self._GetShowInfo(minor)
-@@ -463,19 +487,20 @@ class DRBD8Dev(base.BlockDev):
- base.ThrowError("drbd%d: timeout while configuring network", minor)
-
- # Once the assembly is over, try to set the synchronization parameters
-- try:
-- # The minor may not have been set yet, requiring us to set it at least
-- # temporarily
-- old_minor = self.minor
-- self._SetFromMinor(minor)
-- sync_errors = self.SetSyncParams(self.params)
-- if sync_errors:
-- base.ThrowError("drbd%d: can't set the synchronization parameters: %s" %
-- (self.minor, utils.CommaJoin(sync_errors)))
-- finally:
-- # Undo the change, regardless of whether it will have to be done again
-- # soon
-- self._SetFromMinor(old_minor)
-+ if not self._NeedsLocalSyncerParams():
-+ try:
-+ # The minor may not have been set yet, requiring us to set it at least
-+ # temporarily
-+ old_minor = self.minor
-+ self._SetFromMinor(minor)
-+ sync_errors = self.SetSyncParams(self.params)
-+ if sync_errors:
-+ base.ThrowError("drbd%d: can't set the synchronization parameters: %s" %
-+ (self.minor, utils.CommaJoin(sync_errors)))
-+ finally:
-+ # Undo the change, regardless of whether it will have to be done again
-+ # soon
-+ self._SetFromMinor(old_minor)
-
- @staticmethod
- def _GetNetFamily(minor, lhost, rhost):
-diff --git a/lib/storage/drbd_cmdgen.py b/lib/storage/drbd_cmdgen.py
---- a/lib/storage/drbd_cmdgen.py
-+++ b/lib/storage/drbd_cmdgen.py
-@@ -56,7 +56,7 @@ class BaseDRBDCmdGenerator(object):
- def GenLocalInitCmds(self, minor, data_dev, meta_dev, size_mb, params):
- raise NotImplementedError
-
-- def GenNetInitCmd(self, minor, family, lhost, lport, rhost, rport, protocol,
-+ def GenNetInitCmds(self, minor, family, lhost, lport, rhost, rport, protocol,
- dual_pri, hmac, secret, params):
- raise NotImplementedError
-
-@@ -138,7 +138,7 @@ class DRBD83CmdGenerator(BaseDRBDCmdGenerator):
-
- return [args]
-
-- def GenNetInitCmd(self, minor, family, lhost, lport, rhost, rport, protocol,
-+ def GenNetInitCmds(self, minor, family, lhost, lport, rhost, rport, protocol,
- dual_pri, hmac, secret, params):
- args = ["drbdsetup", self._DevPath(minor), "net",
- "%s:%s:%s" % (family, lhost, lport),
-@@ -155,7 +155,7 @@ class DRBD83CmdGenerator(BaseDRBDCmdGenerator):
- if params[constants.LDP_NET_CUSTOM]:
- args.extend(shlex.split(params[constants.LDP_NET_CUSTOM]))
-
-- return args
-+ return [args]
-
- def GenSyncParamsCmd(self, minor, params):
- args = ["drbdsetup", self._DevPath(minor), "syncer"]
-@@ -345,8 +345,14 @@ class DRBD84CmdGenerator(BaseDRBDCmdGenerator):
-
- return cmds
-
-- def GenNetInitCmd(self, minor, family, lhost, lport, rhost, rport, protocol,
-+ def GenNetInitCmds(self, minor, family, lhost, lport, rhost, rport, protocol,
- dual_pri, hmac, secret, params):
-+ cmds = []
-+
-+ cmds.append(["drbdsetup", "new-resource", self._GetResource(minor)])
-+ cmds.append(["drbdsetup", "new-minor", self._GetResource(minor),
-+ str(minor), "0"])
-+
- args = ["drbdsetup", "connect", self._GetResource(minor),
- "%s:%s:%s" % (family, lhost, lport),
- "%s:%s:%s" % (family, rhost, rport),
-@@ -362,7 +368,8 @@ class DRBD84CmdGenerator(BaseDRBDCmdGenerator):
- if params[constants.LDP_NET_CUSTOM]:
- args.extend(shlex.split(params[constants.LDP_NET_CUSTOM]))
-
-- return args
-+ cmds.append(args)
-+ return cmds
-
- def GenSyncParamsCmd(self, minor, params):
- args = ["drbdsetup", "disk-options", minor]
diff --git a/gnu/packages/patches/ganeti-os-disk-size.patch b/gnu/packages/patches/ganeti-os-disk-size.patch
deleted file mode 100644
index 16b1d7615c..0000000000
--- a/gnu/packages/patches/ganeti-os-disk-size.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-This exposes information about disk sizes to OS install scripts. instance-guix
-uses this if available to determine the size of the VM image.
-
-Submitted upstream:
-https://github.com/ganeti/ganeti/pull/1503
-
-diff --git a/lib/backend.py b/lib/backend.py
---- a/lib/backend.py
-+++ b/lib/backend.py
-@@ -4305,6 +4305,7 @@ def OSEnvironment(instance, inst_os, debug=0):
- uri = _CalculateDeviceURI(instance, disk, real_disk)
- result["DISK_%d_ACCESS" % idx] = disk.mode
- result["DISK_%d_UUID" % idx] = disk.uuid
-+ result["DISK_%d_SIZE" % idx] = str(disk.size)
- if real_disk.dev_path:
- result["DISK_%d_PATH" % idx] = real_disk.dev_path
- if uri: