Package and Enable Memcached on Controllers/AIO

Add memcached as a service on controllers/AIOs.

Prop an upstream fix to puppet-stdlib package to support
collapsed format ipv6 address like 'abcd::3'.

Patch puppet-horizon and puppet-swift package to update version
requirements for puppet-memcached-3.0.2.

Comment out service parameters in memcached service file that
incompatible to Centos 7.

Change-Id: I8837597c1d7d8ec874f3e9ba858ea308860d15ea
Signed-off-by: Jack Ding <jack.ding@windriver.com>
This commit is contained in:
Jack Ding 2018-05-16 10:40:21 -04:00
parent a64f6c303b
commit 572a1870a5
27 changed files with 447 additions and 0 deletions

View File

@ -0,0 +1 @@
TIS_PATCH_VER=1

View File

@ -0,0 +1,25 @@
From d445a072fdcebc0cb7ba988502eac6356edd05a7 Mon Sep 17 00:00:00 2001
From: Jack Ding <jack.ding@windriver.com>
Date: Fri, 11 May 2018 21:39:23 -0400
Subject: [PATCH 1/3] Update package versioning for Titanium format
---
SPECS/puppet-horizon.spec | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/SPECS/puppet-horizon.spec b/SPECS/puppet-horizon.spec
index faab8ab..03ed102 100644
--- a/SPECS/puppet-horizon.spec
+++ b/SPECS/puppet-horizon.spec
@@ -1,7 +1,7 @@
%{!?upstream_version: %global upstream_version %{version}%{?milestone}}
Name: puppet-horizon
Version: 9.5.0
-Release: 1%{?dist}
+Release: 1.el7%{?_tis_dist}.%{tis_patch_ver}
Summary: Puppet module for OpenStack Horizon
License: Apache-2.0
--
1.8.3.1

View File

@ -0,0 +1,36 @@
From 81fde18810538b9c01e32ef76dbbd0b48761dcb8 Mon Sep 17 00:00:00 2001
From: Jack Ding <jack.ding@windriver.com>
Date: Fri, 11 May 2018 21:45:14 -0400
Subject: [PATCH 2/3] update memcached dependency
---
SPECS/puppet-horizon.spec | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/SPECS/puppet-horizon.spec b/SPECS/puppet-horizon.spec
index 03ed102..6ad467c 100644
--- a/SPECS/puppet-horizon.spec
+++ b/SPECS/puppet-horizon.spec
@@ -9,6 +9,9 @@ URL: https://launchpad.net/puppet-horizon
Source0: https://tarballs.openstack.org/%{name}/%{name}-%{upstream_version}.tar.gz
+# WRS Patches
+Patch0001: 0001-update-memcached-dependency.patch
+
BuildArch: noarch
Requires: puppet-apache
@@ -21,6 +24,9 @@ Puppet module for OpenStack Horizon
%prep
%setup -q -n openstack-horizon-%{upstream_version}
+# WRS Patches
+%patch0001 -p1
+
find . -type f -name ".*" -exec rm {} +
find . -size 0 -exec rm {} +
--
1.8.3.1

View File

@ -0,0 +1,2 @@
0001-Update-package-versioning-for-Titanium-format.patch
0002-update-memcached-dependency.patch

View File

@ -0,0 +1,24 @@
From 0d0409579a7f66fce15375a8193d17d7d7bd130e Mon Sep 17 00:00:00 2001
From: Jack Ding <jack.ding@windriver.com>
Date: Fri, 11 May 2018 21:45:24 -0400
Subject: [PATCH 3/3] update memcached dependency
---
metadata.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/metadata.json b/metadata.json
index cc20f92..df162ac 100644
--- a/metadata.json
+++ b/metadata.json
@@ -49,6 +49,6 @@
"dependencies": [
{"name":"puppetlabs/apache","version_requirement":">=1.2.0 <2.0.0"},
{"name":"puppetlabs/stdlib","version_requirement":">=4.0.0 <5.0.0"},
- {"name":"saz/memcached","version_requirement":">=2.0.2 <3.0.0"}
+ {"name":"saz/memcached","version_requirement":">=2.0.2 <=3.0.2"}
]
}
--
1.8.3.1

View File

@ -0,0 +1 @@
mirror:Source/puppet-horizon-9.5.0-1.el7.src.rpm

View File

@ -0,0 +1 @@
TIS_PATCH_VER=1

View File

