[PATCH] BZ 870479 - fixed checking of "stopped after creation" state
by Jan Provazník
From: Jan Provaznik <jprovazn(a)redhat.com>
For rhevm/vsphere an instance goes to 'stopped' state after creation so
conductor has to send explicit start request. To distinguish "stopped after
creation" state and common "stopped" state conductor checks if last
instance launch request was sent after last deployment launch request
(there can be multiple launch requests for deployment/instance because of
rolblack+retry process).
In some cases it was possible that instance launch request was picked up by
delayed_job in same second when the deployment was created, so checking create
times by seconds was not precise enough.
---
src/app/models/instance.rb | 2 +-
src/spec/models/instance_spec.rb | 18 ++++++++++++++++++
2 files changed, 19 insertions(+), 1 deletion(-)
diff --git a/src/app/models/instance.rb b/src/app/models/instance.rb
index 8e02002..2d27394 100644
--- a/src/app/models/instance.rb
+++ b/src/app/models/instance.rb
@@ -525,7 +525,7 @@ class Instance < ActiveRecord::Base
# also make sure that the 'create' task was created after
# last deployment launch request - instance can be stopped
# since previous rollback+retry request
- last_task.created_at.to_i > last_launch_time.to_i &&
+ last_task.created_at.to_f > last_launch_time.to_f &&
provider_account &&
provider_account.provider.provider_type.goes_to_stop_after_creation?
end
diff --git a/src/spec/models/instance_spec.rb b/src/spec/models/instance_spec.rb
index 3f9a6f5..26fea33 100644
--- a/src/spec/models/instance_spec.rb
+++ b/src/spec/models/instance_spec.rb
@@ -379,4 +379,22 @@ describe Instance do
errors.should_not be_empty
errors.select {|e| e.include?("no Config Server available") }.should_not be_empty
end
+
+ describe ".stopped_after_creation?" do
+ before(:each) do
+ @instance = FactoryGirl.create(:instance, :pool_id => @pool.id, :state => 'stopped')
+ @deployment = FactoryGirl.create :deployment
+ @deployment.instances << @instance
+ end
+
+ it "should be true if the deployment is pending and the provider doesn't start an instance automatically" do
+ @instance.provider_account.provider.provider_type.
+ stub!(:goes_to_stop_after_creation?).and_return(true)
+ @deployment.update_attribute(:state, Deployment::STATE_PENDING)
+ @instance.tasks << InstanceTask.create!({:user => nil,
+ :task_target => @instance,
+ :action => InstanceTask::ACTION_CREATE})
+ @instance.stopped_after_creation?.should be_true
+ end
+ end
end
--
1.7.11.4
11 years, 5 months
[aeolus-incubator/tim] 53303f: Added Filter to fix Rails API resource id usage
by Jason Guiditta
Branch: refs/heads/master
Home: https://github.com/aeolus-incubator/tim
Commit: 53303f5179e642453ef551c33811f18e8651cdc1
https://github.com/aeolus-incubator/tim/commit/53303f5179e642453ef551c338...
Author: Martyn Taylor <mtaylor(a)redhat.com>
Date: 2012-11-16 (Fri, 16 Nov 2012)
Changed paths:
M app/controllers/tim/base_images_controller.rb
M app/controllers/tim/image_versions_controller.rb
M app/controllers/tim/provider_images_controller.rb
M app/controllers/tim/target_images_controller.rb
A app/filters/tim/resource_link_filter.rb
M spec/controllers/base_images_controller_spec.rb
M spec/controllers/image_versions_controller_spec.rb
M spec/controllers/provider_images_controller_spec.rb
M spec/controllers/target_images_controller_spec.rb
A spec/filters/resource_link_filter_spec.rb
Log Message:
-----------
Added Filter to fix Rails API resource id usage
Commit: 197a5f42774030689ad85fdcd32b698af3fb28f4
https://github.com/aeolus-incubator/tim/commit/197a5f42774030689ad85fdcd3...
Author: Martyn Taylor <mtaylor(a)redhat.com>
Date: 2012-11-16 (Fri, 16 Nov 2012)
Changed paths:
M README.rdoc
Log Message:
-----------
Updated README for existing Template on BaseImage create
Commit: 5257869d9b9d2cf82fdc5bf8ef68c010ed3217f5
https://github.com/aeolus-incubator/tim/commit/5257869d9b9d2cf82fdc5bf8ef...
Author: jguiditta <jguiditt(a)redhat.com>
Date: 2012-11-19 (Mon, 19 Nov 2012)
Changed paths:
M README.rdoc
M app/controllers/tim/base_images_controller.rb
M app/controllers/tim/image_versions_controller.rb
M app/controllers/tim/provider_images_controller.rb
M app/controllers/tim/target_images_controller.rb
A app/filters/tim/resource_link_filter.rb
M spec/controllers/base_images_controller_spec.rb
M spec/controllers/image_versions_controller_spec.rb
M spec/controllers/provider_images_controller_spec.rb
M spec/controllers/target_images_controller_spec.rb
A spec/filters/resource_link_filter_spec.rb
Log Message:
-----------
Merge pull request #54 from mtaylor/api_fixes
Fix issues with Rails API using <resource_id> format, issue #53
Compare: https://github.com/aeolus-incubator/tim/compare/cceba10ca2ef...5257869d9b9d
11 years, 5 months
Aeolus Mission voting. VOTE REQUIRED BY NOVEMBER 19 PLEASE.
by Hugh O. Brock
Mission Statement Voting
OK... I promised to schedule a vote for today and naturally I am
behind. The good news is this means you guys have the weekend to think
about this.
A bit about process. Having been through a substantial mission
statement exercise already, I'm not inclined to lengthen the process
much further by accepting further tweaks. I am therefore going to
exercise the mighty ><}}}*> one final time and reduce the nominees for
Aeolus Mission Statement to three. I hope you all will view this less
as an act of oppression and more as an act of getting the hell on with
it :).
In voting, I would urge you all to remember that a mission statement can
and probably should be aspirational -- our software may not fill our
mission today, but we intend that it will someday, and that new
additions to Aeolus will be included or not based on how well they will
help us fill the mission.
The choices, then, are:
1. Aeolus mission: To provide superior tools and workflows for flexible
construction, management, and monitoring of multi-instance systems
across clouds. (This is the original version we concocted at the dev
conf.)
2. Aeolus mission: To provide superior tools and workflows for flexible
construction, management, and monitoring of multi-instance deployments
across clouds. (Modifications by Giulio Fidente and Justin Clift,
received at least one endorsement on list.)
3. Aeolus mission: "To provide open source tools for the management
and monitoring of cloud based systems." (Alternative from Mo Morsi. Mo
says: "Are we just focusing on 'multi-instance systems'? Isn't
providing simple tools to build images and launch a single instance
against any generic cloud provider part of Aeolus?")
Vote for one by end of Monday, please.
Thanks,
--Hugh
--
== Hugh Brock, hbrock(a)redhat.com ==
== Engineering Manager, Cloud BU ==
== Aeolus Project: Manage virtual infrastructure across clouds. ==
== http://aeolusproject.org ==
"I know that you believe you understand what you think I said, but I’m
not sure you realize that what you heard is not what I meant."
--Robert McCloskey
11 years, 5 months
Technical Cabal inaugural meeting
by Hugh O. Brock
Good morning all.
I'd like to do the first tech cabal meeting this Friday. We'll have
finalized membership by end of Tuesday, but then unfortunately I am on
the road Wednesday and Thursday so Friday is the first available day. If
11 a.m. Eastern time (1600 UTC) works for everyone, I'll schedule it
then -- if not let me know.
Just as a reminder, the current proposed membership list is:
Michal Fojtik
Tomas Sedovic
Martyn Taylor
Jay Guiditta
Scott Seago
Eric Helms
Greg Blomquist
Jaromir Coufal (non-voting user advocate)
Agenda items:
* Nominate a secretary
* Vote on proposed Cabal charter (I'll write this up and send it out
before the meeting)
* Establish a meeting format
* Establish procedures for setting agenda, discussion, votes, etc.
* Decide if we need an additional list for non-patch stuff or not
* Review proposed items for next upstream release, propose changes if
any
For now, this mailing list is the vehicle for adding items to the
agenda. We may move all the non-patch stuff to a separate mailing list
later if required.
Let me know if the proposed 1600 UTC time works; if not we can move it
earlier or later.
Take care,
--Hugh
--
== Hugh Brock, hbrock(a)redhat.com ==
== Engineering Manager, Cloud BU ==
== Aeolus Project: Manage virtual infrastructure across clouds. ==
== http://aeolusproject.org ==
"I know that you believe you understand what you think I said, but I’m
not sure you realize that what you heard is not what I meant."
--Robert McCloskey
11 years, 5 months
Project name change: Converge-UI → Alchemy
by Jaromir Coufal
Dear all, I am happy to introduce you new name for our converge-ui project:
=======
Alchemy
=======
Looking at the voting list, 12 people voted and 8 of them mentioned
Alchemy, so I think that in majority we agreed and the result confirms it:
* Alchemy (21)
* Inlay (8)
* Converge-UI (8)
* Batten (4)
* Chamfer (3)
* AlchemyUI (3)
* Airy (3)
* Essbahn (3)
* Motley (2)
* Cameo (2)
* Cohere (2)
In next few days, we will be managing to make this name change happen,
so expect few announcements and shifts.
Many thanks to Jeremy for this idea.
Thank you all for your contribution and I am looking forward to our
cooperation to make Alchemy huge :)
--
Jaromír Coufal
Interaction Designer
Red Hat Czech s.r.o.
Mobile: +420 724 595 508
E-mail: jcoufal(a)redhat.com
IRC: jcoufal at #cloudforms-ui, #aeolus, #brno
11 years, 5 months
Re: Aeolus Mission voting. VOTE REQUIRED BY NOVEMBER 19 PLEASE.
by Hugh O. Brock
On Fri, Nov 16, 2012 at 04:27:55PM -0500, Mo Morsi wrote:
> On 11/16/2012 03:28 PM, Hugh Brock wrote:
> > Mission Statement Voting
> >
> > OK... I promised to schedule a vote for today and naturally I am
> > behind. The good news is this means you guys have the weekend to think
> > about this.
> >
> > A bit about process. Having been through a substantial mission
> > statement exercise already, I'm not inclined to lengthen the process
> > much further by accepting further tweaks. I am therefore going to
> > exercise the mighty ><}}}*> one final time and reduce the nominees for
> > Aeolus Mission Statement to three. I hope you all will view this less
> > as an act of oppression and more as an act of getting the hell on with
> > it :).
> >
> > In voting, I would urge you all to remember that a mission statement can
> > and probably should be aspirational -- our software may not fill our
> > mission today, but we intend that it will someday, and that new
> > additions to Aeolus will be included or not based on how well they will
> > help us fill the mission.
> >
> > The choices, then, are:
> >
> > 1. Aeolus mission: To provide superior tools and workflows for flexible
> > construction, management, and monitoring of multi-instance systems
> > across clouds. (This is the original version we concocted at the dev
> > conf.)
> >
> > 2. Aeolus mission: To provide superior tools and workflows for flexible
> > construction, management, and monitoring of multi-instance deployments
> > across clouds. (Modifications by Giulio Fidente and Justin Clift,
> > received at least one endorsement on list.)
> >
> > 3. Aeolus mission: "To provide open source tools for the management
> > and monitoring of cloud based systems." (Alternative from Mo Morsi. Mo
> > says: "Are we just focusing on 'multi-instance systems'? Isn't
> > providing simple tools to build images and launch a single instance
> > against any generic cloud provider part of Aeolus?")
> +1
>
> Thanks Hugh, is it in bad taste to vote for my own option? ;-)
Nope :). If you wouldn't vote for it, don't say it.
--H
--
== Hugh Brock, hbrock(a)redhat.com ==
== Engineering Manager, Cloud BU ==
== Aeolus Project: Manage virtual infrastructure across clouds. ==
== http://aeolusproject.org ==
"I know that you believe you understand what you think I said, but I’m
not sure you realize that what you heard is not what I meant."
--Robert McCloskey
11 years, 5 months
Personas
by Martyn Taylor
Hi Gents,
I am looking for the official (end result of last week) list of
Personas. I notice that the wiki page:
https://redmine.aeolusproject.org/redmine/projects/aeolus/wiki/Personas
was last updated 31/10/12. Which was just before Brno Dev Conference.
Is someone currently amalgamating the info we gathered last week and/or
looking to put the information somewhere official?
Cheers
Martyn
11 years, 5 months
What colour should we paint the Bike shed?
by Martyn Taylor
A guy in our office here sent this to me today, after I was complaining
that technical discussions generate no interest in our office mailing
list, but deciding "What type of biscuits we should buy" generates a
flood of mails.
From time to time our list produces similar responses:
http://puce.bikeshed.org/
11 years, 5 months