[PATCH conductor 0/1] #798960 - Session timeout redirects to login page
by Matt Wagner
Hi all,
This addresses the fact that AJAX requests made after a session had timed out weren't doing anything sensible. I can't reproduce the exact issue described in the bug (in which the login page is displayed, poorly, as if it were a partial); I get an error that my credentials are invalid. This patch causes tabAjaxRequest to catch the HTTP 401 - Unauthenticated error and redirect you to the login page.
Please note that https://bugzilla.redhat.com/show_bug.cgi?id=799421 is still outstanding (and only furthers my opinion that the introduction of session which time out should be reverted because it was a feature request that has ended up causing multiple bugs). A good way to test this patch while avoiding the bug is #799421 is described in the original bug report for this bug. If you're testing locally, note that you could cheat and modify session_store.rb's :expire_after => to a value lower than 15.minutes.
-- Matt
12 years, 1 month
[PATCH configure] BZ 795935 - remove username from rhevm.json
by Richard Su
https://bugzilla.redhat.com/show_bug.cgi?id=795935
The passwords were removed in a previous patch. Both username and
password should be removed.
---
recipes/aeolus/templates/rhevm.json | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)
diff --git a/recipes/aeolus/templates/rhevm.json b/recipes/aeolus/templates/rhevm.json
index 21eae81..a719de0 100644
--- a/recipes/aeolus/templates/rhevm.json
+++ b/recipes/aeolus/templates/rhevm.json
@@ -5,7 +5,6 @@
params ||= {} -%>
"rhevm-<%= name %>":
{
- "username": "<%= params['deltacloud_username'] %>",
"nfs-dir": "<%= params['nfs_mount_point'] %>",
"nfs-path": "<%= params['nfs_export'] %>",
"nfs-host": "<%= params['nfs_server'] %>",
--
1.7.7.6
12 years, 1 month
Re: RFC re: 798960 -- session timeout-induced bug
by Hugh O. Brock
Hmmm... Problem is not timing out is a security hole. Is this anything more serious than a change to rails config?
-h
Matt Wagner <matt.wagner(a)redhat.com> wrote:
Hi folks,
The other day, https://bugzilla.redhat.com/show_bug.cgi?id=794536 was
entered -- "conductor should have an inactivity timeout."
I only noticed it after it was pushed, and I remarked on IRC that it
sounded more like an irritant than a good feature. Further, I suggested
that it was a new feature, not a bug, so it didn't belong in this
sprint. It sounded like there was some consensus on at least the second
point, but more in a "going forward" sense than in relation to this
specific bugfix.
I just noticed https://bugzilla.redhat.com/show_bug.cgi?id=798960 as I
was packing up for the day, which is marked as an urgent bug that is
wreaking havoc on QE. While it's a legitimate bug, it seems like it's
directly caused by the patch in #794536.
At the risk of sounding like a curmudgeon, I would propose that we
should revert the patch for 794536. The patch itself was good, but its
inclusion was out-of-scope for the sprint, and it's now causing a
high-priority bug.
Thoughts?
-- Matt
12 years, 1 month
[PATCH conductor] BZ790026-Deleting a provider with running instances does not show any message
by Tomas Hrcka
https://bugzilla.redhat.com/show_bug.cgi?id=790026
---
src/app/controllers/providers_controller.rb | 3 ++-
src/app/views/layouts/_new_notification.html.haml | 2 +-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/app/controllers/providers_controller.rb b/src/app/controllers/providers_controller.rb
index 0819b99..f57c243 100644
--- a/src/app/controllers/providers_controller.rb
+++ b/src/app/controllers/providers_controller.rb
@@ -32,7 +32,8 @@ class ProvidersController < ApplicationController
respond_to do |format|
format.html do
if @providers.present?
- redirect_to edit_provider_path(@provider), :notice => flash[:notice], :error => flash[:error]
+ flash.keep
+ redirect_to edit_provider_path(@provider)
else
render :action => :index
end
diff --git a/src/app/views/layouts/_new_notification.html.haml b/src/app/views/layouts/_new_notification.html.haml
index 54ed324..e7a38b4 100644
--- a/src/app/views/layouts/_new_notification.html.haml
+++ b/src/app/views/layouts/_new_notification.html.haml
@@ -62,7 +62,7 @@
%li= [k, v.present? ? ": #{v}" : '']
-else
-flash[:error][:failures].each do |k, v|
- %li= [v]
+ %li= [k,v]
-else
-flash[:error].each do |e|
%li= e
--
1.7.1
12 years, 1 month
[PATCH conductor] BZ#790250 Check Build Status on Show Image - jQuery template
by Imre Farkas
From: Imre Farkas <ifarkas(a)redhat.com>
---
src/app/controllers/images_controller.rb | 9 +++++++++
src/app/views/images/show.html.haml | 2 ++
2 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/src/app/controllers/images_controller.rb b/src/app/controllers/images_controller.rb
index dcca913..26f12df 100644
--- a/src/app/controllers/images_controller.rb
+++ b/src/app/controllers/images_controller.rb
@@ -75,6 +75,14 @@ class ImagesController < ApplicationController
result
end
+ active_builds_by_image_id = @account_groups.keys.inject(Hash.new({})) do |result, driver|
+ result[(a)image.id] = {} unless result.has_key?((a)image.id)
+ result[(a)image.id][driver] = @builder.find_active_build_by_imageid((a)image.id, driver)
+ result[(a)image.id][driver].attributes['status'].capitalize! if result[(a)image.id][driver]
+
+ result
+ end
+
active_pushes = @account_groups.inject({}) do |result, (driver, group)|
timg = @target_images_by_target[driver]
group[:accounts].each do |account|
@@ -114,6 +122,7 @@ class ImagesController < ApplicationController
:provider_images => provider_images,
:target_images_by_target => @target_images_by_target,
:active_builds => active_builds,
+ :active_builds_by_image_id => active_builds_by_image_id,
:active_pushes => active_pushes,
:failed_build_counts => failed_build_counts,
:failed_push_counts => failed_push_counts,
diff --git a/src/app/views/images/show.html.haml b/src/app/views/images/show.html.haml
index 1d31d36..e784707 100644
--- a/src/app/views/images/show.html.haml
+++ b/src/app/views/images/show.html.haml
@@ -134,6 +134,8 @@
<h3>${group['type']['name']}</h3>
{{if build && active_builds[driver]}}
<label>${active_builds[driver]['builder']['status']}</label>
+ {{else !build && active_builds_by_image_id[image['uuid']][driver]}}
+ <label>${active_builds_by_image_id[image['uuid']][driver]['builder']['status']}</label>
{{else target_images_by_target[driver]}}
#{path = image_target_image_path('replace_image_id', 'replace_target_image_id')
path = path.sub('replace_image_id', '${image[\'uuid\']}')
--
1.7.6.5
12 years, 1 month
iwhd-1.3 released [stable]
by Jim Meyering
Not much has changed in iwhd per se, but due to e.g., changes
in mongod, some tests in iwhd-1.2's regression suite were failing.
Now they pass. Also, Pete Zaitcev documented some of the inner workings.
For a little more detail, see NEWS below.
Here are the compressed sources and a GPG detached signature[*]:
http://people.redhat.com/meyering/iwhd/iwhd-1.3.tar.xz
http://people.redhat.com/meyering/iwhd/iwhd-1.3.tar.xz.sig
[*] Use a .sig file to verify that the corresponding file (without the
.sig suffix) is intact. First, be sure to download both the .sig file
and the corresponding tarball. Then, run a command like this:
gpg --verify iwhd-1.3.tar.xz.sig
If that command fails because you don't have the required public key,
then run this command to import it:
gpg --keyserver keys.gnupg.net --recv-keys 7FD9FCCB000BEEEE
and rerun the 'gpg --verify' command.
This release was bootstrapped with the following tools:
Autoconf 2.68b.1-36a2
Automake 1.11a
Gnulib v0.0-6925-g9fa1fde
NEWS
* Noteworthy changes in release 1.3 (2012-03-02) [stable]
** Changes in behavior
iwhd --auto (-a) now uses mongod's --nojournal option when possible
** Infrastructure
Translations now come from the translationproject.org, rather than
from transifex.
Build-related fixes and portability improvements via gnulib.
12 years, 1 month
New aeolus-website branch -> gsg_090_dev
by Justin Clift
Hey all,
Just created a new aeolus-website git branch -> gsg_090_dev.
It's for a "Getting Started Guide" (GSG) that fits our present development
code. (ie upstream post 0.8.0)
So far it's just the merge/fix of the GSG code from other branches.
GSG stuff won't be in the base dir from here onwards. It's all going into
versioned dirs under /gsg/:
/gsg/0.6.0/
...
/gsg/0.9.0/
This should give us a better structure to work with.
Hoping to have the public site updated with this stuff in just a few days.
(ever the optimist?) :)
Regards and best wishes,
Justin Clift
--
Aeolus Community Manager
http://www.aeolusproject.org
12 years, 1 month
[PATCH conductor] BZ 788558 - instance termination for single instance
by Jan Provazník
From: Jan Provaznik <jprovazn(a)redhat.com>
This patch extends previous patch for 788558 to cover also single
instance stop which is available on deployments show pretty view.
---
src/app/controllers/deployments_controller.rb | 2 +-
src/app/controllers/instances_controller.rb | 13 +++++++++----
src/app/models/instance.rb | 4 ++--
.../views/instances/confirm_terminate.html.haml | 8 ++++++--
4 files changed, 18 insertions(+), 9 deletions(-)
diff --git a/src/app/controllers/deployments_controller.rb b/src/app/controllers/deployments_controller.rb
index 7b5e4c0..d65dea3 100644
--- a/src/app/controllers/deployments_controller.rb
+++ b/src/app/controllers/deployments_controller.rb
@@ -305,7 +305,7 @@ class DeploymentsController < ApplicationController
begin
require_privilege(Privilege::USE, instance)
if @inaccessible_instances.include?(instance)
- instance.force_stop(current_user)
+ instance.forced_stop(current_user)
notices << "#{log_prefix}: #{t('instances.flash.notice.forced_stop')}"
else
instance.stop(current_user)
diff --git a/src/app/controllers/instances_controller.rb b/src/app/controllers/instances_controller.rb
index ef04cd7..eb696e2 100644
--- a/src/app/controllers/instances_controller.rb
+++ b/src/app/controllers/instances_controller.rb
@@ -18,7 +18,7 @@ class InstancesController < ApplicationController
before_filter :require_user
before_filter :load_instance, :only => [:show, :key, :edit, :update, :stop, :reboot]
before_filter :set_view_vars, :only => [:show, :index, :export_events]
- before_filter :check_inaccessible_instances, :only => :multi_stop
+ before_filter :check_inaccessible_instances, :only => [:stop, :multi_stop]
def index
@params = params
@@ -148,7 +148,7 @@ class InstancesController < ApplicationController
require_privilege(Privilege::USE,instance)
if @inaccessible_instances.include?(instance)
- instance.force_stop(current_user)
+ instance.forced_stop(current_user)
notices << "#{instance.name}: #{t('instances.flash.notice.forced_stop')}"
else
instance.stop(current_user)
@@ -176,7 +176,11 @@ class InstancesController < ApplicationController
end
def stop
- do_operation(:stop)
+ if @inaccessible_instances.include?(@instance)
+ do_operation(:forced_stop)
+ else
+ do_operation(:stop)
+ end
end
def reboot
@@ -251,7 +255,8 @@ class InstancesController < ApplicationController
end
def check_inaccessible_instances
- @instances_to_stop = Instance.find(params[:instance_selected] || [])
+ # @instance is set only on stop action
+ @instances_to_stop = @instance ? @instance.to_a : Instance.find(params[:instance_selected].to_a)
@inaccessible_instances = Instance.stoppable_inaccessible_instances(@instances_to_stop)
if params[:terminate].blank? and @inaccessible_instances.any?
respond_to do |format|
diff --git a/src/app/models/instance.rb b/src/app/models/instance.rb
index 9027e24..21739f9 100644
--- a/src/app/models/instance.rb
+++ b/src/app/models/instance.rb
@@ -447,12 +447,12 @@ class Instance < ActiveRecord::Base
do_operation(user, 'reboot')
end
- def force_stop(user)
+ def forced_stop(user)
self.state = STATE_STOPPED
save!
event = Event.create!(:source => self, :event_time => Time.now,
:summary => "Instance is not accessible, state changed to stopped",
- :status_code => "force_stop")
+ :status_code => "forced_stop")
end
def deployed?
diff --git a/src/app/views/instances/confirm_terminate.html.haml b/src/app/views/instances/confirm_terminate.html.haml
index ea680f2..64709eb 100644
--- a/src/app/views/instances/confirm_terminate.html.haml
+++ b/src/app/views/instances/confirm_terminate.html.haml
@@ -6,11 +6,15 @@
.content.confirm_instances_termination
.align-center
%strong= t('.terminate_instances_description')
- = form_tag multi_stop_instances_path, :method => :post do
+ - url = @instance ? stop_instance_path(@instance) : multi_stop_instances_path
+ = form_tag url, :method => :post do
- @instances_to_stop.each do |i|
= hidden_field_tag 'instance_selected[]', i.id
%ul
- @inaccessible_instances.each do |i|
%li= i.name
- = link_to t('cancel'), pools_path(:view => 'filter', :details_tab => 'instances'), :class => 'button'
+ - if @instance
+ = link_to t('cancel'), deployment_path((a)instance.deployment, :details_tab => 'instances'), :class => 'button'
+ - else
+ = link_to t('cancel'), pools_path(:view => 'filter', :details_tab => 'instances'), :class => 'button'
= submit_tag t('.terminate'), :name => 'terminate', :class => 'button', :id => 'terminate_button'
--
1.7.7.6
12 years, 1 month