@ -0,0 +1,25 @@
From c5127c3365ebcf6124b4e6fad15cccd7ea2e7f20 Mon Sep 17 00:00:00 2001
From: Jack Ding <jack.ding@windriver.com>
Date: Tue, 8 May 2018 13:08:38 -0400
Subject: [PATCH] Update package versioning for TIS format
---
SPECS/puppet-memcached.spec | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/SPECS/puppet-memcached.spec b/SPECS/puppet-memcached.spec
index 8df048d..6b69f32 100644
--- a/SPECS/puppet-memcached.spec
+++ b/SPECS/puppet-memcached.spec
@@ -8,7 +8,7 @@
Name: puppet-memcached
Version: 3.0.2
-Release: 1%{?alphatag}%{?dist}
+Release: 1.el7%{?_tis_dist}.%{tis_patch_ver}
Summary: Manage memcached via Puppet
License: ASL 2.0
--
1.8.3.1

View File

@ -0,0 +1 @@
0001-Update-package-versioning-for-TIS-format.patch

View File

@ -0,0 +1 @@
mirror:Source/puppet-memcached-3.0.2-1.adf8b63git.el7.src.rpm

View File

@ -0,0 +1 @@
TIS_PATCH_VER=1

View File

@ -0,0 +1,25 @@
From a2eba6008a857432d48607e8922ae0cd690af246 Mon Sep 17 00:00:00 2001
From: Jack Ding <jack.ding@windriver.com>
Date: Sat, 12 May 2018 08:59:17 -0400
Subject: [PATCH 1/3] Update package versioning for Titanium format
---
SPECS/puppet-swift.spec | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/SPECS/puppet-swift.spec b/SPECS/puppet-swift.spec
index e79ad9f..c684a93 100644
--- a/SPECS/puppet-swift.spec
+++ b/SPECS/puppet-swift.spec
@@ -1,7 +1,7 @@
%{!?upstream_version: %global upstream_version %{version}%{?milestone}}
Name: puppet-swift
Version: 11.3.0
-Release: 1%{?dist}
+Release: 1.el7%{?_tis_dist}.%{tis_patch_ver}
Summary: Puppet module for OpenStack Swift
License: ASL 2.0
--
1.8.3.1

View File

@ -0,0 +1,35 @@
From 1ec30fd56a82094710ebc46f43d905d5fbe1542e Mon Sep 17 00:00:00 2001
From: Jack Ding <jack.ding@windriver.com>
Date: Sat, 12 May 2018 09:01:03 -0400
Subject: [PATCH 2/3] update memcached dependency
---
SPECS/puppet-swift.spec | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/SPECS/puppet-swift.spec b/SPECS/puppet-swift.spec
index c684a93..31223f3 100644
--- a/SPECS/puppet-swift.spec
+++ b/SPECS/puppet-swift.spec
@@ -9,6 +9,9 @@ URL: https://launchpad.net/puppet-swift
Source0: https://tarballs.openstack.org/%{name}/%{name}-%{upstream_version}.tar.gz
+# WRS Patches
+Patch0001: 0001-update-memcached-dependency.patch
+
BuildArch: noarch
Requires: puppet-inifile
@@ -25,6 +28,8 @@ Puppet module for OpenStack Swift
%prep
%setup -q -n openstack-swift-%{upstream_version}
+# WRS Patches
+%patch0001 -p1
find . -type f -name ".*" -exec rm {} +
find . -size 0 -exec rm {} +
--
1.8.3.1

View File

@ -0,0 +1,2 @@
0001-Update-package-versioning-for-Titanium-format.patch
0002-update-memcached-dependency.patch

View File

@ -0,0 +1,25 @@
From 43aea38c12d6257a7ffae113723435b2bf3903c2 Mon Sep 17 00:00:00 2001
From: Jack Ding <jack.ding@windriver.com>
Date: Sat, 12 May 2018 09:03:19 -0400
Subject: [PATCH 3/3] update memcached dependency
---
metadata.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/metadata.json b/metadata.json
index 535941e..44a7356 100644
--- a/metadata.json
+++ b/metadata.json
@@ -14,7 +14,7 @@
{"name":"puppetlabs/stdlib","version_requirement":">=4.0.0 <5.0.0"},
{"name":"puppetlabs/xinetd","version_requirement":">=1.0.1 <2.0.1"},
{"name":"puppetlabs/concat","version_requirement":">=1.0.0 <3.0.0"},
- {"name":"saz/memcached","version_requirement":">=2.0.2 <3.0.0"}
+ {"name":"saz/memcached","version_requirement":">=2.0.2 <=3.0.2"}
],
"data_provider": null,
"description": "Installs and configures OpenStack Swift (Object Storage).",
--
1.8.3.1

View File

@ -0,0 +1 @@
mirror:Source/puppet-swift-11.3.0-1.el7.src.rpm

View File

