- lvmlockd: fail when use_lvmlockd has not been set
- aws-vpc-move-ip: add interface label support Resolves: rhbz#2094828 Resolves: rhbz#2093213
This commit is contained in:
parent
a4d84eff3a
commit
53f7b59e8d
82
bz2093213-aws-vpc-move-ip-add-interface-label-support.patch
Normal file
82
bz2093213-aws-vpc-move-ip-add-interface-label-support.patch
Normal file
@ -0,0 +1,82 @@
|
|||||||
|
From 4420ef84f3172c67fc7b8b6ae41ea173de017bf4 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Petr Pavlu <petr.pavlu@suse.com>
|
||||||
|
Date: Wed, 25 May 2022 15:12:33 +0200
|
||||||
|
Subject: [PATCH] aws-vpc-move-ip: Allow to set the interface label
|
||||||
|
|
||||||
|
Add a parameter to specify an interface label to distinguish the IP
|
||||||
|
address managed by aws-vpc-move-ip, similarly as can be done with
|
||||||
|
IPaddr2. This allows to easily recognize the address from other
|
||||||
|
addresses assigned to a given interface.
|
||||||
|
---
|
||||||
|
heartbeat/aws-vpc-move-ip | 30 +++++++++++++++++++++++++++++-
|
||||||
|
1 file changed, 29 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/heartbeat/aws-vpc-move-ip b/heartbeat/aws-vpc-move-ip
|
||||||
|
index 5d5204080..dee040300 100755
|
||||||
|
--- a/heartbeat/aws-vpc-move-ip
|
||||||
|
+++ b/heartbeat/aws-vpc-move-ip
|
||||||
|
@@ -43,6 +43,7 @@ OCF_RESKEY_address_default=""
|
||||||
|
OCF_RESKEY_routing_table_default=""
|
||||||
|
OCF_RESKEY_routing_table_role_default=""
|
||||||
|
OCF_RESKEY_interface_default="eth0"
|
||||||
|
+OCF_RESKEY_iflabel_default=""
|
||||||
|
OCF_RESKEY_monapi_default="false"
|
||||||
|
OCF_RESKEY_lookup_type_default="InstanceId"
|
||||||
|
|
||||||
|
@@ -54,6 +55,7 @@ OCF_RESKEY_lookup_type_default="InstanceId"
|
||||||
|
: ${OCF_RESKEY_routing_table=${OCF_RESKEY_routing_table_default}}
|
||||||
|
: ${OCF_RESKEY_routing_table_role=${OCF_RESKEY_routing_table_role_default}}
|
||||||
|
: ${OCF_RESKEY_interface=${OCF_RESKEY_interface_default}}
|
||||||
|
+: ${OCF_RESKEY_iflabel=${OCF_RESKEY_iflabel_default}}
|
||||||
|
: ${OCF_RESKEY_monapi=${OCF_RESKEY_monapi_default}}
|
||||||
|
: ${OCF_RESKEY_lookup_type=${OCF_RESKEY_lookup_type_default}}
|
||||||
|
|
||||||
|
@@ -149,6 +151,18 @@ Name of the network interface, i.e. eth0
|
||||||
|
<content type="string" default="${OCF_RESKEY_interface_default}" />
|
||||||
|
</parameter>
|
||||||
|
|
||||||
|
+<parameter name="iflabel">
|
||||||
|
+<longdesc lang="en">
|
||||||
|
+You can specify an additional label for your IP address here.
|
||||||
|
+This label is appended to your interface name.
|
||||||
|
+
|
||||||
|
+The kernel allows alphanumeric labels up to a maximum length of 15
|
||||||
|
+characters including the interface name and colon (e.g. eth0:foobar1234)
|
||||||
|
+</longdesc>
|
||||||
|
+<shortdesc lang="en">Interface label</shortdesc>
|
||||||
|
+<content type="string" default="${OCF_RESKEY_iflabel_default}"/>
|
||||||
|
+</parameter>
|
||||||
|
+
|
||||||
|
<parameter name="monapi">
|
||||||
|
<longdesc lang="en">
|
||||||
|
Enable enhanced monitoring using AWS API calls to check route table entry
|
||||||
|
@@ -215,6 +229,14 @@ ec2ip_validate() {
|
||||||
|
return $OCF_ERR_CONFIGURED
|
||||||
|
fi
|
||||||
|
|
||||||
|
+ if [ -n "$OCF_RESKEY_iflabel" ]; then
|
||||||
|
+ label=${OCF_RESKEY_interface}:${OFC_RESKEY_iflabel}
|
||||||
|
+ if [ ${#label} -gt 15 ]; then
|
||||||
|
+ ocf_exit_reason "Interface label [$label] exceeds maximum character limit of 15"
|
||||||
|
+ exit $OCF_ERR_CONFIGURED
|
||||||
|
+ fi
|
||||||
|
+ fi
|
||||||
|
+
|
||||||
|
TOKEN=$(curl -sX PUT "http://169.254.169.254/latest/api/token" -H "X-aws-ec2-metadata-token-ttl-seconds: 21600")
|
||||||
|
EC2_INSTANCE_ID=$(curl -s http://169.254.169.254/latest/meta-data/instance-id -H "X-aws-ec2-metadata-token: $TOKEN")
|
||||||
|
|
||||||
|
@@ -363,7 +385,13 @@ ec2ip_get_and_configure() {
|
||||||
|
|
||||||
|
# Reconfigure the local ip address
|
||||||
|
ec2ip_drop
|
||||||
|
- cmd="ip addr add ${OCF_RESKEY_ip}/32 dev $OCF_RESKEY_interface"
|
||||||
|
+
|
||||||
|
+ extra_opts=""
|
||||||
|
+ if [ -n "$OCF_RESKEY_iflabel" ]; then
|
||||||
|
+ extra_opts="$extra_opts label $OCF_RESKEY_interface:$OCF_RESKEY_iflabel"
|
||||||
|
+ fi
|
||||||
|
+
|
||||||
|
+ cmd="ip addr add ${OCF_RESKEY_ip}/32 dev $OCF_RESKEY_interface $extra_opts"
|
||||||
|
ocf_log debug "executing command: $cmd"
|
||||||
|
$cmd
|
||||||
|
rc=$?
|
25
bz2094828-lvmlockd-fail-when-use_lvmlockd-not-set.patch
Normal file
25
bz2094828-lvmlockd-fail-when-use_lvmlockd-not-set.patch
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
From b3885f7d95fe390371f806c7f3debb3ec8ad012d Mon Sep 17 00:00:00 2001
|
||||||
|
From: Oyvind Albrigtsen <oalbrigt@redhat.com>
|
||||||
|
Date: Tue, 7 Jun 2022 15:20:11 +0200
|
||||||
|
Subject: [PATCH] lvmlockd: fail when use_lvmlockd has not been set
|
||||||
|
|
||||||
|
---
|
||||||
|
heartbeat/lvmlockd | 5 +++++
|
||||||
|
1 file changed, 5 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/heartbeat/lvmlockd b/heartbeat/lvmlockd
|
||||||
|
index 05bb0a2e5..dc7bd2d7e 100755
|
||||||
|
--- a/heartbeat/lvmlockd
|
||||||
|
+++ b/heartbeat/lvmlockd
|
||||||
|
@@ -179,6 +179,11 @@ setup_lvm_config()
|
||||||
|
out=$(lvmconfig 'global/locking_type' 2> /dev/null)
|
||||||
|
lock_type=$(echo "$out" | cut -d'=' -f2)
|
||||||
|
|
||||||
|
+ if [ -z "$use_lvmlockd" ]; then
|
||||||
|
+ ocf_exit_reason "\"use_lvmlockd\" not set in /etc/lvm/lvm.conf ..."
|
||||||
|
+ exit $OCF_ERR_CONFIGURED
|
||||||
|
+ fi
|
||||||
|
+
|
||||||
|
if [ -n "$use_lvmlockd" ] && [ "$use_lvmlockd" != 1 ] ; then
|
||||||
|
ocf_log info "setting \"use_lvmlockd=1\" in /etc/lvm/lvm.conf ..."
|
||||||
|
sed -i 's,^[[:blank:]]*use_lvmlockd[[:blank:]]*=.*,\ \ \ \ use_lvmlockd = 1,g' /etc/lvm/lvm.conf
|
@ -45,7 +45,7 @@
|
|||||||
Name: resource-agents
|
Name: resource-agents
|
||||||
Summary: Open Source HA Reusable Cluster Resource Scripts
|
Summary: Open Source HA Reusable Cluster Resource Scripts
|
||||||
Version: 4.10.0
|
Version: 4.10.0
|
||||||
Release: 15%{?rcver:%{rcver}}%{?numcomm:.%{numcomm}}%{?alphatag:.%{alphatag}}%{?dirty:.%{dirty}}%{?dist}
|
Release: 16%{?rcver:%{rcver}}%{?numcomm:.%{numcomm}}%{?alphatag:.%{alphatag}}%{?dirty:.%{dirty}}%{?dist}
|
||||||
License: GPLv2+ and LGPLv2+
|
License: GPLv2+ and LGPLv2+
|
||||||
URL: https://github.com/ClusterLabs/resource-agents
|
URL: https://github.com/ClusterLabs/resource-agents
|
||||||
Source0: %{upstream_prefix}-%{upstream_version}.tar.gz
|
Source0: %{upstream_prefix}-%{upstream_version}.tar.gz
|
||||||
@ -68,6 +68,8 @@ Patch15: bz2072371-Filesystem-1-fix-uuid-label-device-whitespace.patch
|
|||||||
Patch16: bz2072371-Filesystem-2-improve-uuid-label-device-logic.patch
|
Patch16: bz2072371-Filesystem-2-improve-uuid-label-device-logic.patch
|
||||||
Patch17: bz2083081-bz2083086-bz2083090-bz2083092-update-openstack-agents.patch
|
Patch17: bz2083081-bz2083086-bz2083090-bz2083092-update-openstack-agents.patch
|
||||||
Patch18: bz2081585-NovaEvacuate-add-user_domain-project_domain.patch
|
Patch18: bz2081585-NovaEvacuate-add-user_domain-project_domain.patch
|
||||||
|
Patch19: bz2094828-lvmlockd-fail-when-use_lvmlockd-not-set.patch
|
||||||
|
Patch20: bz2093213-aws-vpc-move-ip-add-interface-label-support.patch
|
||||||
|
|
||||||
# bundled ha-cloud-support libs
|
# bundled ha-cloud-support libs
|
||||||
Patch500: ha-cloud-support-aws.patch
|
Patch500: ha-cloud-support-aws.patch
|
||||||
@ -210,6 +212,8 @@ exit 1
|
|||||||
%patch16 -p1
|
%patch16 -p1
|
||||||
%patch17 -p1
|
%patch17 -p1
|
||||||
%patch18 -p1
|
%patch18 -p1
|
||||||
|
%patch19 -p1
|
||||||
|
%patch20 -p1
|
||||||
|
|
||||||
# bundled ha-cloud-support libs
|
# bundled ha-cloud-support libs
|
||||||
%patch500 -p1
|
%patch500 -p1
|
||||||
@ -531,6 +535,13 @@ rm -rf %{buildroot}/usr/share/doc/resource-agents
|
|||||||
%{_usr}/lib/ocf/lib/heartbeat/OCF_*.pm
|
%{_usr}/lib/ocf/lib/heartbeat/OCF_*.pm
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Jun 9 2022 Oyvind Albrigtsen <oalbrigt@redhat.com> - 4.10.0-16
|
||||||
|
- lvmlockd: fail when use_lvmlockd has not been set
|
||||||
|
- aws-vpc-move-ip: add interface label support
|
||||||
|
|
||||||
|
Resolves: rhbz#2094828
|
||||||
|
Resolves: rhbz#2093213
|
||||||
|
|
||||||
* Tue May 17 2022 Oyvind Albrigtsen <oalbrigt@redhat.com> - 4.10.0-15
|
* Tue May 17 2022 Oyvind Albrigtsen <oalbrigt@redhat.com> - 4.10.0-15
|
||||||
- NovaEvacuate: add user_domain and project_domain parameters
|
- NovaEvacuate: add user_domain and project_domain parameters
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user