This is an automated email from the ASF dual-hosted git repository.
guyuqi pushed a commit to branch openEuler-support
in repository https://gitbox.apache.org/repos/asf/bigtop.git
The following commit(s) were added to refs/heads/openEuler-support by this push:
new a643129b BIGTOP-3955: add support for phoenix (#1130)
a643129b is described below
commit a643129bbbfd27c057483658f36bd289ef6f6e5e
Author: MacChen01 <[email protected]>
AuthorDate: Tue Jul 25 18:25:13 2023 +0800
BIGTOP-3955: add support for phoenix (#1130)
using the /sbin/service cmd to replace systemctl method on phoenix in
openEuler
---
.../puppet/modules/phoenix/manifests/init.pp | 62 +++++++++++++++-------
bigtop-packages/src/rpm/phoenix/SPECS/phoenix.spec | 2 +-
2 files changed, 45 insertions(+), 19 deletions(-)
diff --git a/bigtop-deploy/puppet/modules/phoenix/manifests/init.pp
b/bigtop-deploy/puppet/modules/phoenix/manifests/init.pp
index 226ecdbf..6faf0472 100644
--- a/bigtop-deploy/puppet/modules/phoenix/manifests/init.pp
+++ b/bigtop-deploy/puppet/modules/phoenix/manifests/init.pp
@@ -28,28 +28,54 @@ class phoenix {
}
class hbase_master_restart {
- exec { "hbase_master_restart":
- command => "systemctl restart hbase-master",
- path => ['/usr/bin', '/bin'],
- cwd => '/tmp',
- timeout => 3000,
- require => [
- File['phoenix-server-lib'],
- Service['hbase-master'],
- ],
+ if ($operatingsystem == 'openEuler') {
+ exec { "hbase_master_restart":
+ command => "/sbin/service hbase-master restart",
+ path => ['/usr/bin', '/bin','/sbin'],
+ cwd => '/tmp',
+ timeout => 3000,
+ require => [
+ File['phoenix-server-lib'],
+ Service['hbase-master'],
+ ],
+ }
+ } else {
+ exec { "hbase_master_restart":
+ command => "systemctl restart hbase-master",
+ path => ['/usr/bin', '/bin'],
+ cwd => '/tmp',
+ timeout => 3000,
+ require => [
+ File['phoenix-server-lib'],
+ Service['hbase-master'],
+ ],
+ }
}
}
class hbase_server_restart {
- exec { "hbase_server_restart":
- command => "systemctl restart hbase-regionserver",
- path => ['/usr/bin', '/bin'],
- cwd => '/tmp',
- timeout => 3000,
- require => [
- File['phoenix-server-lib'],
- Service['hbase-regionserver'],
- ],
+ if ($operatingsystem == 'openEuler') {
+ exec { "hbase_server_restart":
+ command => "/sbin/service hbase-regionserver restart",
+ path => ['/usr/bin', '/bin','/sbin'],
+ cwd => '/tmp',
+ timeout => 3000,
+ require => [
+ File['phoenix-server-lib'],
+ Service['hbase-regionserver'],
+ ],
+ }
+ } else {
+ exec { "hbase_server_restart":
+ command => "systemctl restart hbase-regionserver",
+ path => ['/usr/bin', '/bin'],
+ cwd => '/tmp',
+ timeout => 3000,
+ require => [
+ File['phoenix-server-lib'],
+ Service['hbase-regionserver'],
+ ],
+ }
}
}
diff --git a/bigtop-packages/src/rpm/phoenix/SPECS/phoenix.spec
b/bigtop-packages/src/rpm/phoenix/SPECS/phoenix.spec
index 1a7b2533..3eb03b9d 100644
--- a/bigtop-packages/src/rpm/phoenix/SPECS/phoenix.spec
+++ b/bigtop-packages/src/rpm/phoenix/SPECS/phoenix.spec
@@ -93,7 +93,7 @@ Requires: bsh-utils
Requires: coreutils
%endif
-%if 0%{?rhel} >= 8
+%if 0%{?rhel} >= 8 || 0%{?openEuler}
Requires: python3
%else
Requires: python