[PATCH 0/5]: gnu Add pacemaker

  • Done
  • quality assurance status badge
Details
2 participants
  • Ludovic Courtès
  • Sharlatan Hellseher
Owner
unassigned
Submitted by
Sharlatan Hellseher
Severity
normal

Debbugs page

Sharlatan Hellseher wrote 2 years ago
(address . guix-patches@gnu.org)
CAO+9K5qfLh4ZyWzaeTou8gco2LOfaxptHdskkGiFrDwy4d4vew@mail.gmail.com
Hi Guix team!
This patch series add pacemaker and it's dependencies under new module
more logically suited for that functionality which I could not find in
other of the modules - High Availability.
It would be a good foundation to pack such projects like Proxmox,
oVirt. They provide convenient clustirisation solutions which would be
nice to have in Guix :)
Sharlatan Hellseher (5):
gnu: Move libqb to high-availability
gnu: libqb: Update to 2.0.6
gnu: Add kronosnet
gnu: Add corosync
gnu: Add pacemaker
gnu/local.mk | 1 +
gnu/packages/hardware.scm | 27 ----
gnu/packages/high-availability.scm | 242 +++++++++++++++++++++++++++++
3 files changed, 243 insertions(+), 27 deletions(-)
create mode 100644 gnu/packages/high-availability.scm
base-commit: afcc6d636f7d7b1914fa3425da3574db4a94f26f
--
… наш разум - превосходная объяснительная машина которая способна
найти смысл почти в чем угодно, истолковать любой феномен, но
совершенно не в состоянии принять мысль о непредсказуемости.
Sharlatan Hellseher wrote 2 years ago
[PATCH 1/5]: Move libqb to high-availability
(address . 58152@debbugs.gnu.org)
CAO+9K5pr+ZSrWFZhnQ27Md1ApezQ8EmNOmmRqZTaTGAJzOgTmw@mail.gmail.com
--
… наш разум - превосходная объяснительная машина которая способна
найти смысл почти в чем угодно, истолковать любой феномен, но
совершенно не в состоянии принять мысль о непредсказуемости.
Sharlatan Hellseher wrote 2 years ago
[PATCH 2/5]: gnu: libqb: Update to 2.0.6
(address . 58152@debbugs.gnu.org)
CAO+9K5qG-wkm6Us98OJDc0c8Xn-vMoUCB3X9pgV0HdS2dy87gQ@mail.gmail.com
--
… наш разум - превосходная объяснительная машина которая способна
найти смысл почти в чем угодно, истолковать любой феномен, но
совершенно не в состоянии принять мысль о непредсказуемости.
From c869314cf7fe6c7c916b1fa995ace8f90c0ea0b6 Mon Sep 17 00:00:00 2001
From: Sharlatan Hellseher <sharlatanus@gmail.com>
Date: Wed, 28 Sep 2022 21:26:44 +0100
Subject: [PATCH 2/5] gnu: libqb: Update to 2.0.6