@ -0,0 +1,32 @@
From 8e8ef8e37a71d79b413d07c135823786f402e89a Mon Sep 17 00:00:00 2001
From: Jack Ding <jack.ding@windriver.com>
Date: Tue, 15 May 2018 13:10:35 -0400
Subject: [PATCH] Improve ipv6 support for type
---
SPECS/puppet-stdlib.spec | 2 ++
1 file changed, 2 insertions(+)
diff --git a/SPECS/puppet-stdlib.spec b/SPECS/puppet-stdlib.spec
index 7304088..d62745e 100644
--- a/SPECS/puppet-stdlib.spec
+++ b/SPECS/puppet-stdlib.spec
@@ -16,6 +16,7 @@ URL: https://github.com/puppetlabs/puppetlabs-stdlib
Source0: https://github.com/puppetlabs/%{upstream_name}/archive/%{commit}.tar.gz#/%{upstream_name}-%{shortcommit}.tar.gz
Patch0001: 0001-Filter-password-in-logs.patch
+Patch0002: 0002-Improve-ipv6-support-for-type.patch
BuildArch: noarch
@@ -27,6 +28,7 @@ Standard library of resources for Puppet modules.
%prep
%setup -q -n %{upstream_name}-%{upstream_version}
%patch0001 -p1
+%patch0002 -p1
find . -type f -name ".*" -exec rm {} +
find . -size 0 -exec rm {} +
--
1.8.3.1

View File

@ -1,2 +1,3 @@
0001-Update-package-versioning-for-TIS-format.patch
0002-Add-TIS-Patches.patch
0003-Improve-ipv6-support-for-type.patch

View File

@ -0,0 +1,20 @@
From 1385e617ddc9e82cc408c58bb1ae7cecbdf00465 Mon Sep 17 00:00:00 2001
From: Jack Ding <jack.ding@windriver.com>
Date: Tue, 15 May 2018 13:02:24 -0400
Subject: [PATCH] Improve ipv6 support for type
Fix from upstream 496d196 to add support for collapsed ipv6 address like 'abcd::3'.
---
types/compat/ipv6.pp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/types/compat/ipv6.pp b/types/compat/ipv6.pp
index 18b148d..8b82f1a 100644
--- a/types/compat/ipv6.pp
+++ b/types/compat/ipv6.pp
@@ -1 +1 @@
-type Stdlib::Compat::Ipv6 = Pattern[/^(?:(?:[\da-f]{1,4}:){7}[\da-f]{1,4}|((?:[\da-f]{1,4}:){6})(\d+)\.(\d+)\.(\d+)\.(\d+))$/]
+type Stdlib::Compat::Ipv6 = Pattern[/\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/]
--
1.8.3.1

View File

@ -0,0 +1 @@
TIS_PATCH_VER=1

View File

@ -0,0 +1,25 @@
From de355606dea0404c4ae92bad5ce00b841697c698 Mon Sep 17 00:00:00 2001
From: Jack Ding <jack.ding@windriver.com>
Date: Tue, 8 May 2018 14:29:14 -0400
Subject: [PATCH] Update package versioning for TIS format
---
SPECS/memcached.spec | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/SPECS/memcached.spec b/SPECS/memcached.spec
index 6008493..c8575c8 100644
--- a/SPECS/memcached.spec
+++ b/SPECS/memcached.spec
@@ -4,7 +4,7 @@
Name: memcached
Version: 1.4.39
-Release: 1%{?dist}
+Release: 1.el7%{?_tis_dist}.%{tis_patch_ver}
Epoch: 0
Summary: High Performance, Distributed Memory Object Cache
--
1.8.3.1

View File

@ -0,0 +1,32 @@
From f321c8a8b800a7c2ca9394d3c76bec72b98c0d77 Mon Sep 17 00:00:00 2001
From: Jack Ding <jack.ding@windriver.com>
Date: Fri, 11 May 2018 15:38:56 -0400
Subject: [PATCH] always restart memcached service
---
SPECS/memcached.spec | 2 ++
1 file changed, 2 insertions(+)
diff --git a/SPECS/memcached.spec b/SPECS/memcached.spec
index c8575c8..f389035 100644
--- a/SPECS/memcached.spec
+++ b/SPECS/memcached.spec
@@ -16,6 +16,7 @@ Source1: memcached.sysconfig
# https://github.com/memcached/memcached/issues/218
Patch1: 0001-systemd-fix-upstream-provided-service.patch
+Patch2: 0002-always-restart-memcached-service.patch
BuildRequires: libevent-devel systemd-units
BuildRequires: perl-generators
@@ -44,6 +45,7 @@ access to the memcached binary include files.
%prep
%setup -q
%patch1 -p1 -b .unit
+%patch2 -p1
%build
# compile with full RELRO
--
1.8.3.1

View File

