#671 - BZ 691562 fix
by Matt Wagner
Hi all,
I spent a bit of time tracking down the remnants of #671 / BZ 651562, in
which Apache throws proxy timeout errors because the backend does not
respond in time as a result of API calls timing out.
Most of these errors were fixed a bit ago in deltacloud-client, but it
seems that the versions yum and gem know about don't have this fix, so
the issue was seemingly not fixed. I spent a bit getting deltacloud
0.3.0 running, and was unable to reproduce any errors with Apache
timeouts after attempting to simulate unreachable providers and other
cases where a timeout may occur. The timeouts in deltacloud-client are
slightly shorter than Apache's timeout value.
I'm attaching a patch that cleans up error handling in Conductor
slightly. There were a few spots (e.g., adding a new ProviderAccount
when the provider was unreachable) where the timeout exception was
reaching the user unhandled. This exception now triggers as a
flash[:error] message when raised, in lieu of a hard error.
You will need the 0.3.0 version of deltacloud to test this. (Some older
versions may work, but best not to chance it.) You can build this from
their source, although I suspect some of you already the 0.3.0 RC
installed.
-- Matt
12 years, 8 months
RHEV-M Template import
by Pete Zaitcev
[I apologize for the duplicate. I forgot to add the mailing list to cc.]
Greetings:
Ian poked me about something important. Launching a VM in RHEV-M is consists
of 3 explicit steps:
1. Image (assembly actually - it includes OVF) is uploaded into RHEV-M
"Export Domain", which is an NFS share. This is done with cp(1).
2. RHEV-M is told to "import" this templave with a REST API call.
This allocates a volume in one of datacenter's main backing stores,
copies disk images (with qemu-img), and adds OVF to whatever lists.
3. Launching from "template", with another REST API call. This sets
up COW, virsh define, etc.
When I wrote existing dc-rhev-image in iwhd, I thought that step #2 would
be done by the Conductor. Ian told me that he has no code to do it, and
he would rather prefer that I hand him a template that is already "imported".
In the interests of helping the end-to-end chain working as soon as practical,
I have already starting implementing #2 in iwhd, but I still think it's not
something iwhd ought to do. When I'm done, we should take this code and
copy-paste it into Conductor immediately, and here's why.
First, there is management of additional locations, that iwhd has trouble
hiding: the Export domain versus Storage domain in RHEV-M. I am convinced
that whoever uses RHEV-M will end knowing that export domain exists.
Think for example that iwhd does not know how many "normal" storage
domains there are in RHEV-M, so my code selects the first it finds.
Second, each step can fail independently, and iwhd is an annoying layer
of opaque code. I am trying to make sure my error messages explain what
ran out of space as plainly as possible, but it may be ugly.
So, please give this a thought.
I perspective, IMHO, we should use our Red Hat connections and ask RHEV-M
developers to provide a way to upload VMs in the same way Amazon EC2 and
VMware vCloud do it, over HTTP, and directly into the main storage domain
instead of this "Export" domain. We would not be having this discussion
if they allowed direct uploads. Someone better file an RFE.
-- Pete
12 years, 10 months
Fwd: [ANNOUNCE] Apache Deltacloud 0.3.0 (incubating)
by Michal Fojtik
Hi,
forwarding this announcement here :-)
Begin forwarded message:
> From: David Lutterkort <lutter(a)redhat.com>
> Date: April 29, 2011 1:00:37 AM GMT+02:00
> To: deltacloud-dev(a)incubator.apache.org
> Cc: general(a)incubator.apache.org
> Subject: [ANNOUNCE] Apache Deltacloud 0.3.0 (incubating)
> Reply-To: general(a)incubator.apache.org
>
> I am pleased to announce the availability of Apache Deltacloud 0.3.0.
>
> Apache Deltacloud is a RESTful cloud abstraction API. The release
> consists both of the API server and a Ruby client.
>
> The release can be found at
> http://www.apache.org/dist/incubator/deltacloud/0.3.0/ Gems and RPM's
> for Fedora will become available shortly.
>
> Overview of the changes for this release:
>
> Server:
> * Dynamic driver switching: select driver on a per-request basis; new
> toplevel 'drivers' collection describing drivers supported by server
> * Create images from running instances (EC2, Mock, GoGrid, Rackspace);
> advertised as action 'create_image' in instance details when possible
> * New 'user_files' feature for create_instance to advertise RAX-style
> injection of user data
> * Return status 204 after successful DELETE operation
> * Return status 401 when authentication fails because of invalid
> credentials
> * Blobs: support user metadata as key/value pairs passed through
> X-Deltacloud-Blobmeta-KEY: VALUE headers
> * Support HEAD requests to retrieve the operations and methods supported
> by a collection
> * Support for OPTIONS request to retrieve optional and required
> parameters for operations
> * Advertise 'create_instance' action for each image
> * Drivers
> + EC2
> - instance_count feature to allow creating multiple instances at once
> - run commands inside an insance via ssh
> - by default, list images owned by 'amazon', when passing in empty
> owner_id, list _all_ images (thousands)
> + Eucalyptus
> - new driver for Eucalyptus (Sang-Min Park)
> + Gogrid
> - run commands inside an insance via ssh
> - allow creating sandbox instances
> + Rackspace
> - report root password after instance creation
> + SBC
> - new driver for IBM SBC cloud (Eric Woods)
>
> Client:
> * run: new method to run commands via ssh
> * drivers: list drivers supported by server
> * properly list blobs in a bucket when showing bucket details
> * full support for managing blobs and buckets
>
> David
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: general-unsubscribe(a)incubator.apache.org
> For additional commands, e-mail: general-help(a)incubator.apache.org
>
------------------------------------------------------
Michal Fojtik, mfojtik(a)redhat.com
Deltacloud API: http://deltacloud.org
12 years, 10 months
[PATCH conductor] Config changes to integrate pulp repos with conductor - v2
by Richard Su
Adds Fedora 13 and 14 pulp repos. They will appear in the create
template page as "Fedora Pulp <version> (x86_64)".
This patch requires you to have the puppet pulp sync configure patch
applied and deployed.
install and platform_id added to pulp repo configuration.
---
.../image_descriptor_package_repositories.yml | 21 ++++++++++++++++---
.../image_descriptor_platform_repositories.yml | 10 +++++++++
src/spec/fixtures/repositories.json | 18 ++++++++++++++++-
src/spec/utils/repository_manager_spec.rb | 8 ++++--
4 files changed, 49 insertions(+), 8 deletions(-)
diff --git a/src/config/image_descriptor_package_repositories.yml b/src/config/image_descriptor_package_repositories.yml
index 6285ff1..1823bc4 100644
--- a/src/config/image_descriptor_package_repositories.yml
+++ b/src/config/image_descriptor_package_repositories.yml
@@ -29,7 +29,20 @@
# baseurl: url
# type: xml
#
-# -
-# baseurl: https://admin:admin@localhost/pulp/api/
-# yumurl: https://localhost/pulp/repos/
-# type: pulp
+-
+ id: f13-x86_64
+ name: Fedora 13
+ baseurl: https://admin:admin@localhost/pulp/api/
+ yumurl: https://localhost/pulp/repos/
+ type: pulp
+ install: true
+ platform_id: f13-x86_64
+
+-
+ id: f14-x86_64
+ name: Fedora 14
+ baseurl: https://admin:admin@localhost/pulp/api/
+ yumurl: https://localhost/pulp/repos/
+ type: pulp
+ install: true
+ platform_id: f14-x86_64
diff --git a/src/config/image_descriptor_platform_repositories.yml b/src/config/image_descriptor_platform_repositories.yml
index b43c115..d9c3165 100644
--- a/src/config/image_descriptor_platform_repositories.yml
+++ b/src/config/image_descriptor_platform_repositories.yml
@@ -7,3 +7,13 @@ fedora14:
name: Fedora
version: 14
architecture: x86_64
+
+f13-x86_64:
+ name: Fedora Pulp
+ version: 13
+ architecture: x86_64
+
+f14-x86_64:
+ name: Fedora Pulp
+ version: 14
+ architecture: x86_64
\ No newline at end of file
diff --git a/src/spec/fixtures/repositories.json b/src/spec/fixtures/repositories.json
index 732cb77..8f7cfba 100644
--- a/src/spec/fixtures/repositories.json
+++ b/src/spec/fixtures/repositories.json
@@ -16,4 +16,20 @@
"sync_schedule" : null,
"uri_ref" : "/repositories/fedora/",
"use_symlinks" : false
- } ]
+ },
+ { "_id" : "f14-x86_64",
+ "arch" : "x86_64",
+ "errata" : "/repositories/fedora/errata/",
+ "id" : "f14-x86_64",
+ "name" : "fedora",
+ "packagegroupcategories" : "/repositories/fedora/packagegroupcategories/",
+ "packagegroups" : "/repositories/fedora/packagegroups/",
+ "packages" : "/repositories/fedora/packages/",
+ "source" : { "supported_types" : [ "pulp" ],
+ "type" : "pulp",
+ "url" : "http://example/fedora"
+ },
+ "sync_schedule" : null,
+ "uri_ref" : "/repositories/fedora/",
+ "use_symlinks" : false
+ }]
diff --git a/src/spec/utils/repository_manager_spec.rb b/src/spec/utils/repository_manager_spec.rb
index 7876254..e414679 100644
--- a/src/spec/utils/repository_manager_spec.rb
+++ b/src/spec/utils/repository_manager_spec.rb
@@ -31,8 +31,9 @@ describe RepositoryManager do
end
it 'should return a list of repositories' do
- @rmanager.repositories.should have(1).items
+ @rmanager.repositories.should have(2).items
@rmanager.repositories.first.id.should eql('fedora13')
+ @rmanager.repositories.second.id.should eql('f14-x86_64')
end
it 'should return a list of packagegroups' do
@@ -41,12 +42,13 @@ describe RepositoryManager do
end
it 'should return a list of categories' do
- @rmanager.categories.should have(1).items
+ @rmanager.categories.should have(2).items
@rmanager.categories.first[:id].should eql('base-system')
+ @rmanager.categories.second[:id].should eql('base-system')
end
it "should return a list of packages" do
- @rmanager.packages.should have(2).items
+ @rmanager.packages.should have(4).items
@rmanager.packages.first[:name].should eql('libdeltacloud')
end
end
--
1.7.4.4
12 years, 10 months
[PATCH configure] set API_PROVIDER in deltacloud-core init scripts if applicable
by Mo Morsi
---
recipes/aeolus_recipe/aeolus_recipe.pp | 2 ++
recipes/aeolus_recipe/manifests/aeolus.pp | 4 ++--
recipes/aeolus_recipe/manifests/deltacloud.pp | 2 +-
recipes/aeolus_recipe/templates/deltacloud-core | 4 ++++
4 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/recipes/aeolus_recipe/aeolus_recipe.pp b/recipes/aeolus_recipe/aeolus_recipe.pp
index dd05dc3..6f7a2f1 100644
--- a/recipes/aeolus_recipe/aeolus_recipe.pp
+++ b/recipes/aeolus_recipe/aeolus_recipe.pp
@@ -48,6 +48,7 @@ aeolus::provider{"mock":
aeolus::provider{"ec2-us-east-1":
type => 'ec2',
+ realm => 'us-east-1',
port => 3003,
login_user => 'admin',
login_password => 'password',
@@ -55,6 +56,7 @@ aeolus::provider{"ec2-us-east-1":
aeolus::provider{"ec2-us-west-1":
type => 'ec2',
+ realm => 'us-west-1',
port => 3004,
login_user => 'admin',
login_password => 'password',
diff --git a/recipes/aeolus_recipe/manifests/aeolus.pp b/recipes/aeolus_recipe/manifests/aeolus.pp
index de43f9c..85c4a7a 100644
--- a/recipes/aeolus_recipe/manifests/aeolus.pp
+++ b/recipes/aeolus_recipe/manifests/aeolus.pp
@@ -54,8 +54,8 @@ class aeolus {
}
# Create a new provider in aeolus
-define aeolus::provider($type, $port, $login_user="", $login_password=""){
- aeolus::deltacloud{$name: provider_type => $type, port => $port}
+define aeolus::provider($type, $realm, $port, $login_user="", $login_password=""){
+ aeolus::deltacloud{$name: provider_type => $type, realm => $realm, port => $port}
aeolus::conductor::provider{$name:
type => $type,
url => "http://localhost:${port}/api",
diff --git a/recipes/aeolus_recipe/manifests/deltacloud.pp b/recipes/aeolus_recipe/manifests/deltacloud.pp
index f8c460b..ae070c5 100644
--- a/recipes/aeolus_recipe/manifests/deltacloud.pp
+++ b/recipes/aeolus_recipe/manifests/deltacloud.pp
@@ -17,7 +17,7 @@ class aeolus::deltacloud::ec2 {
# install the deltacloud component w/ the specified driver
-define aeolus::deltacloud($provider_type="", $port="3002") {
+define aeolus::deltacloud($provider_type="", $realm='', $port="3002") {
include aeolus::deltacloud::core
if $provider_type == "ec2" {
diff --git a/recipes/aeolus_recipe/templates/deltacloud-core b/recipes/aeolus_recipe/templates/deltacloud-core
index 8cc998a..cd098df 100644
--- a/recipes/aeolus_recipe/templates/deltacloud-core
+++ b/recipes/aeolus_recipe/templates/deltacloud-core
@@ -18,6 +18,10 @@ LOGFILE="${LOGFILE:-/var/log/deltacloud-<%= name %>/$DRIVER.log}"
PIDFILE="${THIN_PID:-/var/run/deltacloud-<%= name %>.pid}"
export DELTACLOUD_MOCK_STORAGE=/usr/lib/ruby/gems/1.8/gems/deltacloud-<%= name %>-0.2.0/lib/deltacloud/drivers/mock/data/
+<% unless realm == "" %>
+API_PROVIDER=<%= realm %>
+<% end %>
+
PROG=/usr/bin/deltacloudd
STARTTIMEOUT=20
--
1.7.2.3
12 years, 10 months
[PATCH] Added new dependency on mod_ssl.
by Justin Clift
---
aeolus-all.spec.in | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/aeolus-all.spec.in b/aeolus-all.spec.in
index 2ee6653..aac9657 100644
--- a/aeolus-all.spec.in
+++ b/aeolus-all.spec.in
@@ -16,6 +16,7 @@ Requires: imagefactory
Requires: qpid-cpp-server
Requires: rubygem(image_factory_connector)
Requires: mongodb-server
+Requires: mod_ssl
%description
This is the aeolus meta-package. If you want to install aeolus and all of its
--
1.7.4.3
12 years, 10 months
API interface of aeolus
by Alfredo Moralejo
Hi,
Does aeolus (and more precisely, conductor) provides an API that can be
used to integrate it in an upper layer infrastructure orchestration
tool, for example?
Best regards,
Alfedo
12 years, 10 months
[PATCH conductor] Redmine Task #467
by jason.guiditta
From: Jason Guiditta <jguiditt(a)redhat.com>
Update factory-related yml to allow using content from multiple repos.
Patch implements this by altering the current yml setup to:
- Allow multiple package repos per platform.
- Add custom repos to generated TDL.
---
src/app/util/image_descriptor_xml.rb | 21 ++++++++++++++++++++
src/app/util/repository_manager.rb | 5 ++-
.../util/repository_manager/abstract_repository.rb | 4 ++-
.../image_descriptor_package_repositories.yml | 11 ++++++++++
src/features/support/custom.rb | 2 +-
5 files changed, 39 insertions(+), 4 deletions(-)
diff --git a/src/app/util/image_descriptor_xml.rb b/src/app/util/image_descriptor_xml.rb
index c1c7724..dd2f33c 100644
--- a/src/app/util/image_descriptor_xml.rb
+++ b/src/app/util/image_descriptor_xml.rb
@@ -80,6 +80,27 @@ class ImageDescriptorXML
rep = repository_manager.repositories.find {|r| r.id == platform_id}
url_node.content = rep.yumurl if rep
install_node << url_node
+ custom_repositories(platform_id)
+ end
+
+ def custom_repositories(platform)
+ repos = repository_manager.repositories.find_all {|r| r.platform_id == platform && r.install == false}.flatten
+ if repos.size > 0
+ repo_block = get_or_create_node('repositories')
+ repo_block.xpath('.//*').remove
+ @root << repo_block
+ repos.each do |r|
+ repo_node = Nokogiri::XML::Node.new('repository', @doc)
+ repo_node['name'] = 'custom'
+ repo_block << repo_node
+ url_node = Nokogiri::XML::Node.new('url', repo_node)
+ url_node.content = r.baseurl
+ signed_node = Nokogiri::XML::Node.new('signed', repo_node)
+ signed_node.content = 'false'
+ repo_node << url_node
+ repo_node << signed_node
+ end
+ end
end
def platform_version
diff --git a/src/app/util/repository_manager.rb b/src/app/util/repository_manager.rb
index 6440417..0a33ad2 100644
--- a/src/app/util/repository_manager.rb
+++ b/src/app/util/repository_manager.rb
@@ -104,7 +104,8 @@ class RepositoryManager
def get_selected_repositories(repos)
return @repositories if repos.blank?
repos.map do |repo|
- @repositories.find {|r| r.id == repo} or raise "repository '#{repo}' not found"
- end
+ @repositories.find_all {|r| r.platform_id == repo} or raise "repository '#{repo}' not found"
+ end.flatten
+ @repositories
end
end
diff --git a/src/app/util/repository_manager/abstract_repository.rb b/src/app/util/repository_manager/abstract_repository.rb
index 7b73926..63496f2 100644
--- a/src/app/util/repository_manager/abstract_repository.rb
+++ b/src/app/util/repository_manager/abstract_repository.rb
@@ -1,5 +1,5 @@
class AbstractRepository
- attr_reader :id, :name, :baseurl, :yumurl, :type
+ attr_reader :id, :name, :baseurl, :yumurl, :type, :platform_id, :install
def initialize(conf)
@id = conf['id']
@@ -7,6 +7,8 @@ class AbstractRepository
@baseurl = conf['baseurl']
@yumurl = conf['yumurl'] || conf['baseurl']
@type = conf['type']
+ @platform_id = conf['platform_id']
+ @install = conf['install'] || false
end
def search_package(what)
diff --git a/src/config/image_descriptor_package_repositories.yml b/src/config/image_descriptor_package_repositories.yml
index fd1a747..6285ff1 100644
--- a/src/config/image_descriptor_package_repositories.yml
+++ b/src/config/image_descriptor_package_repositories.yml
@@ -3,12 +3,23 @@
name: Fedora
baseurl: http://download.fedoraproject.org/pub/fedora/linux/releases/13/Fedora/x86...
type: xml
+ install: true
+ platform_id: fedora13
-
id: fedora14
name: Fedora
baseurl: http://download.fedoraproject.org/pub/fedora/linux/releases/14/Fedora/x86...
type: xml
+ install: true
+ platform_id: fedora14
+
+-
+ id: aeolus-custom
+ name: Aeolus-custom
+ baseurl: http://repos.fedorapeople.org/repos/aeolus/demo/webapp/
+ type: xml
+ platform_id: fedora14
# you can define multiple repositories, as array, for example:
#
diff --git a/src/features/support/custom.rb b/src/features/support/custom.rb
index 4927e1c..89a2006 100644
--- a/src/features/support/custom.rb
+++ b/src/features/support/custom.rb
@@ -38,7 +38,7 @@ RepositoryManager.class_eval do
[{
'baseurl' => 'http://pulptest',
'yumurl' => 'http://pulptest',
- 'type' => 'pulp',
+ 'type' => 'pulp'
}]
end
end
--
1.7.4.4
12 years, 10 months
[PATCH conductor] Add message after template deletion
by Tomas Sedovic
From: Tomas Sedovic <tsedovic(a)redhat.com>
This fixes https://bugzilla.redhat.com/show_bug.cgi?id=693447
When the user attempted to delete a template that could not be deleted
(because it had instances associated with it), no error message was shown and
nothing happened.
This adds a feedback to the delete template action.
---
.../image_factory/templates_controller.rb | 15 ++++++++++++---
src/config/locales/en.yml | 11 +++++++++--
src/config/navigation.rb | 2 +-
3 files changed, 22 insertions(+), 6 deletions(-)
diff --git a/src/app/controllers/image_factory/templates_controller.rb b/src/app/controllers/image_factory/templates_controller.rb
index 88e075d..dc7ba71 100644
--- a/src/app/controllers/image_factory/templates_controller.rb
+++ b/src/app/controllers/image_factory/templates_controller.rb
@@ -185,13 +185,22 @@ class ImageFactory::TemplatesController < ApplicationController
end
def multi_destroy
+ destroyed = []
+ failed = []
Template.find(params[:selected]).each do |template|
- if check_privilege(Privilege::MODIFY, template)
- template.destroy
+ if check_privilege(Privilege::MODIFY, template) and template.destroy
+ destroyed << template.name
else
- flash[:error] = "You don't have a permission to delete."
+ failed << template.name
end
end
+
+ unless destroyed.empty?
+ flash[:notice] = t('templates.index.deleted', :count => destroyed.length, :list => destroyed.join(', '))
+ end
+ unless failed.empty?
+ flash[:error] = t('templates.index.not_deleted', :count => failed.length, :list => failed.join(', '))
+ end
redirect_to image_factory_templates_url
end
diff --git a/src/config/locales/en.yml b/src/config/locales/en.yml
index 9cfe221..b8455bc 100644
--- a/src/config/locales/en.yml
+++ b/src/config/locales/en.yml
@@ -2,7 +2,6 @@ en:
dashboard: Dashboard
instances: Instances
users: Users
- templates: Templates
settings: Settings
about: About
configure: Configure
@@ -72,7 +71,6 @@ en:
instances: Instances
searches: Searches
image_factory: Image Factory
- templates: Templates
assemblies: Assemblies
template_collections: Template Collections
administration: Administration
@@ -95,6 +93,15 @@ en:
index:
deleted: "Deleted the following Pool Families: %{list}."
not_deleted: "Could not delete the following Pool Families: %{list}."
+ templates:
+ templates: Templates
+ index:
+ deleted:
+ one: "Template %{list} was deleted."
+ other: "Templates %{list} were deleted."
+ not_deleted:
+ one: "Template %{list} was not deleted."
+ other: "Templates %{list} were not deleted."
deployables:
index:
deployables: Deployables
diff --git a/src/config/navigation.rb b/src/config/navigation.rb
index 21e1236..074f905 100644
--- a/src/config/navigation.rb
+++ b/src/config/navigation.rb
@@ -7,7 +7,7 @@ SimpleNavigation::Configuration.run do |navigation|
second_level.item :instances, t(:instances), resources_instances_path
end
first_level.item :image_factory, t(:image_factory), image_factory_templates_path, :highlights_on => /\/image_factory/ do |second_level|
- second_level.item :templates, t(:templates), image_factory_templates_path
+ second_level.item :templates, t('templates.templates'), image_factory_templates_path
second_level.item :assemblies, t(:assemblies), image_factory_assemblies_path
second_level.item :deployables, t('deployables.index.deployables'), image_factory_deployables_path
second_level.item :image_imports, t(:image_imports), new_image_factory_image_import_path
--
1.7.4.4
12 years, 10 months