* gnu/packages/high-availability.scm (libqb): Update to 2.0.6.
Run `guix style' over the package.
[native-inputs]: Add autoconf, automake, libtools to fix configure and
build phases.
---
gnu/packages/high-availability.scm | 15 +++++++--------
1 file changed, 7 insertions(+), 8 deletions(-)

Toggle diff (37 lines)
diff --git a/gnu/packages/high-availability.scm b/gnu/packages/high-availability.scm
index 1a8c348020..46247c4e13 100644
--- a/gnu/packages/high-availability.scm
+++ b/gnu/packages/high-availability.scm
@@ -55,9 +55,7 @@ (define-module (gnu packages high-availability)
(define-public libqb
(package
(name "libqb")
- ;; NOTE: We are using a Release Candidate version (for 2.0) here because
- ;; of the linker issues with the previous release.
- (version "1.9.1")
+ (version "2.0.6")
(source (origin
(method url-fetch)
(uri (string-append
@@ -65,13 +63,14 @@ (define-public libqb
version "/libqb-" version ".tar.xz"))
(sha256
(base32
- "008vvw504kh40br5v2xkqavnp9vpmjvf768faqzv1d00fd53ingn"))))
+ "071k916vz9ppyb69rpk792fzjs3nf3chakn10i496scgiqh49rzi"))))
(build-system gnu-build-system)
- (native-inputs
- (list pkg-config libxml2))
+ (native-inputs (list autoconf automake libtool libxml2 pkg-config))
(home-page "https://clusterlabs.github.io/libqb/")
- (synopsis "Library providing high performance logging, tracing, ipc, and poll")
- (description "Libqb is a library with the primary purpose of providing
+ (synopsis
+ "Library providing high performance logging, tracing, ipc, and poll")
+ (description
+ "Libqb is a library with the primary purpose of providing
high-performance, reusable features for client-server architecture, such as
logging, tracing, inter-process communication (IPC), and polling. Libqb is
not intended to be an all-encompassing library, but instead provide focused
--
2.37.3
Sharlatan Hellseher wrote 2 years ago
[PATCH 3/5]: gnu: Add kronosnet
(address . 58152@debbugs.gnu.org)
CAO+9K5q1NKAZurrb10cobrg=VMc8aYOLHzVPqtzfrwoja1qnfQ@mail.gmail.com
--
… наш разум - превосходная объяснительная машина которая способна
найти смысл почти в чем угодно, истолковать любой феномен, но
совершенно не в состоянии принять мысль о непредсказуемости.
From 441e9a219377d93dd47488b7994b749a69a89382 Mon Sep 17 00:00:00 2001
From: Sharlatan Hellseher <sharlatanus@gmail.com>
Date: Wed, 28 Sep 2022 21:37:07 +0100
Subject: [PATCH 3/5] gnu: Add kronosnet

* gnu/packages/high-availability.scm (kronosnet): New variable.
---
gnu/packages/high-availability.scm | 61 ++++++++++++++++++++++++++++++
1 file changed, 61 insertions(+)

Toggle diff (71 lines)
diff --git a/gnu/packages/high-availability.scm b/gnu/packages/high-availability.scm
index 46247c4e13..48c371a6db 100644
--- a/gnu/packages/high-availability.scm
+++ b/gnu/packages/high-availability.scm
@@ -77,3 +77,64 @@ (define-public libqb
APIs that are highly tuned for maximum performance for client-server
applications.")
(license license:lgpl2.1)))
+
+(define-public kronosnet
+ (package
+ (name "kronosnet")
+ (version "1.24")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/kronosnet/kronosnet")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1b8rz7f2h3scrq0xcqz58ckzsvv08g31j5jgy2v4i6w87r9c75lw"))))
+ (build-system gnu-build-system)
+ (arguments
+ ;; XXX: Multiple tests failed. Tests
+ ;; require very complex environment and for some of them root privileges to
+ ;; set network configuration. It has it's own CI based on Jenkis
+ ;; https://ci.kronosnet.org/.
+ (list #:tests? #f
+ #:phases #~(modify-phases %standard-phases
+ (add-before 'bootstrap 'fix-version-gen
+ (lambda _
+ (call-with-output-file ".tarball-version"
+ (lambda (port)
+ (display #$version port))))))))
+ (native-inputs (list autoconf
+ automake
+ doxygen
+ libtool
+ net-tools
+ pkg-config
+ ;; libgcc_s.so.1 must be installed for pthread_cancel to work
+ `(,gcc "lib")))
+ (inputs (list lksctp-tools
+ libnl
+ libqb
+ libxml2
+ lz4
+ lzo
+ nss
+ nspr
+ openssl
+ xz
+ zlib
+ `(,zstd "lib")))
+ (home-page "https://kronosnet.org/")
+ (synopsis "Network abstraction layer designed for High Availability")
+ (description
+ "Kronosnet, often referred to as @code{knet}, is a network
+ abstraction layer designed for High Availability use cases, where redundancy,
+ security, fault tolerance and fast fail-over are the core requirements of
+ your application.
+
+ Kronosnet is the new underlying network protocol for Linux HA components
+ (Corosync), that features ability to use multiple links between nodes,
+ active/active and active/passive link failover policies, automatic link
+ recovery, FIPS compliant encryption (nss and/or openssl), automatic PMTUd and
+ in general better performances compared to the old network protocol.")
+ (license (list license:gpl2+ license:lgpl2.1+))))
--
2.37.3
Sharlatan Hellseher wrote 2 years ago
[PATCH 4/5]: gnu: Add corosync
(address . 58152@debbugs.gnu.org)
CAO+9K5rRehmOUkHfS-CpGfiXoN=FhgE7n34SMXcAKo9K9GuFkg@mail.gmail.com
--
… наш разум - превосходная объяснительная машина которая способна
найти смысл почти в чем угодно, истолковать любой феномен, но
совершенно не в состоянии принять мысль о непредсказуемости.
From 5b18749fc520bd4eb30c17b043402dd5c256061a Mon Sep 17 00:00:00 2001
From: Sharlatan Hellseher <sharlatanus@gmail.com>
Date: Wed, 28 Sep 2022 21:43:31 +0100
Subject: [PATCH 4/5] gnu: Add corosync

* gnu/packages/high-availability.scm (corosync): New variable.
---
gnu/packages/high-availability.scm | 48 ++++++++++++++++++++++++++++++
1 file changed, 48 insertions(+)

Toggle diff (58 lines)
diff --git a/gnu/packages/high-availability.scm b/gnu/packages/high-availability.scm
index 48c371a6db..488ac5a3b0 100644
--- a/gnu/packages/high-availability.scm
+++ b/gnu/packages/high-availability.scm
@@ -138,3 +138,51 @@ (define-public kronosnet
recovery, FIPS compliant encryption (nss and/or openssl), automatic PMTUd and
in general better performances compared to the old network protocol.")
(license (list license:gpl2+ license:lgpl2.1+))))
+
+(define-public corosync
+ (package
+ (name "corosync")
+ (version "3.1.6")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/corosync/corosync")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "03g3qnm5acmk7jry6kspvkssbiv8k39749bic2f0cj3ckkwy2li4"))))
+ (build-system gnu-build-system)
+ (arguments
+ (list #:phases #~(modify-phases %standard-phases
+ (add-before 'bootstrap 'fix-version-gen
+ (lambda _
+ (call-with-output-file ".tarball-version"
+ (lambda (port)
+ (display #$version port))))))))
+ (native-inputs (list autoconf automake libtool pkg-config))
+ (inputs (list kronosnet libqb))
+ (home-page "https://corosync.github.io/corosync/")
+ (synopsis
+ "Group communication system for implementing High Availability in applications")
+ (description
+ "The Corosync Cluster Engine is a Group Communication System with additional
+features for implementing high availability within applications. The project
+provides four C Application Programming Interface features:
+
+@itemize
+
+@item A closed process group communication model with extended virtual synchrony
+guarantees for creating replicated state machines.
+
+@item A simple availability manager that restarts the application process when
+it has failed.
+
+@item A configuration and statistics in-memory database that provide the ability
+to set, retrieve, and receive change notifications of information.
+
+@item A quorum system that notifies applications when quorum is achieved or
+lost.
+
+@end itemize")
+ (license (list license:bsd-0 license:gpl3))))
--
2.37.3
Sharlatan Hellseher wrote 2 years ago
[PATCH 5/5]: gnu: Add pacemaker
(address . 58152@debbugs.gnu.org)
CAO+9K5pbyTh6GR-tja1p7Tqu3exCB4+dJx_8i63yEq_G9zqBgA@mail.gmail.com
--
… наш разум - превосходная объяснительная машина которая способна
найти смысл почти в чем угодно, истолковать любой феномен, но
совершенно не в состоянии принять мысль о непредсказуемости.
From dfb3eaa8b6aa5a428e493008e8c293f47ef10b1f Mon Sep 17 00:00:00 2001
From: Sharlatan Hellseher <sharlatanus@gmail.com>
Date: Wed, 28 Sep 2022 21:49:20 +0100
Subject: [PATCH 5/5] gnu: Add pacemaker

* gnu/pacemaker/high-availability.scm (pacemaker): New variable.
---
gnu/packages/high-availability.scm | 54 ++++++++++++++++++++++++++++++
1 file changed, 54 insertions(+)

Toggle diff (64 lines)
diff --git a/gnu/packages/high-availability.scm b/gnu/packages/high-availability.scm
index 488ac5a3b0..f699dbad20 100644
--- a/gnu/packages/high-availability.scm
+++ b/gnu/packages/high-availability.scm
@@ -186,3 +186,57 @@ (define-public corosync
@end itemize")
(license (list license:bsd-0 license:gpl3))))
+
+(define-public pacemaker
+ (package
+ (name "pacemaker")
+ (version "2.1.4")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/ClusterLabs/pacemaker")
+ (commit (string-append "Pacemaker-" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "04gfd7i3w0zbzv7vi7728lgbyjq7cbqpr7jsp501piwg3z5j4mvb"))))
+ (build-system gnu-build-system)
+ (arguments
+ (list #:configure-flags #~(list "--with-corosync"
+ (string-append "--with-initdir="
+ #$output "/etc/init.d")
+ (string-append "--with-ocfdir="
+ #$output "/lib"))))
+ (native-inputs (list autoconf
+ automake
+ cmocka
+ gettext-minimal
+ libtool
+ pkg-config
+ rsync
+ util-linux
+ valgrind))
+ (inputs (list dbus
+ corosync
+ glib
+ gnutls
+ libqb
+ libxml2
+ libxslt
+ python
+ `(,util-linux "lib")))
+ (home-page "https://www.clusterlabs.org/pacemaker/")
+ (synopsis "Scalable High-Availability cluster resource manager")
+ (description
+ "Pacemaker is a high-availability cluster resource manager.
+
+It achieves maximum availability for your cluster services (a.k.a. resources) by
+detecting and recovering from node- and resource-level failures by making use of
+the messaging and membership capabilities provided by Corosync.
+
+It can do this for clusters of practically any size and comes with a powerful
+dependency model that allows the administrator to accurately express the
+relationships (both ordering and location) between the cluster resources.
+
+Virtually anything that can be scripted can be managed as part of a Pacemaker cluster.")
+ (license (list license:cc-by4.0 license:gpl2+ license:lgpl2.1+))))
--
2.37.3
Ludovic Courtès wrote 2 years ago
Re: bug#58152: [PATCH 0/5]: gnu Add pacemaker
(name . Sharlatan Hellseher)(address . sharlatanus@gmail.com)(address . 58152@debbugs.gnu.org)
87a6643v7u.fsf_-_@gnu.org
Hi,

