[PATCH 0/3] Event API back end for syslog
by Jason Guiditta
This patchset implements the feature in $subject, Redmine feature:
https://www.aeolusproject.org/redmine/issues/2509
I am resending patch 1 due to no feedback on previous send. There is
a minor change to calling process on an event, in that if you wish to
specify a converter, you pass in an object, rather than a magic string.
However, this causes no change on the default call (syslog), it merely
opens up an easy way to later pass in custom-configured converters. For
instance, we may want to allow the app/user to specify a different facility
or ident which is different from the default we are using now.
Once again, tests can be run with:
rspec spec/aeolus/event/*.rb --format doc
[PATCH conductor 1/3] RM #2822: Add way to retrieve full list of
[PATCH conductor 2/3] Redmine #2514: Write and test transformation
[PATCH conductor 3/3] Redmine #2515: Write and test actual logging
-j
12 years, 3 months
End-of-sprint branching/repofreeze EOD Thursday
by steve linabery
Hi Aeolus Community,
Sometime toward the close of business GMT-0500 on Thursday, 1 Dec 2011, we will be creating git branches for Release Candidates on the packages that belong specifically to the aeolus project (i.e. conductor, configure, aeolus-cli, etc.)
Following the cutoff we will only cherry-pick patches over to the release with appropriate authorization from a team manager.
So please shepherd your commits onto master before COB on Thursday if you want 'em in the forthcoming aeolus 0.7.0 release.
Thank you!
Steve|eggs
12 years, 3 months
[PATCH aeolus-image-rubygem] Fixed creation of a bucket when saving a bucket object
by Jan Provazník
From: Jan Provaznik <jprovazn(a)redhat.com>
https://www.aeolusproject.org/redmine/issues/2863
Before a template or image is saved into warehouse, check if the
bucket for the template/image exists, if not, create it.
---
.../model/warehouse/warehouse_model.rb | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/lib/aeolus_image/model/warehouse/warehouse_model.rb b/lib/aeolus_image/model/warehouse/warehouse_model.rb
index 6ec02fa..ab2498e 100644
--- a/lib/aeolus_image/model/warehouse/warehouse_model.rb
+++ b/lib/aeolus_image/model/warehouse/warehouse_model.rb
@@ -154,6 +154,17 @@ module Aeolus
def create!(key, body, attributes)
self.set_warehouse_and_bucket if self.bucket.nil?
+ unless self.warehouse.buckets.include?(self.bucket.name)
+ begin
+ self.bucket = self.warehouse.create_bucket(self.bucket.name)
+ rescue
+ # there was an iwhd bug ago - it wasn't possible to find out
+ # if a bucket exists or not, then code 500 was returned.
+ # I'm not sure if it's already fixed or not so I'm wrapping it
+ # with rescue block. If exception is raised we can assume
+ # that bucket already exists.
+ end
+ end
obj = self.bucket.create_object(key, body, attributes)
self.new(obj)
end
--
1.7.6.4
12 years, 3 months
[PATCH aeolus-cli 0/2] Refactor option parser to resolve BZ #754956
by Petr Blaho
The bug showed that options definitions for OptionParser was duplicated.
There were some options defined more than once and only last definition takes action
so some parameters did not work.
OptionParser did not distinguish between commands (list, push, delete, etc.) used in aeolus-cli
Me and mzatko refactored code for parsing cli options and extended test coverage of this code.
12 years, 3 months
[PATCH conductor] Fixing message for user creation
by Imre Farkas
From: Imre Farkas <ifarkas(a)redhat.com>
https://bugzilla.redhat.com/show_bug.cgi?id=751364
---
src/config/locales/en.yml | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/config/locales/en.yml b/src/config/locales/en.yml
index f69c3b1..33453f2 100644
--- a/src/config/locales/en.yml
+++ b/src/config/locales/en.yml
@@ -30,7 +30,7 @@ en:
user_status: User Status
new:
new_user: New User
- neccessary_information: "Enter necessary information about your new user and click 'Create User' when you are finished."
+ neccessary_information: "Enter necessary information about your new user and click 'Save User' when you are finished."
list:
delete_selected: Delete Selected
unlimited: Unlimited
--
1.7.6.4
12 years, 3 months
[PATCH conductor] Adding required fields indicator for user form
by Imre Farkas
From: Imre Farkas <ifarkas(a)redhat.com>
---
src/app/helpers/application_helper.rb | 18 ++++++++++++++++++
src/app/views/users/_form.html.haml | 8 ++++----
src/app/views/users/edit.html.haml | 2 +-
src/app/views/users/new.html.haml | 2 +-
4 files changed, 24 insertions(+), 6 deletions(-)
diff --git a/src/app/helpers/application_helper.rb b/src/app/helpers/application_helper.rb
index cbb7a43..2c6aa05 100644
--- a/src/app/helpers/application_helper.rb
+++ b/src/app/helpers/application_helper.rb
@@ -161,4 +161,22 @@ module ApplicationHelper
end
module_function :count_uptime
+
+ class FormBuilderWithRequiredFields < ActionView::Helpers::FormBuilder
+
+ def label(method, text = nil, options = {}, &block)
+ text << ' *' if required?(object, method, options)
+ super(method, text, options, &block)
+ end
+
+ private
+
+ def required?(object, attribute, options)
+ return options[:required] if options.has_key?(:required)
+ object.class.validators_on(attribute).map(&:class).include? ActiveModel::Validations::PresenceValidator
+ end
+
+ end
+
end
+
diff --git a/src/app/views/users/_form.html.haml b/src/app/views/users/_form.html.haml
index 665a35c..e3b8945 100644
--- a/src/app/views/users/_form.html.haml
+++ b/src/app/views/users/_form.html.haml
@@ -9,17 +9,17 @@
= form.label :last_name, t(:last_name)
= form.text_field :last_name, :class =>"check_change"
%p
- = form.label :email, t(:email)
+ = form.label :email, t(:email), :required => true
= form.text_field :email, :class =>"check_change"
%fieldset
%p
- = form.label :login, t(:choose_name)
+ = form.label :login, t(:choose_name), :required => true
= form.text_field :login, :class => "em check_change"
%p
- = form.label :password, form.object.new_record? ? t(:choose_password) : t(:change_password)
+ = form.label :password, form.object.new_record? ? t(:choose_password) : t(:change_password), :required => form.object.new_record?
= form.password_field :password
%p
- = form.label :password_confirmation, t(:confirm_password)
+ = form.label :password_confirmation, t(:confirm_password), :required => form.object.new_record?
= form.password_field :password_confirmation
-if check_privilege(Privilege::MODIFY, User)
diff --git a/src/app/views/users/edit.html.haml b/src/app/views/users/edit.html.haml
index 70bf0c4..81e42db 100644
--- a/src/app/views/users/edit.html.haml
+++ b/src/app/views/users/edit.html.haml
@@ -21,5 +21,5 @@
%dd#email= @user.email
%dt=t'users.show.username'
%dd#login= @user.login
- = form_for @user, :url => user_path(@user), :html => { :method => :put, :class => 'generic' } do |f|
+ = form_for @user, :url => user_path(@user), :builder => ApplicationHelper::FormBuilderWithRequiredFields, :html => { :method => :put, :class => 'generic' } do |f|
= render :partial => "form", :locals => { :form => f, :cancel_path => users_path }
diff --git a/src/app/views/users/new.html.haml b/src/app/views/users/new.html.haml
index e6e914d..b612564 100644
--- a/src/app/views/users/new.html.haml
+++ b/src/app/views/users/new.html.haml
@@ -23,7 +23,7 @@
%dd#email
%dt=t'users.show.username'
%dd#login
- = form_for @user, :url => users_path, :html => {:class => 'generic'} do |f|
+ = form_for @user, :url => users_path, :builder => ApplicationHelper::FormBuilderWithRequiredFields, :html => {:class => 'generic'} do |f|
-if current_user
= render :partial => "form", :locals => { :form => f }
-else
--
1.7.6.4
12 years, 3 months
Possible bug, or missing documentation (not sure =).
by Kurt Seifried
Ok so I got RHEVM setup and working, and setup a new Aeolus 0.6.0 on
RHEL 6 attached to it (seems to have worked, when I added the
accounts/etc. I didn't get an error so that's good). But when I try to
build an image it fails, I investigated and I think I may have found
part of the problem but am not sure, thought I'd run it by you guys for
comment before I spend a ton of time on it:
-------------------------------------------------------------------------
[root@aeolus-060 ~]# aeolus-cli build --target rhevm --template template.xml
Image: 633bb742-c37e-402e-9659-9dd793c68686
Build: fa23f04a-8c28-4101-8ed0-dccd360194e0
Target Image: ba9aa6a2-fc4b-42a1-8fb0-d66d6e7f936f :Status BUILDING
-------------------------------------------------------------------------
2011-11-29 17:49:38,993 DEBUG
imgfac.builders.BaseBuilder.Fedora_rhevm_Builder pid(4161) Message:
Found neither a call-time config nor a config file - doing nothing
2011-11-29 17:49:39,073 DEBUG paste.httpserver.ThreadPool pid(4161)
Message: Added task (0 tasks queued)
2011-11-29 17:49:39,426 DEBUG oz.Guest.FedoraGuest pid(4161) Message:
libvirt bridge name is virbr0
2011-11-29 17:49:39,432 DEBUG
imgfac.builders.BaseBuilder.Fedora_rhevm_Builder pid(4161) Message:
Exception caught in ImageFactory
2011-11-29 17:49:39,436 DEBUG
imgfac.builders.BaseBuilder.Fedora_rhevm_Builder pid(4161) Message:
Traceback (most recent call last):
File
"/usr/lib/python2.6/site-packages/imgfac/builders/Fedora_rhevm_Builder.py",
line 65, in build_image
self.build_upload(build_id)
File
"/usr/lib/python2.6/site-packages/imgfac/builders/Fedora_rhevm_Builder.py",
line 92, in build_upload
guest = oz.GuestFactory.guest_factory(self.tdlobj, oz_config, None)
File "/usr/lib/python2.6/site-packages/oz/GuestFactory.py", line 52,
in guest_factory
klass = oz.Fedora.get_class(tdl, config, auto, output_disk)
File "/usr/lib/python2.6/site-packages/oz/Fedora.py", line 98, in
get_class
output_disk)
File "/usr/lib/python2.6/site-packages/oz/Fedora.py", line 43, in __init__
True, True, directkernel)
File "/usr/lib/python2.6/site-packages/oz/RedHat.py", line 42, in __init__
None, None, diskbus, iso_allowed, url_allowed)
File "/usr/lib/python2.6/site-packages/oz/Guest.py", line 1152, in
__init__
mousetype, diskbus, iso_allowed, url_allowed)
File "/usr/lib/python2.6/site-packages/oz/Guest.py", line 179, in __init__
self.connect_to_libvirt()
File "/usr/lib/python2.6/site-packages/oz/Guest.py", line 122, in
connect_to_libvirt
self._discover_libvirt_type()
File "/usr/lib/python2.6/site-packages/oz/Guest.py", line 74, in
_discover_libvirt_type
raise oz.OzException.OzException("This host does not support
virtualization type kvm or qemu")
OzException: This host does not support virtualization type kvm or qemu
2011-11-29 17:49:39,440 DEBUG imgfac.BuildJob.BuildJob pid(4161)
Message: Builder (952fac2d-df7d-42cd-b2bc-3c9d6affd716) changed status
from BUILDING to FAILED
-------------------------------------------------------------------------
So looking through "aeolus-cli -h" I'm not seeing anything for
kvm/qemu/config type of options. Now reading the code we got things like:
@config_location = "~/.aeolus-cli"
is this
/usr/lib/ruby/gems/1.8/gems/aeolus-cli-0.1.0/examples/aeolus-cli
a correct example? If so what should I add, something like
:conductor:
:virtualization: kvm
or?
--
-Kurt Seifried / Red Hat Security Response Team
12 years, 3 months
[PATCH] Build & Push section for Deployable Details
by Tomas Sedovic
This patch implements:
https://www.aeolusproject.org/redmine/issues/2853
The page is not styled yet.
Note for the reviewers: to test this you need imagefactory-0.9.1-1 and
aeolus-image-rubygem built from the latest source (it must include commit
289dcbf0bf53d24c9da6532fec8c6b6219187e33).
Rebuild all and push all should be working (tested on mock & ec2) and it should
display the proper status (i.e. "not built" or "pushing").
If you deem the code worthy or only needing a couple of tiny fixes, feel free
to push it, dear reviewer. This should definitely get into the upcoming release.
Thanks,
Thomas
12 years, 3 months
[PATCH conductor] remove repeating sql statements in rails.log
by Mo Morsi
there will still be some sql that gets logged when conductor/dbomatic
initially comes up, regarding querying the db for activerecord model
information. Unfotunately nothing we can do about that bu this removes
the regularily repeating sql log statements
---
src/dbomatic/dbomatic | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/src/dbomatic/dbomatic b/src/dbomatic/dbomatic
index 2b6aed7..24e7e30 100755
--- a/src/dbomatic/dbomatic
+++ b/src/dbomatic/dbomatic
@@ -234,6 +234,7 @@ def refresh_instances
# before forking, and then have each child re-establish their own connection.
# We also have to have the parent re-establish the connection so that
# "collect_accounts" works properly
+ ActiveRecord::Base.logger = nil
ActiveRecord::Base.remove_connection
accounts.each do |account|
pid = Process.fork
--
1.7.6.4
12 years, 3 months