Revamped Rails3 upgrade series.
by Jason Guiditta
NOTE: I will send patch 12/12 separately as an attachment, it contains
a line too long to use git send-email on.
[PATCH conductor 01/12] Remove a bunch of old views.
[PATCH conductor 02/12] Rails 2->3 framework changes
[PATCH conductor 03/12] gem dependency changes (now use Bundler)
[PATCH conductor 04/12] Rails 3 config changes.
[PATCH conductor 05/12] Rails 3 application changes
[PATCH conductor 06/12] Rails 3 views changes
[PATCH conductor 07/12] Rails 3 spec/cucumber changes
[PATCH conductor 08/12] Misc rails 3 related changes
[PATCH conductor 09/12] Remove Prototype (and friends).
[PATCH conductor 10/12] Remove uncompressed ui js files.
[PATCH conductor 11/12] Don't require developers keep -testing repo
This patchset should apply on top of next, current commit is:
commit 4cd75ae4aea6d4a51632daad7c445fccd36faa22
Author: Tomas Sedovic <tsedovic(a)redhat.com>
Date: Fri Jul 8 16:59:27 2011 +0200
I suggest you apply on top of this commit in your dev branch,
then update next and rebase your branch. This should result
in few, if any, conflicts that you will need to resolve.
Some of these commits may need a little amending/fixing. For
instance, I tried to update routes, but the syntax is substatially
different, so I was not sure the correct setup for the more complex
ones. I commented these out to fix later, but did not get there
yet. I was getting errors about viewstate.rb using filter_chain
method, so that still need to be resolved. I would not be surpised
if there were a handful of other issues lurking that I did not hit
yet.
As you work through this, here is a possible workflow (and what I
did for reworking Mo's older patchset):
Make whatever changes you need to correct an error, or get to the
next stage of 'working'. Once you are ready to commit, figure out
which existing patches this change should go with. Make an
individual commit for each such grouping of changes. Then
git rebase -i HEAD~<number of changes back to get the fixes you need to alter>
Reorder the commits and squash your additions into the older related
commit. Add your info to the 'edited by' section I added to many of
the patches. Profit.
I suggest the above approach in the interest of keeping the git history
clean, so it can be nicely pushed to master/next when the time comes
(hopefully this means next week).
== WHAT THIS PATCHSET DOESN'T DO ==
* I have not checked for any needed changes in configure yet
* I have not updated the spec files (for things like the new sass rpm)
* I have not fixed spectask deprecations, which I saw when building on f15
* I have not successfully gotten this to build on a stock f15 VM. I altered
my testing repo file so I would get the f14 rpms, but ran into some dep
issues on the VM when I tried to build. I did not experience the same issue
on my laptop. Differences are:
** VM is i686 and stock
** laptop is upgraded from f14 and is x86_64
Remember that I am gone all next week, so if there are any major questions,
please hit me up this afternoon before I go. Good luck :)
-j
12 years, 9 months
[PATCH conductor] Added toggle buttons to faceted navigation
by jzigmund@redhat.com
---
src/app/views/deployments/_header_show.haml | 3 ---
src/app/views/deployments/show.haml | 3 +++
src/app/views/pools/_header_show.haml | 2 --
src/app/views/pools/show.haml | 3 +++
4 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/src/app/views/deployments/_header_show.haml b/src/app/views/deployments/_header_show.haml
index a6ecc9c..e64f01c 100644
--- a/src/app/views/deployments/_header_show.haml
+++ b/src/app/views/deployments/_header_show.haml
@@ -1,7 +1,4 @@
%header.page-header
%h1.deployments
= [@deployment.name, "Deployment"].join(' ')
- #obj_actions.button-container
- .button-group
- = pretty_filter_toggle(deployment_path(@deployment, :view => 'pretty'), deployment_path(@deployment, :view => 'filter'))
.corner
diff --git a/src/app/views/deployments/show.haml b/src/app/views/deployments/show.haml
index fdc6b99..f6ee34a 100644
--- a/src/app/views/deployments/show.haml
+++ b/src/app/views/deployments/show.haml
@@ -10,6 +10,9 @@
= tab[:name]
-if tab[:count]
%span.label.badge.count.dark=tab[:count]
+ #obj_actions.button-container
+ .button-group
+ = pretty_filter_toggle(deployment_path(@deployment, :view => 'pretty'), deployment_path(@deployment, :view => 'filter'))
.section-controls
%a.collapse{'href'=>'#'} Collapse
.content.collapsible.toggle-view.deployments#tab
diff --git a/src/app/views/pools/_header_show.haml b/src/app/views/pools/_header_show.haml
index 9ccb8f9..7835aa2 100644
--- a/src/app/views/pools/_header_show.haml
+++ b/src/app/views/pools/_header_show.haml
@@ -2,8 +2,6 @@
%h1.pools
= [@pool.name, "Pool"].join(' ')
#obj_actions.button-container
- .button-group
- = pretty_filter_toggle(pool_path(@pool, :view => 'pretty', :details_tab => @details_tab[:id]), pool_path(@pool, :view => 'filter', :details_tab => @details_tab[:id]))
= link_to 'New Deployment', launch_new_deployments_path(:pool_id => @pool.id), :class => 'button primary', :id => 'new_deployment_button'
.button-group
= link_to 'Edit', edit_pool_path(@pool), :class => 'button pill', :id => 'edit_pool_button'
diff --git a/src/app/views/pools/show.haml b/src/app/views/pools/show.haml
index eebff5e..216ac14 100644
--- a/src/app/views/pools/show.haml
+++ b/src/app/views/pools/show.haml
@@ -15,6 +15,9 @@
= tab[:name]
-if tab[:count]
%span.label.badge.count.dark=tab[:count]
+ #obj_actions.button-container
+ .button-group
+ = pretty_filter_toggle(pool_path(@pool, :view => 'pretty', :details_tab => @details_tab[:id]), pool_path(@pool, :view => 'filter', :details_tab => @details_tab[:id]))
.section-controls
%a.collapse{'href'=>'#'} Collapse
.content.collapsible.toggle-view.pools#tab
--
1.7.4.4
12 years, 9 months
[PATCH configure 1/1] redmine 1784: Remove yumrepo defs
by Mike Orazi
The current repodefs conflict with the current installation guide and
contain old URLs that are no longer valid. The current installation
approach assumes that the user will wget the appropriate yum repo files
as per the install guide.
---
recipes/aeolus/manifests/deltacloud.pp | 2 +-
recipes/aeolus/manifests/image-factory.pp | 3 +--
recipes/aeolus/manifests/init.pp | 22 ----------------------
recipes/aeolus/manifests/iwhd.pp | 3 +--
4 files changed, 3 insertions(+), 27 deletions(-)
diff --git a/recipes/aeolus/manifests/deltacloud.pp b/recipes/aeolus/manifests/deltacloud.pp
index a274e67..dc367da 100644
--- a/recipes/aeolus/manifests/deltacloud.pp
+++ b/recipes/aeolus/manifests/deltacloud.pp
@@ -5,7 +5,7 @@ class aeolus::deltacloud::core {
include aeolus
package { 'deltacloud-core':
- ensure => 'installed', require => Yumrepo['aeolus_arch', 'aeolus_noarch']}
+ ensure => 'installed'}
}
class aeolus::deltacloud::ec2 {
diff --git a/recipes/aeolus/manifests/image-factory.pp b/recipes/aeolus/manifests/image-factory.pp
index 1a75bd6..27c5512 100644
--- a/recipes/aeolus/manifests/image-factory.pp
+++ b/recipes/aeolus/manifests/image-factory.pp
@@ -6,8 +6,7 @@ class aeolus::image-factory inherits aeolus {
ensure=> 'installed'
}
package { 'imagefactory':
- ensure => 'installed',
- require => [Yumrepo['aeolus_arch', 'aeolus_noarch']]
+ ensure => 'installed'
}
package { 'qpid-cpp-server':
ensure => 'installed' }
diff --git a/recipes/aeolus/manifests/init.pp b/recipes/aeolus/manifests/init.pp
index 1144293..b370064 100644
--- a/recipes/aeolus/manifests/init.pp
+++ b/recipes/aeolus/manifests/init.pp
@@ -30,28 +30,6 @@ if $aeolus_enable_security == "true" or $aeolus_enable_security == "1" {
# Base aeolus class
class aeolus {
package{'curl': ensure => 'installed'}
-
- # Setup repos which to pull aeolus components
- # TODO: Don't hardcode these repos to RHEL-6
- # The issue is that $releasever resolves to something like 6Server
- # so we either need to have a repo per RHEL variant, or we need
- # to have smarter logic here
- $base_url_release = $operatingsystem ? { 'fedora' => "fedora-\$releasever",
- 'redhat' => 'rhel-6' }
- $pulp_base_url_release = $operatingsystem ? { 'fedora' => "fedora-13",
- 'redhat' => 'rhel5' }
-
- yumrepo{"${name}_arch":
- name => "${name}_arch",
- descr => "${name}_arch",
- baseurl => "http://repos.fedorapeople.org/repos/aeolus/packages/${base_url_release}/\...",
- enabled => 0, gpgcheck => 0}
- yumrepo{"${name}_noarch":
- name => "${name}_noarch",
- descr => "${name}_noarch",
- baseurl => "http://repos.fedorapeople.org/repos/aeolus/packages/${base_url_release}/n...",
- enabled => 0, gpgcheck => 0}
-
}
# Create a new provider in aeolus
diff --git a/recipes/aeolus/manifests/iwhd.pp b/recipes/aeolus/manifests/iwhd.pp
index 6ba8dce..be57736 100644
--- a/recipes/aeolus/manifests/iwhd.pp
+++ b/recipes/aeolus/manifests/iwhd.pp
@@ -3,8 +3,7 @@
class aeolus::iwhd inherits aeolus {
### Install the deltacloud components
package { 'iwhd':
- ensure => 'installed',
- require => Yumrepo['aeolus_arch', 'aeolus_noarch'] }
+ ensure => 'installed' }
package { 'mongodb-server':
ensure => 'installed' }
--
1.7.4.4
12 years, 9 months
[PATCH conductor] Allow stopping instances regardless of their state
by Tomas Sedovic
From: Tomas Sedovic <tsedovic(a)redhat.com>
https://bugzilla.redhat.com/show_bug.cgi?id=698269
When an instance got to certain states, it could not be stopped or removed
from the UI.
With this, the instance that cannot be stopped cleanly (e.g. it's in the
'error' state), will be stopped forcefully using the
`condormatic_instance_reset_error` method.
Once the instance is stopped, the corresponding deployment can be deleted (and
the instance with it).
---
src/app/controllers/instances_controller.rb | 24 ++++++++++++++----------
1 files changed, 14 insertions(+), 10 deletions(-)
diff --git a/src/app/controllers/instances_controller.rb b/src/app/controllers/instances_controller.rb
index 0b43fad..3aca0d1 100644
--- a/src/app/controllers/instances_controller.rb
+++ b/src/app/controllers/instances_controller.rb
@@ -127,18 +127,22 @@ class InstancesController < ApplicationController
Instance.find(params[:instance_selected] || []).each do |instance|
begin
require_privilege(Privilege::USE,instance)
- unless instance.valid_action?('stop')
- raise ActionError.new("stop is an invalid action.")
- end
- # not sure if task is used as everything goes through condor
- #permissons check here
- @task = instance.queue_action(@current_user, 'stop')
- unless @task
- raise ActionError.new("stop cannot be performed on this instance.")
+ if instance.valid_action?('stop')
+ # not sure if task is used as everything goes through condor
+ #permissons check here
+ @task = instance.queue_action(@current_user, 'stop')
+ unless @task
+ raise ActionError.new("stop cannot be performed on this instance.")
+ end
+ condormatic_instance_stop(@task)
+ notices << "#{instance.name}: stop action was successfully queued.<br/>"
+ else
+ condormatic_instance_reset_error(instance)
+ notices << "#{instance.name}: forceful stop action was successfully queued."
+ instance.state = Instance::STATE_STOPPED
+ instance.save!
end
- condormatic_instance_stop(@task)
- notices << "#{instance.name}: stop action was successfully queued.<br/>"
rescue Exception => err
errors << "#{instance.name}: " + err + "<br/>"
end
--
1.7.4.4
12 years, 9 months
[PATCH configure 1/1] BZ 719676: Include rhevm placeholder values in default_* to ease setup
by Mike Orazi
---
conf/default_cleanup | 3 +++
conf/default_configure | 12 ++++++++++++
conf/rhevm_cleanup | 15 ---------------
conf/rhevm_configure | 26 --------------------------
4 files changed, 15 insertions(+), 41 deletions(-)
delete mode 100644 conf/rhevm_cleanup
delete mode 100644 conf/rhevm_configure
diff --git a/conf/default_cleanup b/conf/default_cleanup
index 36f3521..806e3f4 100644
--- a/conf/default_cleanup
+++ b/conf/default_cleanup
@@ -14,3 +14,6 @@ classes:
- aeolus::iwhd::disabled
- aeolus::image-factory::disabled
- aeolus::conductor::remove_seed_data
+# Uncomment this to clean up RHEV details
+#- aeolus::rhevm::disabled
+
diff --git a/conf/default_configure b/conf/default_configure
index fb89277..14ee124 100644
--- a/conf/default_configure
+++ b/conf/default_configure
@@ -16,8 +16,20 @@
parameters:
enable_https: true
enable_security: false
+# Uncomment this section and provide reasonable values to
+# enable RHEV values to be populated.
+# rhevm_nfs_server: nfs.server.com
+# rhevm_nfs_export: /export/export_domain
+# rhevm_nfs_mount_point: /mnt/rhevm-nfs
+# rhevm_deltacloud_port: 3005
+# rhevm_deltacloud_username: username@fqdn
+# rhevm_deltacloud_password: password
+# rhevm_deltacloud_powershell_url: https://rhevm.server.com:8543/rhevm-api-powershell
classes:
- aeolus::conductor
- aeolus::image-factory
- aeolus::iwhd
- aeolus::conductor::seed_data
+# Uncomment this section to include rhev setup
+#- aeolus::rhevm
+
diff --git a/conf/rhevm_cleanup b/conf/rhevm_cleanup
deleted file mode 100644
index a43d991..0000000
--- a/conf/rhevm_cleanup
+++ /dev/null
@@ -1,15 +0,0 @@
-#RHEV-M-only cleanup specification
-
-#You can override the default behavior
-#by renaming this to <fqdn>_cleanup.
-#This will result in only iwhd being
-#disabled
----
-parameters:
- enable_https: true
- enable_security: false
- rhevm_nfs_server: nfs.server.com
- rhevm_nfs_export: /export/export_domain
- rhevm_nfs_mount_point: /mnt/rhevm-nfs
-classes:
-- aeolus::rhevm::disabled
diff --git a/conf/rhevm_configure b/conf/rhevm_configure
deleted file mode 100644
index 8e6e601..0000000
--- a/conf/rhevm_configure
+++ /dev/null
@@ -1,26 +0,0 @@
-#RHEV-M-only setup configuration.
-
-#renaming this file to <fqdn>_configure will
-#make it override the default configure everything
-#behavior with the behavior below to only set up
-#iwhd
-
-#NOTE: Although this suggests the components
-#can be deployed on individual boxes. This will likely
-#become a common practice, but be advised that currently
-#apart from https on the web server for conductor, you should
-#consider intermachine communications insecure. Securing
-#intermachine service calls is on the roadmap.
----
-parameters:
- enable_https: true
- enable_security: false
- rhevm_nfs_server: nfs.server.com
- rhevm_nfs_export: /export/export_domain
- rhevm_nfs_mount_point: /mnt/rhevm-nfs
- rhevm_deltacloud_port: 3005
- rhevm_deltacloud_username: username@fqdn
- rhevm_deltacloud_password: password
- rhevm_deltacloud_powershell_url: https://rhevm.server.com:8543/rhevm-api-powershell
-classes:
-- aeolus::rhevm
--
1.7.4.4
12 years, 9 months
[PATCH 1/2] Avoid adding a non-null column with a null default value
by Mark McLoughlin
I was getting this error when running 'rake db:migrate' with sqlite:
SQLite3::SQLException: Cannot add a NOT NULL column with default value NULL: ALTER TABLE "deployables" ADD "uuid" varchar(255) NOT NULL
To avoid the warning, we can add the column as nullable and then change
it to non-null later.
Presumably this would fail if we ran the migration on a DB containing
any data in the deployables table, but this is unlikely. To avoid it,
we could do e.g.
Deployable.reset_column_information
Deployable.all.each do |deployable|
deployable.uuid = "" if deployable.uuid.nil?
deployable.xml = "" if deployable.xml.nil?
end
but that seems like overkill given the situation, especially since the
default values don't make any sense.
---
.../migrate/20110207100800_update_deployables.rb | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/db/migrate/20110207100800_update_deployables.rb b/src/db/migrate/20110207100800_update_deployables.rb
index 4414560..ff87bed 100644
--- a/src/db/migrate/20110207100800_update_deployables.rb
+++ b/src/db/migrate/20110207100800_update_deployables.rb
@@ -2,13 +2,16 @@ class UpdateDeployables < ActiveRecord::Migration
def self.up
change_table :deployables do |t|
t.integer :lock_version, :default => 0
- t.string :uuid, :null => false
- t.binary :xml, :null => false
+ t.string :uuid
+ t.binary :xml
t.string :uri
t.text :summary
t.boolean :uploaded, :default => false
end
+ change_column :deployables, :uuid, :string, :null => false
+ change_column :deployables, :xml, :string, :null => false
+
create_table :assemblies_deployables, :id => false do |t|
t.integer :assembly_id, :null => false
t.integer :deployable_id, :null => false
--
1.7.4.4
12 years, 9 months
[PATCH conductor] Remove provider type's build_supported flag
by Mark McLoughlin
This is completely unused now since commit 4d780212edf.
---
src/app/models/provider_type.rb | 1 -
src/app/views/provider_types/_list.xml.haml | 1 -
...4_remove_build_supported_from_provider_types.rb | 9 +++++++++
src/db/seeds.rb | 8 ++++----
src/features/provider_type.feature | 16 ++++++++--------
.../step_definitions/provider_type_steps.rb | 4 +---
6 files changed, 22 insertions(+), 17 deletions(-)
create mode 100644 src/db/migrate/20110707145144_remove_build_supported_from_provider_types.rb
diff --git a/src/app/models/provider_type.rb b/src/app/models/provider_type.rb
index e1f8668..5d9832a 100644
--- a/src/app/models/provider_type.rb
+++ b/src/app/models/provider_type.rb
@@ -8,7 +8,6 @@
# codename :string(255) not null
# ssh_user :string(255)
# home_dir :string(255)
-# build_supported :boolean
# created_at :datetime
# updated_at :datetime
#
diff --git a/src/app/views/provider_types/_list.xml.haml b/src/app/views/provider_types/_list.xml.haml
index 6363806..c0fc65c 100644
--- a/src/app/views/provider_types/_list.xml.haml
+++ b/src/app/views/provider_types/_list.xml.haml
@@ -4,4 +4,3 @@
%provider_type
%name= p.name
%codename= p.codename
- %build_supported= p.build_supported
diff --git a/src/db/migrate/20110707145144_remove_build_supported_from_provider_types.rb b/src/db/migrate/20110707145144_remove_build_supported_from_provider_types.rb
new file mode 100644
index 0000000..a79666c
--- /dev/null
+++ b/src/db/migrate/20110707145144_remove_build_supported_from_provider_types.rb
@@ -0,0 +1,9 @@
+class RemoveBuildSupportedFromProviderTypes < ActiveRecord::Migration
+ def self.up
+ remove_column :provider_types, :build_supported
+ end
+
+ def self.down
+ add_column :provider_types, :build_supported, :boolean
+ end
+end
diff --git a/src/db/seeds.rb b/src/db/seeds.rb
index 83a1eec..8ed5682 100644
--- a/src/db/seeds.rb
+++ b/src/db/seeds.rb
@@ -121,14 +121,14 @@ end
# Provider types actually supported
if ProviderType.all.empty?
- ProviderType.create!(:name => "Mock", :build_supported => true, :codename =>"mock")
- ProviderType.create!(:name => "Amazon EC2", :build_supported => true, :codename =>"ec2", :ssh_user => "root", :home_dir => "/root")
+ ProviderType.create!(:name => "Mock", :codename =>"mock")
+ ProviderType.create!(:name => "Amazon EC2", :codename =>"ec2", :ssh_user => "root", :home_dir => "/root")
ProviderType.create!(:name => "GoGrid", :codename =>"gogrid")
ProviderType.create!(:name => "Rackspace", :codename =>"rackspace")
ProviderType.create!(:name => "RHEV-M", :codename =>"rhevm")
ProviderType.create!(:name => "OpenNebula", :codename =>"opennebula")
- ProviderType.create!(:name => "CondorCloud", :codename =>"condorcloud", :build_supported => 'true')
- ProviderType.create!(:name => "VMWare vSphere", :codename =>"vsphere", :build_supported => 'true')
+ ProviderType.create!(:name => "CondorCloud", :codename =>"condorcloud")
+ ProviderType.create!(:name => "VMWare vSphere", :codename =>"vsphere")
end
# fill table CredentialDefinitions by default values
diff --git a/src/features/provider_type.feature b/src/features/provider_type.feature
index c1d39a1..859452d 100644
--- a/src/features/provider_type.feature
+++ b/src/features/provider_type.feature
@@ -12,11 +12,11 @@ Feature: Manage Providers
When I go to the provider types page
Then I should get a XML document
And there should be these provider types:
- | name | codename | build_supported |
- | Mock | mock | true |
- | GoGrid | gogrid | false |
- | Rackspace | rackspace | false |
- | OpenNebula | opennebula | false |
- | Amazon EC2 | ec2 | true |
- | CondorCloud | condorcloud | true |
- | RHEV-M | rhevm | false |
+ | name | codename
+ | Mock | mock
+ | GoGrid | gogrid
+ | Rackspace | rackspace
+ | OpenNebula | opennebula
+ | Amazon EC2 | ec2
+ | CondorCloud | condorcloud
+ | RHEV-M | rhevm
diff --git a/src/features/step_definitions/provider_type_steps.rb b/src/features/step_definitions/provider_type_steps.rb
index 0b0760a..e65e78a 100644
--- a/src/features/step_definitions/provider_type_steps.rb
+++ b/src/features/step_definitions/provider_type_steps.rb
@@ -1,13 +1,11 @@
Then /^there should be these provider types:$/ do |table|
types = @xml_response.root.xpath('/provider_types/provider_type').map do |n|
{:name => n.xpath('name').text,
- :codename => n.xpath('codename').text,
- :build_supported => n.xpath('build_supported').text}
+ :codename => n.xpath('codename').text}
end
table.hashes.each do |hash|
p = types.find {|n| n[:name] == hash[:name]}
p.should_not be_nil
p[:codename].should == hash[:codename]
- p[:build_supported].should == hash[:build_supported]
end
end
--
1.7.4.4
12 years, 9 months