Sharlatan Hellseher <sharlatanus@gmail.com> skribis:

Toggle quote (7 lines)
> From 441e9a219377d93dd47488b7994b749a69a89382 Mon Sep 17 00:00:00 2001
> From: Sharlatan Hellseher <sharlatanus@gmail.com>
> Date: Wed, 28 Sep 2022 21:37:07 +0100
> Subject: [PATCH 3/5] gnu: Add kronosnet
>
> * gnu/packages/high-availability.scm (kronosnet): New variable.

[...]

Toggle quote (3 lines)
> + ;; libgcc_s.so.1 must be installed for pthread_cancel to work
> + `(,gcc "lib")))

This is unnecessary (it’s always provided as an implicit input of
‘gnu-build-system’) so I removed it.

I also added a ‘--disable-static’ configure flag.

Ludo’.
Ludovic Courtès wrote 2 years ago
(name . Sharlatan Hellseher)(address . sharlatanus@gmail.com)(address . 58152@debbugs.gnu.org)
875ygs3v5g.fsf_-_@gnu.org
Sharlatan Hellseher <sharlatanus@gmail.com> skribis:

Toggle quote (7 lines)
> From 5b18749fc520bd4eb30c17b043402dd5c256061a Mon Sep 17 00:00:00 2001
> From: Sharlatan Hellseher <sharlatanus@gmail.com>
> Date: Wed, 28 Sep 2022 21:43:31 +0100
> Subject: [PATCH 4/5] gnu: Add corosync
>
> * gnu/packages/high-availability.scm (corosync): New variable.

[...]

Toggle quote (2 lines)
> + (license (list license:bsd-0 license:gpl3))))

I changed the latter to ‘license:gpl3+’, as per the ‘LICENSE’ file.

Ludo’.
Ludovic Courtès wrote 2 years ago
(name . Sharlatan Hellseher)(address . sharlatanus@gmail.com)
87v8os2fs4.fsf@gnu.org
Hey!

Sharlatan Hellseher <sharlatanus@gmail.com> skribis:

Toggle quote (6 lines)
> gnu: Move libqb to high-availability
> gnu: libqb: Update to 2.0.6
> gnu: Add kronosnet
> gnu: Add corosync
> gnu: Add pacemaker

I’ve now pushed the whole series with the small changes I mentioned as
commit 5f856c595479c30d9ccdb0063c9124248fdcf5c2.

Thanks,
Ludo’.
Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 58152@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 58152
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help