@ -0,0 +1,33 @@
From bb6fd3da3ace960eb587e7ff01d5816ea2baaa54 Mon Sep 17 00:00:00 2001
From: Jack Ding <jack.ding@windriver.com>
Date: Sun, 13 May 2018 18:22:15 -0400
Subject: [PATCH] Add dependencies and comment out incompatible service
parameters
---
SPECS/memcached.spec | 2 ++
1 file changed, 2 insertions(+)
diff --git a/SPECS/memcached.spec b/SPECS/memcached.spec
index f389035..86653a1 100644
--- a/SPECS/memcached.spec
+++ b/SPECS/memcached.spec
@@ -17,6 +17,7 @@ Source1: memcached.sysconfig
# https://github.com/memcached/memcached/issues/218
Patch1: 0001-systemd-fix-upstream-provided-service.patch
Patch2: 0002-always-restart-memcached-service.patch
+Patch3: 0003-Add-dependencies-and-comment-out-incompatible-servic.patch
BuildRequires: libevent-devel systemd-units
BuildRequires: perl-generators
@@ -46,6 +47,7 @@ access to the memcached binary include files.
%setup -q
%patch1 -p1 -b .unit
%patch2 -p1
+%patch3 -p1
%build
# compile with full RELRO
--
1.8.3.1

View File

@ -0,0 +1,3 @@
0001-Update-package-versioning-for-TIS-format.patch
0002-always-restart-memcached-service.patch
0003-Add-dependencies-and-comment-out-incompatible-servic.patch

View File

@ -0,0 +1,26 @@
From bb7b75184f7037e6d8d844874ae248fce1d06736 Mon Sep 17 00:00:00 2001
From: Jack Ding <jack.ding@windriver.com>
Date: Fri, 11 May 2018 15:24:28 -0400
Subject: [PATCH] Always restart memcached service
---
scripts/memcached.service | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/scripts/memcached.service b/scripts/memcached.service
index 1bb9d33..8e58485 100644
--- a/scripts/memcached.service
+++ b/scripts/memcached.service
@@ -71,5 +71,9 @@ RestrictAddressFamilies=AF_INET AF_INET6 AF_UNIX
# Takes away the ability to create or manage any kind of namespace
RestrictNamespaces=true
+# WRS
+Restart=always
+RestartSec=0
+
[Install]
WantedBy=multi-user.target
--
1.8.3.1

View File

@ -0,0 +1,67 @@
From 1d9f43c5ecb20fe0a2a4abe9b94abd0d389edb40 Mon Sep 17 00:00:00 2001
From: Jack Ding <jack.ding@windriver.com>
Date: Mon, 14 May 2018 22:44:32 -0400
Subject: [PATCH 2/2] Add dependencies and comment out incompatible service
parameters
---
scripts/memcached.service | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/scripts/memcached.service b/scripts/memcached.service
index 8e58485..021b8b4 100644
--- a/scripts/memcached.service
+++ b/scripts/memcached.service
@@ -12,7 +12,7 @@
[Unit]
Description=memcached daemon
Before=httpd.service
-After=network.target
+After=network-online.target
[Service]
EnvironmentFile=/etc/sysconfig/memcached
@@ -46,34 +46,34 @@ LimitNOFILE=16384
# Explicit module loading will be denied. This allows to turn off module load and unload
# operations on modular kernels. It is recommended to turn this on for most services that
# do not need special file systems or extra kernel modules to work.
-ProtectKernelModules=true
+#ProtectKernelModules=true
# Kernel variables accessible through /proc/sys, /sys, /proc/sysrq-trigger, /proc/latency_stats,
# /proc/acpi, /proc/timer_stats, /proc/fs and /proc/irq will be made read-only to all processes
# of the unit. Usually, tunable kernel variables should only be written at boot-time, with the
# sysctl.d(5) mechanism. Almost no services need to write to these at runtime; it is hence
# recommended to turn this on for most services.
-ProtectKernelTunables=true
+#ProtectKernelTunables=true
# The Linux Control Groups (cgroups(7)) hierarchies accessible through /sys/fs/cgroup will be
# made read-only to all processes of the unit. Except for container managers no services should
# require write access to the control groups hierarchies; it is hence recommended to turn this on
# for most services
-ProtectControlGroups=true
+#ProtectControlGroups=true
# Any attempts to enable realtime scheduling in a process of the unit are refused.
-RestrictRealtime=true
+#RestrictRealtime=true
# Restricts the set of socket address families accessible to the processes of this unit.
# Protects against vulnerabilities such as CVE-2016-8655
RestrictAddressFamilies=AF_INET AF_INET6 AF_UNIX
# Takes away the ability to create or manage any kind of namespace
-RestrictNamespaces=true
+#RestrictNamespaces=true
# WRS
Restart=always
-RestartSec=0
+RestartSec=10
[Install]
WantedBy=multi-user.target
--
1.8.3.1

View File

@ -0,0 +1 @@
mirror:Source/memcached-1.4.39-1.el7.src.rpm