You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@bigtop.apache.org by ev...@apache.org on 2019/01/02 08:46:24 UTC
bigtop git commit: BIGTOP-3115. [Puppet] Alluxio master/worker can
not startup successfully
Repository: bigtop
Updated Branches:
refs/heads/master 5efd69a43 -> a58f3ee8b
BIGTOP-3115. [Puppet] Alluxio master/worker can not startup successfully
Project: http://git-wip-us.apache.org/repos/asf/bigtop/repo
Commit: http://git-wip-us.apache.org/repos/asf/bigtop/commit/a58f3ee8
Tree: http://git-wip-us.apache.org/repos/asf/bigtop/tree/a58f3ee8
Diff: http://git-wip-us.apache.org/repos/asf/bigtop/diff/a58f3ee8
Branch: refs/heads/master
Commit: a58f3ee8b775198bd3c7bb0c2638016cfa3a7068
Parents: 5efd69a
Author: Evans Ye <ev...@apache.org>
Authored: Mon Dec 24 13:15:18 2018 +0800
Committer: Evans Ye <ev...@apache.org>
Committed: Wed Jan 2 16:45:13 2019 +0800
----------------------------------------------------------------------
.../puppet/modules/alluxio/manifests/init.pp | 23 +++++----
.../modules/alluxio/templates/log4j.properties | 50 ++++++++++++++------
2 files changed, 51 insertions(+), 22 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/bigtop/blob/a58f3ee8/bigtop-deploy/puppet/modules/alluxio/manifests/init.pp
----------------------------------------------------------------------
diff --git a/bigtop-deploy/puppet/modules/alluxio/manifests/init.pp b/bigtop-deploy/puppet/modules/alluxio/manifests/init.pp
index 104133e..9c3c10f 100644
--- a/bigtop-deploy/puppet/modules/alluxio/manifests/init.pp
+++ b/bigtop-deploy/puppet/modules/alluxio/manifests/init.pp
@@ -26,6 +26,11 @@ class alluxio {
ensure => latest,
}
+ exec { "daemon-reload":
+ command => "/usr/bin/systemctl daemon-reload",
+ require => [ Package["alluxio"] ]
+ }
+
# add logging into /var/log/..
file {
"/etc/alluxio/conf/log4j.properties":
@@ -43,7 +48,7 @@ class alluxio {
class master {
include alluxio::common
- exec {
+ exec {
"alluxio formatting":
command => "/usr/lib/alluxio/bin/alluxio format",
require => [ Package["alluxio"], File["/etc/alluxio/conf/log4j.properties"], File["/etc/alluxio/conf/alluxio-env.sh"] ]
@@ -52,7 +57,8 @@ class alluxio {
if ( $fqdn == $alluxio::common::master_host ) {
service { "alluxio-master":
ensure => running,
- require => [ Package["alluxio"], Exec["alluxio formatting"] ],
+ require => [ Package["alluxio"], Exec["daemon-reload"], Exec["alluxio formatting"] ],
+ subscribe => [ File["/etc/alluxio/conf/log4j.properties"], File["/etc/alluxio/conf/alluxio-env.sh"] ],
hasrestart => true,
hasstatus => true,
}
@@ -63,15 +69,16 @@ class alluxio {
class worker {
include alluxio::common
- if ( $fqdn == $alluxio::common::master_host ) {
- notice("alluxio ---> master host")
- # We want master to run first in all cases
- Service["alluxio-master"] ~> Service["alluxio-worker"]
- }
+ if ( $fqdn == $alluxio::common::master_host ) {
+ notice("alluxio ---> master host")
+ # We want master to run first in all cases
+ Service["alluxio-master"] ~> Service["alluxio-worker"]
+ }
service { "alluxio-worker":
ensure => running,
- require => [ Package["alluxio"], File["/etc/alluxio/conf/log4j.properties"], File["/etc/alluxio/conf/alluxio-env.sh"] ],
+ require => [ Package["alluxio"], Exec["daemon-reload"], File["/etc/alluxio/conf/log4j.properties"], File["/etc/alluxio/conf/alluxio-env.sh"] ],
+ subscribe => [ File["/etc/alluxio/conf/log4j.properties"], File["/etc/alluxio/conf/alluxio-env.sh"] ],
hasrestart => true,
hasstatus => true,
}
http://git-wip-us.apache.org/repos/asf/bigtop/blob/a58f3ee8/bigtop-deploy/puppet/modules/alluxio/templates/log4j.properties
----------------------------------------------------------------------
diff --git a/bigtop-deploy/puppet/modules/alluxio/templates/log4j.properties b/bigtop-deploy/puppet/modules/alluxio/templates/log4j.properties
index 7ef17e6..00b402e 100644
--- a/bigtop-deploy/puppet/modules/alluxio/templates/log4j.properties
+++ b/bigtop-deploy/puppet/modules/alluxio/templates/log4j.properties
@@ -12,6 +12,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
+
# May get overridden by System Property
alluxio.logger.type=Console
@@ -23,33 +24,54 @@ log4j.appender.Console.layout=org.apache.log4j.PatternLayout
log4j.appender.Console.layout.ConversionPattern=%d{ISO8601} %-5p %c{1} (%F:%M) - %m%n
# Appender for Master
-log4j.appender.MASTER_LOGGER=alluxio.Log4jFileAppender
-log4j.appender.MASTER_LOGGER.File=/var/log/alluxio/master.log
-
-log4j.appender.MASTER_LOGGER.MaxFileSize=10
+log4j.appender.MASTER_LOGGER=org.apache.log4j.RollingFileAppender
+log4j.appender.MASTER_LOGGER.File=${alluxio.logs.dir}/master.log
+log4j.appender.MASTER_LOGGER.MaxFileSize=10MB
log4j.appender.MASTER_LOGGER.MaxBackupIndex=100
-log4j.appender.MASTER_LOGGER.DeletionPercentage=10
log4j.appender.MASTER_LOGGER.layout=org.apache.log4j.PatternLayout
log4j.appender.MASTER_LOGGER.layout.ConversionPattern=%d{ISO8601} %-5p %c{2} (%F:%M) - %m%n
#log4j.appender.MASTER_LOGGER.layout.ConversionPattern=%d{ISO8601} %-5p %c{2} (%F:%M(%L)) - %m%n
-# Appender for Workers
-log4j.appender.WORKER_LOGGER=alluxio.Log4jFileAppender
-log4j.appender.WORKER_LOGGER.File=/var/log/alluxio/worker.log
+# Appender for Master Access Log
+log4j.appender.MASTER_ACCESS_LOGGER=org.apache.log4j.RollingFileAppender
+log4j.appender.MASTER_ACCESS_LOGGER.File=${alluxio.logs.dir}/master_access.log
+log4j.appender.MASTER_ACCESS_LOGGER.MaxFileSize=10MB
+log4j.appender.MASTER_ACCESS_LOGGER.MaxBackupIndex=100
+log4j.appender.MASTER_ACCESS_LOGGER.layout=org.apache.log4j.PatternLayout
+log4j.appender.MASTER_ACCESS_LOGGER.layout.ConversionPattern=%d{ISO8601} %-5p %c{2} (%F:%M) - %m%n
+#log4j.appender.MASTER_ACCESS_LOGGER.layout.ConversionPattern=%d{ISO8601} %-5p %c{2} (%F:%M(%L)) - %m%n
-log4j.appender.WORKER_LOGGER.MaxFileSize=10
+# Appender for Workers
+log4j.appender.WORKER_LOGGER=org.apache.log4j.RollingFileAppender
+log4j.appender.WORKER_LOGGER.File=${alluxio.logs.dir}/worker.log
+log4j.appender.WORKER_LOGGER.MaxFileSize=10MB
log4j.appender.WORKER_LOGGER.MaxBackupIndex=100
-log4j.appender.WORKER_LOGGER.DeletionPercentage=10
log4j.appender.WORKER_LOGGER.layout=org.apache.log4j.PatternLayout
log4j.appender.WORKER_LOGGER.layout.ConversionPattern=%d{ISO8601} %-5p %c{2} (%F:%M) - %m%n
#log4j.appender.WORKER_LOGGER.layout.ConversionPattern=%d{ISO8601} %-5p %c{2} (%F:%M(%L)) - %m%n
+# Appender for Worker Access Log
+log4j.appender.WORKER_ACCESS_LOGGER=org.apache.log4j.RollingFileAppender
+log4j.appender.WORKER_ACCESS_LOGGER.File=${alluxio.logs.dir}/worker_access.log
+log4j.appender.WORKER_ACCESS_LOGGER.MaxFileSize=10MB
+log4j.appender.WORKER_ACCESS_LOGGER.MaxBackupIndex=100
+log4j.appender.WORKER_ACCESS_LOGGER.layout=org.apache.log4j.PatternLayout
+log4j.appender.WORKER_ACCESS_LOGGER.layout.ConversionPattern=%d{ISO8601} %-5p %c{2} (%F:%M) - %m%n
+#log4j.appender.WORKER_ACCESS_LOGGER.layout.ConversionPattern=%d{ISO8601} %-5p %c{2} (%F:%M(%L)) - %m%n
+
# Appender for User
-log4j.appender.USER_LOGGER=alluxio.Log4jFileAppender
-log4j.appender.USER_LOGGER.File=/var/log/alluxio/logs/user.log
-log4j.appender.USER_LOGGER.MaxFileSize=10
+log4j.appender.USER_LOGGER=org.apache.log4j.RollingFileAppender
+log4j.appender.USER_LOGGER.File=${alluxio.logs.dir}/user.log
+log4j.appender.USER_LOGGER.MaxFileSize=10MB
log4j.appender.USER_LOGGER.MaxBackupIndex=10
-log4j.appender.USER_LOGGER.DeletionPercentage=20
log4j.appender.USER_LOGGER.layout=org.apache.log4j.PatternLayout
log4j.appender.USER_LOGGER.layout.ConversionPattern=%d{ISO8601} %-5p %c{2} (%F:%M) - %m%n
#log4j.appender.USER_LOGGER.layout.ConversionPattern=%d{ISO8601} %-5p %c{2} (%F:%M(%L)) - %m%n
+
+# Appender for Fuse
+log4j.appender.FUSE_LOGGER=org.apache.log4j.RollingFileAppender
+log4j.appender.FUSE_LOGGER.File=${alluxio.logs.dir}/fuse.log
+log4j.appender.FUSE_LOGGER.MaxFileSize=10MB
+log4j.appender.FUSE_LOGGER.MaxBackupIndex=10
+log4j.appender.FUSE_LOGGER.layout=org.apache.log4j.PatternLayout
+log4j.appender.FUSE_LOGGER.layout.ConversionPattern=%d{ISO8601} %-5p %c{2} (%F:%M) - %m%n