You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@deltacloud.apache.org by jv...@redhat.com on 2013/04/05 00:14:18 UTC

RHEVm - Allow for user selectable 1st boot device

RHEVm - Provide for user selectable first boot device.

The default first boot device has been changed in the rbovirt gem
to hard disk, followed by network. This push allows the user to
explicitly specify the first boot device as either network or 
hard disk with the other becoming the second boot device. 

This patch addresses Jira DTACLOUD-514 and is tracked in:
http://tracker.deltacloud.org/set/412


[PATCH 1/2] RHEVm - Provide for user selectable first boot device.

Posted by jv...@redhat.com.
From: Joe VLcek <jv...@redhat.com>

The default first boot device has been changed in the rbovirt gem
to hard disk, followed by network. This push allows the user to
explicitly specify the first boot device as either netowrk or
hard disk with the other becoming the second boot device.
---
 server/lib/deltacloud/drivers/rhevm/rhevm_driver.rb | 2 ++
 server/views/instances/new.html.haml                | 8 ++++++++
 2 files changed, 10 insertions(+)

diff --git a/server/lib/deltacloud/drivers/rhevm/rhevm_driver.rb b/server/lib/deltacloud/drivers/rhevm/rhevm_driver.rb
index 724c6b3..ce34457 100644
--- a/server/lib/deltacloud/drivers/rhevm/rhevm_driver.rb
+++ b/server/lib/deltacloud/drivers/rhevm/rhevm_driver.rb
@@ -23,6 +23,7 @@ module Deltacloud
 class RhevmDriver < Deltacloud::BaseDriver
 
   feature :instances, :user_data
+  feature :instances, :first_boot_dev
   feature :instances, :user_name do
     { :max_length => 50 }
   end
@@ -192,6 +193,7 @@ class RhevmDriver < Deltacloud::BaseDriver
       params[:cores] = opts[:hwp_cpu] if opts[:hwp_cpu]
       params[:user_data] = opts[:user_data].gsub(/\n/,'') if opts[:user_data]
       params[:fileinject_path] = "deltacloud-user-data.txt"
+      params[:first_boot_dev] = opts[:first_boot_dev] if opts[:first_boot_dev]
       convert_instance(client, client.create_vm(params))
     end
   end
diff --git a/server/views/instances/new.html.haml b/server/views/instances/new.html.haml
index f508e7f..57ce572 100644
--- a/server/views/instances/new.html.haml
+++ b/server/views/instances/new.html.haml
@@ -37,6 +37,14 @@
             %br/
             %a{ :href => "", :onclick => 'encodeb64();', :'data-ajax' => 'false'} Encode data
 
+        - if driver.class.has_feature?(:instances, :first_boot_dev)
+          %fieldset{ :'data-role' => 'controlgroup', 'data-iconpos' => 'right'}
+            %legend First boot device:
+            %input{ :name => 'first_boot_dev', :id => :first_boot_dev_hd, :value => 'hd', :checked => 'checked', :type => 'radio'}
+            %label{ :for => :first_boot_dev_hd} Hard Disk
+            %input{ :name  => 'first_boot_dev', :id => :first_boot_dev_network, :value => 'network', :type => "radio"}
+            %label{ :for => :first_boot_dev_network} Network
+
         - if driver.class.has_feature?(:instances, :instance_count)
           %div{ 'data-role' => :fieldcontain }
             %label{ :for => :instance_count} # of instances to be launched:
-- 
1.7.11.7


[PATCH 2/2] Bump rbovirt version to 0.0.19 and address bundle failures for excon

Posted by jv...@redhat.com.
From: Joe VLcek <jv...@redhat.com>

---
 server/Gemfile | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/server/Gemfile b/server/Gemfile
index 7ac1b25..f164429 100644
--- a/server/Gemfile
+++ b/server/Gemfile
@@ -1,5 +1,7 @@
 source "http://rubygems.org"
 
+gem 'excon', '< 0.17.0'
+
 gemspec
 
 platforms :jruby do
-- 
1.7.11.7


Re: RHEVm - Allow for user selectable 1st boot device

Posted by jvlcek <jv...@redhat.com>.
On 04/04/2013 06:33 PM, David Lutterkort wrote:
> On Thu, 2013-04-04 at 18:14 -0400, jvlcek@redhat.com wrote:
>> RHEVm - Provide for user selectable first boot device.
>>
>> The default first boot device has been changed in the rbovirt gem
>> to hard disk, followed by network. This push allows the user to
>> explicitly specify the first boot device as either network or 
>> hard disk with the other becoming the second boot device. 
>>
>> This patch addresses Jira DTACLOUD-514 and is tracked in:
>> http://tracker.deltacloud.org/set/412
> Since we require instances be based off an image, does network boot make
> sense in this context ? What role does the image/template play when one
> uses network boot ?
>
> David
>
>

David,

Thanks for the feedback but I'm not sure I understand your point.
Let me explain the reasoning behind this solution.

Up until now, when a user attempted to launch an image and
create a running instance, rbovirt was hard coded to set the
first boot device as network (PXE) and the 2nd boot device as
hard disk. This was a problem if a PXE server was serving
the network where the instance was being launched and
even when a PXE server wasn't available the boot time took
longer waiting for the PXE attempt to time out and fail
over to hard disk.

It does seem a bit odd to me that someone might want to
network boot a pre-built image. Is this the point you are
making?

I think  it might allow for a custom boot from a PXE
server without having to rebuild RHEVm images.

When this issue came up Michal and I discussed it and it
seemed to make sense to simply have the hard disk be
the default boot device but doing that left us concerned
for how to satisfy any fickle-minded customers that might
have taken advantage of the current network boot priority.

We decided to make the default be hard disk 1st and
allow any fickle minded users, who have come to expect
the network boot priority, to select it if they so desire.

Thoughts?

Joe



Re: RHEVm - Allow for user selectable 1st boot device

Posted by David Lutterkort <lu...@redhat.com>.
On Thu, 2013-04-04 at 18:14 -0400, jvlcek@redhat.com wrote:
> RHEVm - Provide for user selectable first boot device.
> 
> The default first boot device has been changed in the rbovirt gem
> to hard disk, followed by network. This push allows the user to
> explicitly specify the first boot device as either network or 
> hard disk with the other becoming the second boot device. 
> 
> This patch addresses Jira DTACLOUD-514 and is tracked in:
> http://tracker.deltacloud.org/set/412

Since we require instances be based off an image, does network boot make
sense in this context ? What role does the image/template play when one
uses network boot ?

David