problem to deploy imported rhev image via conductor
by Berezovski, Vladimir
I try to import existing RHEV template into conductor and deploy it via GUI .Here are the steps O performed :
Found rhev template id using API
Importing its template .Worked :
#aeolus-image import --account rhevm1 --id 27cb7da8-7d95-48b8-829a-5f7edd69b838 --environment default --description '<image><name>RHEL5.6</name></image>'
Image Build Target Image Provider Image Status
------------------------------------ ------------------------------------ ------------------------------------ ------------------------------------ --------
fe233a28-e312-45a2-bd82-91604a373eb5 76a14ea7-4d7a-49c4-b60a-7a55c15785ea 7f70451b-7f3a-4b90-b59b-e24ff5cb35ef 3d91e701-0a57-43a0-b330-ebc6b87c8c6b COMPLETE
# aeolus-image list --targetimages 76a14ea7-4d7a-49c4-b60a-7a55c15785ea
ID Status Build
------------------------------------ -------- ------------------------------------
7f70451b-7f3a-4b90-b59b-e24ff5cb35ef COMPLETE 76a14ea7-4d7a-49c4-b60a-7a55c15785ea
So far looks fine .
Now in the Environments , Images I may see imported image . Select it , then " New Deployable from Image " , Create Deployable for available Catalog , Save , Deploy ? - yes, pressing Launch and get
Failed to launch following assemblies: Method not allowed for this resource - Instance failure error .
The Deployable XML looks like :
<deployable name="RHEL5.6" version="1.0">
<description/>
<assemblies>
<assembly hwp="RHEL5.6-medium" name="RHEL5-6">
<image id="fe233a28-e312-45a2-bd82-91604a373eb5"/>
</assembly>
</assemblies>
</deployable>
I assume that if image was imported its status is already built and pushed , right ? Neither extra xml editing required ?
By the way , when I added rhevm and account for it realm also was done .Its status - Provider AccountsMapped to realm is set to may rhevm account name .Is it correct ?
/Vlad
________________________________
This message is confidential and intended only for the addressee. If you have received this message in error, please immediately notify the postmaster(a)nds.com and delete it from your system as well as any copies. The content of e-mails as well as traffic data may be monitored by NDS for employment and security purposes.
To protect the environment please do not print this e-mail unless necessary.
An NDS Group Limited company. www.nds.com
12 years, 2 months
iwhd-1.5 released [stable]
by Jim Meyering
This release fixes one bug. See below.
Here are the compressed sources and a GPG detached signature[*]:
http://people.redhat.com/meyering/iwhd/iwhd-1.5.tar.xz
http://people.redhat.com/meyering/iwhd/iwhd-1.5.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.5.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.17-a7476
Automake 1.11a
Gnulib v0.0-7114-g4dda933
NEWS
* Noteworthy changes in release 1.5 (2012-03-10) [stable]
** Bug fixes
iwhd now rejects an attempt to add attribute k/v pair to a nonexistent
object. Before, it would add the attribute, which would then make it
appear (listing the parent bucket) as if the still-nonexistent object
existed.
12 years, 2 months
[PATCH conductor] Fix undefined method `<=>' for :"fr-FR":Symbol
by Imre Farkas
From: Imre Farkas <ifarkas(a)redhat.com>
---
src/app/controllers/application_controller.rb | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/app/controllers/application_controller.rb b/src/app/controllers/application_controller.rb
index 4c3347f..e646e6d 100644
--- a/src/app/controllers/application_controller.rb
+++ b/src/app/controllers/application_controller.rb
@@ -348,7 +348,7 @@ class ApplicationController < ActionController::Base
languages.each do |language|
language += ";q=1.0" unless language.match(";q=\d+\.\d+")
lang_code, lang_weight = language.split(";q=")
- lang_code = lang_code.gsub(/-[a-z]+$/i) { |x| x.upcase }.to_sym
+ lang_code = lang_code.gsub(/-[a-z]+$/i) { |x| x.upcase }
prefs << [lang_weight, lang_code]
end
# This is slightly abusing array sorting
--
1.7.6.5
12 years, 2 months
[PATCH conductor] bug 790735: Enforce image permissions on deleting imported images https://bugzilla.redhat.com/show_bug.cgi?id=790735
by Scott Seago
Recent commits added most of the needed permissions checking for
various image actions. Unfortunately there was a bug in the code
that determined whether the user had permissions.
In particular, although 'and' and '&&' have a similar meaning in isolation
(i.e. 'a and b' and 'a && b' will resolve to the same result, they
have a different operator precedence. && takes precedence over assignment =
However, assignment = takes precedence over 'and'
In this case, it meant that code written like
@foo = @bar and @bar.my_method
Did not do what was needed. The above method is equivalent to:
(@foo = bar) and @bar.my_method
Which is obviously incorrect. It must be rewritten as:
@foo = (@bar and @bar.my_method)
or
@foo = @bar && @bar.my_method
In addition, not only were the 'hide the actions for non-privileged user' filters
in the view not working as desired, but the actual delete actions on provider_images_controller
and target_images_controller were not enforcing permissions.
This patch resolves both issues
---
src/app/controllers/images_controller.rb | 1 +
src/app/controllers/provider_images_controller.rb | 39 ++++++++++++--------
src/app/controllers/target_images_controller.rb | 5 +++
src/app/views/images/show.html.haml | 3 +-
4 files changed, 30 insertions(+), 18 deletions(-)
diff --git a/src/app/controllers/images_controller.rb b/src/app/controllers/images_controller.rb
index 954983a..846ff89 100644
--- a/src/app/controllers/images_controller.rb
+++ b/src/app/controllers/images_controller.rb
@@ -350,6 +350,7 @@ class ImagesController < ApplicationController
selected_images.each do |uuid|
image = Aeolus::Image::Warehouse::Image.find(uuid)
@environment = PoolFamily.where('name' => image.environment).first
+ check_permissions
image.delete!
end
redirect_to images_path, :notice => t("images.flash.notice.multiple_deleted", :count => selected_images.count)
diff --git a/src/app/controllers/provider_images_controller.rb b/src/app/controllers/provider_images_controller.rb
index 0f94e38..4155f7a 100644
--- a/src/app/controllers/provider_images_controller.rb
+++ b/src/app/controllers/provider_images_controller.rb
@@ -18,24 +18,28 @@ class ProviderImagesController < ApplicationController
before_filter :require_user
def create
- provider_account = ProviderAccount.find(params[:account_id])
- @provider_image = Aeolus::Image::Factory::ProviderImage.new(
- :provider => provider_account.provider.name,
- :credentials => provider_account.to_xml(:with_credentials => true),
- :image_id => params[:image_id],
- :build_id => params[:build_id],
- :target_image_id => params[:target_image_id]
- )
- begin
- if @provider_image.save
- flash[:notice] = t('provider_images.flash.notice.upload_start')
- @push_started = true
- else
+ if image = Aeolus::Image::Warehouse::Image.find(params[:image_id])
+ @environment = PoolFamily.where('name' => image.environment).first
+ require_privilege(Privilege::USE, @environment)
+ provider_account = ProviderAccount.find(params[:account_id])
+ @provider_image = Aeolus::Image::Factory::ProviderImage.new(
+ :provider => provider_account.provider.name,
+ :credentials => provider_account.to_xml(:with_credentials => true),
+ :image_id => params[:image_id],
+ :build_id => params[:build_id],
+ :target_image_id => params[:target_image_id]
+ )
+ begin
+ if @provider_image.save
+ flash[:notice] = t('provider_images.flash.notice.upload_start')
+ @push_started = true
+ else
+ flash[:warning] = t('provider_images.flash.warning.upload_failed')
+ end
+ rescue Exception => e
+ logger.error "Caught exception importing image: #{e.message}"
flash[:warning] = t('provider_images.flash.warning.upload_failed')
end
- rescue Exception => e
- logger.error "Caught exception importing image: #{e.message}"
- flash[:warning] = t('provider_images.flash.warning.upload_failed')
end
redirect_to image_path(params[:image_id], :build => params[:build_id], :push_started => @push_started,
:provider_account_id => @push_started ? provider_account.id : nil)
@@ -43,6 +47,9 @@ class ProviderImagesController < ApplicationController
def destroy
if image = Aeolus::Image::Warehouse::ProviderImage.find(params[:id])
+ top_image = Aeolus::Image::Warehouse::Image.find(params[:image_id])
+ @environment = PoolFamily.where('name' => top_image.environment).first
+ require_privilege(Privilege::USE, @environment)
target_id = image.target_identifier
provider = image.provider
i = image.target_image.build.image
diff --git a/src/app/controllers/target_images_controller.rb b/src/app/controllers/target_images_controller.rb
index 4b35fa0..a647315 100644
--- a/src/app/controllers/target_images_controller.rb
+++ b/src/app/controllers/target_images_controller.rb
@@ -19,6 +19,8 @@ class TargetImagesController < ApplicationController
def create
wh_image = Aeolus::Image::Warehouse::Image.find(params[:image_id])
+ @environment = PoolFamily.where('name' => wh_image.environment).first
+ require_privilege(Privilege::USE, @environment)
begin
timage = Aeolus::Image::Factory::Image.new(
@@ -38,6 +40,9 @@ class TargetImagesController < ApplicationController
def destroy
if image = Aeolus::Image::Warehouse::TargetImage.find(params[:id])
+ wh_image = Aeolus::Image::Warehouse::Image.find(params[:image_id])
+ @environment = PoolFamily.where('name' => wh_image.environment).first
+ require_privilege(Privilege::USE, @environment)
i = image.build.image
if i.imported?
if i.delete!
diff --git a/src/app/views/images/show.html.haml b/src/app/views/images/show.html.haml
index 6a4615a..25e4b0b 100644
--- a/src/app/views/images/show.html.haml
+++ b/src/app/views/images/show.html.haml
@@ -12,8 +12,7 @@
= link_to t('.template_xml'), template_image_path((a)image.uuid), :class => 'button pill'
= button_to t("delete"), image_path((a)image.id), :method => 'delete', :confirm => "Are you sure you want to delete?", :class => 'button pill danger', :id => 'delete'
-- user_can_build = @environment and check_privilege(Privilege::USE, @environment)
-
+- user_can_build = (@environment and check_privilege(Privilege::USE, @environment))
%section.admin-content-section
%header
%h2=t'properties'
--
1.7.6.4
12 years, 2 months
[PATCH conductor] bug 801106: limit pool selection within pool family for catalog edit
by Scott Seago
https://bugzilla.redhat.com/show_bug.cgi?id=801106
---
src/app/controllers/catalogs_controller.rb | 19 ++++++++++++++-----
1 files changed, 14 insertions(+), 5 deletions(-)
diff --git a/src/app/controllers/catalogs_controller.rb b/src/app/controllers/catalogs_controller.rb
index 18fa292..a0b8f90 100644
--- a/src/app/controllers/catalogs_controller.rb
+++ b/src/app/controllers/catalogs_controller.rb
@@ -32,9 +32,9 @@ class CatalogsController < ApplicationController
end
def new
+ @catalog = Catalog.new(params[:catalog]) # ...when should there be params on new?
load_pools
require_privilege(Privilege::CREATE, Catalog, @pools.first)
- @catalog = Catalog.new(params[:catalog]) # ...when should there be params on new?
@title = t'catalogs.new.add_catalog'
end
@@ -52,8 +52,8 @@ class CatalogsController < ApplicationController
end
def create
- load_pools
@catalog = Catalog.new(params[:catalog])
+ load_pools
require_privilege(Privilege::CREATE, Catalog, @catalog.pool)
if @catalog.save
flash[:notice] = t('catalogs.flash.notice.created', :count => 1)
@@ -73,8 +73,10 @@ class CatalogsController < ApplicationController
def update
@catalog = Catalog.find(params[:id])
require_privilege(Privilege::MODIFY, @catalog)
- require_privilege(Privilege::CREATE, Catalog, @catalog.pool)
-
+ unless @catalog.pool_id == params[:catalog][:pool_id]
+ require_privilege(Privilege::CREATE, Catalog,
+ Pool.find(params[:catalog][:pool_id]))
+ end
if @catalog.update_attributes(params[:catalog])
flash[:notice] = t('catalogs.flash.notice.updated', :count => 1)
redirect_to catalogs_url
@@ -136,6 +138,13 @@ class CatalogsController < ApplicationController
end
def load_pools
- @pools = Pool.list_for_user(current_user, Privilege::CREATE, Catalog)
+ if @catalog.pool_family
+ @pools = @catalog.pool_family.pools.list_for_user(current_user,
+ Privilege::CREATE,
+ Catalog)
+ @pools.unshift((a)catalog.pool) unless @pools.include?((a)catalog.pool)
+ else
+ @pools = Pool.list_for_user(current_user, Privilege::CREATE, Catalog)
+ end
end
end
--
1.7.6.4
12 years, 2 months
Proposed Wiki Re-organization
by Tzu-Mainn Chen
Hi,
I've put together a proposed wiki re-organization here:
https://www.aeolusproject.org/redmine/projects/aeolus/wiki/Proposed_Wiki_...
At this stage, it's just a re-organization of existing links, with the addition of links to guides and instructions on the main website, and some short explanatory text. In later stages, I'd like to combine some of the wiki pages where logical, create separate pages for things like Conductor, etc.
I also noticed that there are a few dead links (such as http://www.aeolusproject.org/page/Testing_Holy_Grail). I'm guessing that they're the casualty of some web-site reorg, but couldn't find where they ended up - anyone know?
What do people think? If there are no objections, I'll copy this over to the main wiki later today.
Thanks,
Tzu-Mainn Chen
12 years, 2 months
[PATCH conductor] BZ 800849 - CREATE_FAILED instances will not be marked as vanished
by Matt Wagner
Since they were never created on the backend provider, it doesn't
make a lot of sense to mark them as "vanished." It's also a bad user
experience. Instead, if an instance fails to get created, leave it
in that state.
This resolves https://bugzilla.redhat.com/show_bug.cgi?id=800849
and likely https://bugzilla.redhat.com/show_bug.cgi?id=800837 too.
---
src/dbomatic/dbomatic | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/dbomatic/dbomatic b/src/dbomatic/dbomatic
index fbe301d..045b3f7 100755
--- a/src/dbomatic/dbomatic
+++ b/src/dbomatic/dbomatic
@@ -214,7 +214,7 @@ def check_one_account(account)
end
# Only update the instance / create an event if anything has changed!
instance.save! if instance.changed?
- else
+ elsif ![Instance::STATE_CREATE_FAILED, Instance::STATE_VANISHED].include?(instance.state)
# We have an instance in our database, but it didn't come back over the API
DBomaticLogger.instance.info("known instance missing from provider: #{instance.name} #{instance.external_key}")
instance.update_attribute(:state, Instance::STATE_VANISHED)
--
1.7.7.6
12 years, 2 months
problem to build rhevm image
by Berezovski, Vladimir
While building a rhevm image I got an error with this message from png file:
Unable to retrieve install.img file from ftp server .
This template was used for RHEL 6.1 i386 :
<template>
<name>rhel6_1_x86_64</name>
<os>
<name>RHEL-6</name>
<version>1</version>
<arch>x86_64</arch>
<rootpw>password</rootpw>
<install type='url'>
<url>ftp://galactica/RH6/i386/os</url>
</install>
</os>
<description>rhel 6.1 x86_64 template </description>
</template>
Best regards ,
Vladimir Berezovski
________________________________
This message is confidential and intended only for the addressee. If you have received this message in error, please immediately notify the postmaster(a)nds.com and delete it from your system as well as any copies. The content of e-mails as well as traffic data may be monitored by NDS for employment and security purposes.
To protect the environment please do not print this e-mail unless necessary.
An NDS Group Limited company. www.nds.com
12 years, 2 months
Fwd: [AWS-AUS] Amazon News ...
by Justin Clift
Hey all,
This sounds relevant to our hwp stuff. (?)
+ Justin
Begin forwarded message:
> From: Rob Linton <robl(a)jasondb.com>
> Subject: [AWS-AUS] Amazon News ...
> Date: 9 March 2012 3:46:08 PM AEDT
> To: AWS-AUS-announce(a)meetup.com
>
> Hi All,
>
> I have decided to post out news as it breaks from Amazon for those who may be interested. Hopefully those of you who have subscribed to this group will find it interesting.
>
> Big news, Amazon have finally released the Small instance as 64 bit!
> In addition they have released a new medium instance which fits in between the large instance price and the small instance price quite neatly.
>
> The reason that this is big news is that previously for 64bit (and lets face it, everything should be 64bit by now) test and dev environments there was only a choice of Micro (613Mb of RAM which is pretty much useless for anything really) and Large, which is pretty pricy.
>
>
> Small Instance – default*
>
> 1.7 GB memory
> 1 EC2 Compute Unit (1 virtual core with 1 EC2 Compute Unit)
> 160 GB instance storage
> 32-bit or 64-bit platform
> I/O Performance: Moderate
> API name: m1.small
>
> Medium Instance
>
> 3.75 GB memory
> 2 EC2 Compute Unit (1 virtual core with 2 EC2 Compute Unit)
> 410 GB instance storage
> 32-bit or 64-bit platform
> I/O Performance: Moderate
> API name: m1.medium
>
> Large Instance
>
> 7.5 GB memory
> 4 EC2 Compute Units (2 virtual cores with 2 EC2 Compute Units each)
> 850 GB instance storage
> 64-bit platform
> I/O Performance: High
> API name: m1.large
>
> As you can see the choice for dev & test is now very reasonable.
<snip>
--
Aeolus Community Manager
http://www.aeolusproject.org
12 years, 2 months
[PATCH] BZ 801089 always allow user to click through to pool_family details
by Tzu-Mainn Chen
---
src/app/views/pool_families/_list.html.haml | 5 +----
1 files changed, 1 insertions(+), 4 deletions(-)
diff --git a/src/app/views/pool_families/_list.html.haml b/src/app/views/pool_families/_list.html.haml
index 1839c5b..55006a1 100644
--- a/src/app/views/pool_families/_list.html.haml
+++ b/src/app/views/pool_families/_list.html.haml
@@ -13,10 +13,7 @@
.caption_content
%header
%h2
- - if pool_family.pools.any?
- = link_to pool_family.name, pool_family
- - else
- = pool_family.name
+ = link_to pool_family.name, pool_family
.section-controls
#obj_actions
= link_to t("pools.new_pool"), new_pool_path(:pool_family_id => pool_family.id), :class => 'pool_family_button'
--
1.7.6.5
12 years, 2 months