This is an automated email from the ASF dual-hosted git repository. guyuqi pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/bigtop.git
commit c37b9be1a26966b348f7c00f4af3feb0a35284ac 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 (cherry picked from commit a643129bbbfd27c057483658f36bd289ef6f6e5e) --- .../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 226ecdbf4..6faf04727 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 1a7b25333..3eb03b9d0 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
