From e6ea75052fb47c7fca1f1a7b0347baf231c61d8c Mon Sep 17 00:00:00 2001 From: xiaodongwang Date: Sat, 20 Sep 2014 22:19:05 -0700 Subject: [PATCH] update compass-core code when log location chagned Change-Id: Ia68fc70e3e4045db28f92592804d4a7284fe328c --- compass/db/api/host.py | 2 +- compass/utils/setting_wrapper.py | 6 +++--- conf/setting | 2 +- misc/rsyslog/rsyslog.conf | 6 +++--- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/compass/db/api/host.py b/compass/db/api/host.py index 5345cb55..bb7e0d92 100644 --- a/compass/db/api/host.py +++ b/compass/db/api/host.py @@ -219,7 +219,7 @@ def is_host_editable( reinstall_os_set=False, exception_when_not_editable=True ): if reinstall_os_set: - if host.state.state == 'DEPLOYING': + if host.state.state == 'INSTALLING': return _conditional_exception( host, exception_when_not_editable ) diff --git a/compass/utils/setting_wrapper.py b/compass/utils/setting_wrapper.py index 0bd38f12..1f528fec 100644 --- a/compass/utils/setting_wrapper.py +++ b/compass/utils/setting_wrapper.py @@ -30,10 +30,10 @@ SQLALCHEMY_DATABASE_POOL_SIZE = 10 SQLALCHEMY_DATABASE_POOL_RECYCLE_PERIOD = 7200 INSTALLATION_LOGDIR = { 'CobblerInstaller': '/var/log/cobbler/anamon', - 'ChefInstaller': '/var/log/cobbler/anamon' + 'ChefInstaller': '/var/log/chef' } -CLUSTERHOST_INATALLATION_LOGDIR_NAME = 'hostname' -HOST_INSTALLATION_LOGDIR_NAME = 'hostname' +CLUSTERHOST_INATALLATION_LOGDIR_NAME = 'name' +HOST_INSTALLATION_LOGDIR_NAME = 'name' DEFAULT_LOGLEVEL = 'debug' DEFAULT_LOGDIR = '/tmp' DEFAULT_LOGINTERVAL = 1 diff --git a/conf/setting b/conf/setting index 5a5f7a62..6dbd0146 100644 --- a/conf/setting +++ b/conf/setting @@ -7,7 +7,7 @@ DATABASE_NAME = 'db' SQLALCHEMY_DATABASE_URI = '%s://%s:%s@%s/%s' % (DATABASE_TYPE, DATABASE_USER, DATABASE_PASSWORD, DATABASE_SERVER, DATABASE_NAME) INSTALLATION_LOGDIR = { 'CobblerInstaller': '/var/log/cobbler/anamon', - 'ChefInstaller': '/var/log/cobbler/anamon' + 'ChefInstaller': '/var/log/chef' } DEFAULT_LOGLEVEL = 'debug' DEFAULT_LOGDIR = '/var/log/compass' diff --git a/misc/rsyslog/rsyslog.conf b/misc/rsyslog/rsyslog.conf index fbbedc9f..3ebde45b 100644 --- a/misc/rsyslog/rsyslog.conf +++ b/misc/rsyslog/rsyslog.conf @@ -21,10 +21,10 @@ $InputTCPServerRun 514 $WorkDirectory /var/lib/rsyslog # Added for chef logfiles -$template Chef_log,"/var/log/cobbler/anamon/%hostname%/chef-client.log" +$template Chef_log,"/var/log/chef/%syslogtag%/chef-client.log" $template Raw, "%rawmsg%" $template CustomLog, "%msg:::sp-if-no-1st-sp%%msg:::drop-last-lf%\n" -$template Openstack_log, "/var/log/cobbler/anamon/%hostname%/%programname%.log" +$template Chef_Openstack_log, "/var/log/chef/%hostname%/%programname%.log" #### GLOBAL DIRECTIVES #### # Use default timestamp format @@ -76,7 +76,7 @@ local7.* /var/log/boot.log local3.* -?Chef_log -local4.* -?Openstack_log;CustomLog +local4.* -?Chef_Openstack_log;CustomLog # ### begin forwarding rule ### # The statement between the begin ... end define a SINGLE forwarding