Aeolus conductor problem
by seb delta
Hello everyone,
I recently started installing aeolus conductor but when I run:
*sudo /usr/sbin/aeolus-cleanup*
I encounter this error
*sudo: /usr/sbin/aeolus-cleanup: command not found*
can I get a little help please
13 years
[PATCH conductor] BZ 693669 - Account Id is blank in UI after adding a provider account
by Richard Su
account_name changed to account_id to match credential definition.
Bug 974
---
.../views/admin/provider_accounts/_properties.haml | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/app/views/admin/provider_accounts/_properties.haml b/src/app/views/admin/provider_accounts/_properties.haml
index 27789a1..7dbf573 100644
--- a/src/app/views/admin/provider_accounts/_properties.haml
+++ b/src/app/views/admin/provider_accounts/_properties.haml
@@ -8,6 +8,6 @@
%p
%label
Account ID:
- = @account.credentials_hash['account_number']
+ = @account.credentials_hash['account_id']
= link_to "Edit", edit_admin_provider_account_path(@account), { :class => 'button' }
= link_to "Test", admin_provider_account_path(@account, {:test_account => true}), { :class => 'button' }
--
1.7.4
13 years
Reduce unnecessary updates in Solr
by Matt Wagner
Hi all,
I just noticed something fun. Authlogic updates the User record on every
page load because :last_request_at and :perishable_token are updated.
Additionally, sunspot will update the record in Solr on every save, even
if none of the indexed columns were updated.
As a result, we are re-indexing the logged-in user on every single page
load, even though none of the indexed columns have changed.
This patch is the quick fix; we use :ignore_attribute_changes_of to
ignore the non-indexed columns (see
https://github.com/outoftime/sunspot_rails/wiki/Installation-and-configur... ).
Note that I didn't do this on all models, only User, because this
doesn't feel like a particularly elegant solution, and because User is
the only one causing problems.
I'd also argue that we might want to drop the last_request_at column
unless we have a compelling reason to keep it. perishable_token is only
updated when the record is modified, so if we drop last_request_at,
we would only have to update the record once at login (in support of
last_login_at, etc.), or when the account was genuinely edited.
To verify that things work as intended, you can tail
log/sunspot-solr-*.log, or, if you really want to be fancy, snoop on
Solr with "sudo
tcpdump -vvvXs 1500 -i lo 'port 8982'". 8982 is the port used in
development; production mode uses 8983.
-- Matt
13 years
Redmine #692 (rebased)
by Tomas Sedovic
This fixes the task #692.
Since this changed things in the factory and condor interfaces, please make
sure that you do a full end-end testing (building a new image, uploading it to
the cloud and starting an instance) when reviewing this.
13 years
[PATCH conductor] task 1104: handle condor log rotations in dbomatic (rev 5)
by Mo Morsi
---
src/dbomatic/dbomatic | 51 +++++++++++++++++++++++++++++++-----------------
1 files changed, 33 insertions(+), 18 deletions(-)
diff --git a/src/dbomatic/dbomatic b/src/dbomatic/dbomatic
index 1cd1229..40cadb0 100755
--- a/src/dbomatic/dbomatic
+++ b/src/dbomatic/dbomatic
@@ -254,6 +254,21 @@ def parse_log_file(log_file, parser)
File.open(EVENT_LOG_POS_FILE, 'w') { |f| f.write log_file.pos.to_s }
end
+def setup_event_file_notifications(notifier, parser, log_file)
+ # Setup inotify watch for condor event log
+ notifier.watch(CONDOR_EVENT_LOG_FILE, :modify){ |event|
+ logger.info "modified: #{CONDOR_EVENT_LOG_FILE}"
+ parse_log_file log_file, parser
+ }
+ # adjust parser if log file has been truncated
+ notifier.watch(CONDOR_EVENT_LOG_FILE, :close_write){ |event|
+ if File.size(CONDOR_EVENT_LOG_FILE) == 0
+ setup_event_file_notifications(notifier, parser, log_file)
+ logger.info "close_write: #{CONDOR_EVENT_LOG_FILE}"
+ end
+ }
+end
+
begin
DBOMATIC_PID_FILE = "#{dbomatic_pid_dir}/dbomatic.pid"
FileUtils.mkdir_p File.dirname(DBOMATIC_PID_FILE)
@@ -282,26 +297,26 @@ begin
logger.info "done"
end
- # Setup inotify watch for condor event log
- notifier.watch(CONDOR_EVENT_LOG_FILE, :modify){ |event|
- parse_log_file log_file, parser
- }
-
- # if log file doesn't exist wait until it does
- else
- notifier.watch(condor_event_log_dir, :create){ |event|
- if event.name == "EventLog"
- log_file = File.open(CONDOR_EVENT_LOG_FILE)
- parse_log_file log_file, parser
-
- # Setup inotify watch for condor event log
- notifier.watch(CONDOR_EVENT_LOG_FILE, :modify){ |event|
- parse_log_file log_file, parser
- }
- end
- }
+ setup_event_log_notifications notifier, parser, log_file
end
+ # if log file doesn't exist wait until it does
+ notifier.watch(condor_event_log_dir, :create){ |event|
+ if event.name == "EventLog"
+ logger.info "created: EVENTLOG"
+ log_file = File.open(CONDOR_EVENT_LOG_FILE)
+ parse_log_file log_file, parser
+ setup_event_log_notifications notifier, parser, log_file
+ end
+ }
+
+ notifier.watch(condor_event_log_dir, :delete, :moved_from){ |event|
+ if event.name == "EventLog"
+ logger.info "deleted: EVENTLOG"
+ File.open(EVENT_LOG_POS_FILE, 'w') { |f| f.write "0" }
+ end
+ }
+
while true
begin
notifier.run
--
1.7.2.3
13 years
[PATCH conductor] task 1104: handle condor log rotations in dbomatic (rev 4)
by Mo Morsi
many thx to matty_dubs for sticking around and helping debug this
---
src/dbomatic/dbomatic | 40 ++++++++++++++++++++++++++++------------
1 files changed, 28 insertions(+), 12 deletions(-)
diff --git a/src/dbomatic/dbomatic b/src/dbomatic/dbomatic
index 1cd1229..d2fd0b4 100755
--- a/src/dbomatic/dbomatic
+++ b/src/dbomatic/dbomatic
@@ -286,21 +286,37 @@ begin
notifier.watch(CONDOR_EVENT_LOG_FILE, :modify){ |event|
parse_log_file log_file, parser
}
+ # adjust parser if log file has been truncated
+ notifier.watch(CONDOR_EVENT_LOG_FILE, :close_write){ |event|
+ s = File.size(CONDOR_EVENT_LOG_FILE)
+ log_file.pos = s if log_file.pos < s
+ }
+ end
- # if log file doesn't exist wait until it does
- else
- notifier.watch(condor_event_log_dir, :create){ |event|
- if event.name == "EventLog"
- log_file = File.open(CONDOR_EVENT_LOG_FILE)
+ # if log file doesn't exist wait until it does
+ notifier.watch(condor_event_log_dir, :create, :moved_to){ |event|
+ if event.name == "EventLog"
+ log_file = File.open(CONDOR_EVENT_LOG_FILE)
+ parse_log_file log_file, parser
+
+ # Setup inotify watch for condor event log
+ notifier.watch(CONDOR_EVENT_LOG_FILE, :modify){ |event|
parse_log_file log_file, parser
+ }
+ # adjust parser if log file has been truncated
+ notifier.watch(CONDOR_EVENT_LOG_FILE, :close_write){ |event|
+ s = File.size(CONDOR_EVENT_LOG_FILE)
+ log_file.pos = s if log_file.pos < s
+ }
+ end
+ }
- # Setup inotify watch for condor event log
- notifier.watch(CONDOR_EVENT_LOG_FILE, :modify){ |event|
- parse_log_file log_file, parser
- }
- end
- }
- end
+ notifier.watch(condor_event_log_dir, :delete, :moved_from){ |event|
+ if event.name == "EventLog"
+ log_file.close
+ File.open(EVENT_LOG_POS_FILE, 'w') { |f| f.write "0" }
+ end
+ }
while true
begin
--
1.7.2.3
13 years
[PATCH conductor] task 1104: handle condor log rotations in dbomatic (rev 3)
by Mo Morsi
---
src/dbomatic/dbomatic | 27 +++++++++++++++------------
1 files changed, 15 insertions(+), 12 deletions(-)
diff --git a/src/dbomatic/dbomatic b/src/dbomatic/dbomatic
index 1cd1229..67b9d20 100755
--- a/src/dbomatic/dbomatic
+++ b/src/dbomatic/dbomatic
@@ -286,21 +286,24 @@ begin
notifier.watch(CONDOR_EVENT_LOG_FILE, :modify){ |event|
parse_log_file log_file, parser
}
+ end
+
+ # if log file doesn't exist wait until it does
+ notifier.watch(condor_event_log_dir, :create){ |event|
+ if event.name == "EventLog"
+ log_file = File.open(CONDOR_EVENT_LOG_FILE)
+ parse_log_file log_file, parser
- # if log file doesn't exist wait until it does
- else
- notifier.watch(condor_event_log_dir, :create){ |event|
- if event.name == "EventLog"
- log_file = File.open(CONDOR_EVENT_LOG_FILE)
+ # Setup inotify watch for condor event log
+ notifier.watch(CONDOR_EVENT_LOG_FILE, :modify){ |event|
parse_log_file log_file, parser
+ }
+ end
+ }
- # Setup inotify watch for condor event log
- notifier.watch(CONDOR_EVENT_LOG_FILE, :modify){ |event|
- parse_log_file log_file, parser
- }
- end
- }
- end
+ notifier.watch(condor_event_log_dir, :move){ |event|
+ log_file.close if event.name == "EventLog"
+ }
while true
begin
--
1.7.2.3
13 years
[PATCH] task 1104 handle condor log rotations in dbomatic
by Mo Morsi
---
src/dbomatic/dbomatic | 14 ++++++++++++--
1 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/src/dbomatic/dbomatic b/src/dbomatic/dbomatic
index 1cd1229..7453262 100755
--- a/src/dbomatic/dbomatic
+++ b/src/dbomatic/dbomatic
@@ -284,7 +284,12 @@ begin
# Setup inotify watch for condor event log
notifier.watch(CONDOR_EVENT_LOG_FILE, :modify){ |event|
- parse_log_file log_file, parser
+ parse_log_file log_file, parser if File.exists?(CONDOR_EVENT_LOG_FILE)
+ }
+
+ # the log was rotated out
+ notifier.watch(CONDOR_EVENT_LOG_FILE, :moved_to){ |event|
+ log_file.close
}
# if log file doesn't exist wait until it does
@@ -296,7 +301,12 @@ begin
# Setup inotify watch for condor event log
notifier.watch(CONDOR_EVENT_LOG_FILE, :modify){ |event|
- parse_log_file log_file, parser
+ parse_log_file log_file, parser if File.exists?(CONDOR_EVENT_LOG_FILE)
+ }
+
+ # the log was rotated out
+ notifier.watch(CONDOR_EVENT_LOG_FILE, :moved_to){ |event|
+ log_file.close
}
end
}
--
1.7.2.3
13 years
[PATCH 00/11]: Clean up aeolus-conductor packaging
by Chris Lalancette
We've long wanted to clean up the way the aeolus packaging works.
This patch series does exactly that. Instead of copying everything
in the src/ directory and then just dumping it all in the RPM, we
instead copy over only the bits we need. This keeps the RPM much
cleaner and clearer.
Additionally, this patchset removes some dependencies that we've
been carrying in the RPM to make things work on a single machine.
Instead of carrying these dependencies in aeolus-conductor directly
(where they arguably don't belong), we instead introduce a new
package called aeolus-all. This is a meta-package that just pulls
in all of the dependencies necessary to get aeolus running on
a single machine.
Finally, note that I have not done a full end-to-end test with
these packages. I was able to successfully get through account
creation and image building up to the point where the image is
uploaded to EC2. It failed there. That being said, my feeling
is that this failure is not the fault of these patches.
Please review and ACK the ones that you are comfortable with.
13 years