Hello,

Currently there's no way to select which default logical network to use when 
configuring RHEV Resource Providers. This can be very tricky on  medium or 
large networks in which the default "rhevm" network is used only for 
management. In future RHEV/oVirt releases administrators most likely won't give 
users permissions on rhevm network.

Although there are initiatives to change how aeolus manages networks, perhaps a 
short term solution could be implemented until that time comes so that it's not 
required to change a hard coded setting in the code whenever the network to be 
used is different from "rhevm"

To achieve this, I patched the following components:

a) aeolus-configure, so that "network_name" becomes a required configuration 
for RHEV resource providers.
b) iwhd, enabling it to use a variable setting for the network.
c) imagefactory, in order to set "rhevm" as the default network if the packages 
are updated and aeolus-configure is not run again.

Probably the default network could be set in iwhd, but I thought it was easier 
to set it in imagefactory.

Notice that I'm not using the latest releases, but the ones used in CloudForms 
1.1.1. Unfortunately I don't have the resources to test the patches in other 
releases.

I don't know which would be the best option to send the patches, so I'll 
include one per message. 

diff -uNr aeolus-configure-2.8.11/conf/rhevm_configure 
aeolus-configure-2.8.11.network/conf/rhevm_configure
--- aeolus-configure-2.8.11/conf/rhevm_configure        2012-10-25 
19:15:06.000000000 -0200
+++ aeolus-configure-2.8.11.network/conf/rhevm_configure        2013-01-24 
20:34:21.434972317 -0200
@@ -27,4 +27,5 @@
         #  deltacloud_password: password
         #  deltacloud_api: https://rhevm.server.com:8443/api
         #  deltacloud_data_center: data center id
+        #  network_name: rhevm
         #  push_timeout: 1800
diff -uNr 
aeolus-configure-2.8.11/recipes/aeolus/manifests/profiles/rhevm/instance.pp 
aeolus-configure-2.8.11.network/recipes/aeolus/manifests/profiles/rhevm/instance.pp
--- aeolus-configure-2.8.11/recipes/aeolus/manifests/profiles/rhevm/instance.pp 
2012-10-25 19:15:06.000000000 -0200
+++ 
aeolus-configure-2.8.11.network/recipes/aeolus/manifests/profiles/rhevm/instance.pp
 2013-01-24 20:24:40.094971363 -0200
@@ -19,14 +19,16 @@
                                            $deltacloud_password,
                                            $deltacloud_api,
                                            $deltacloud_data_center,
-                                           $push_timeout)
+                                           $push_timeout,
+                                           $network_name)
 {
   aeolus::rhevm::validate{"RHEV NFS export validation for ${name}":
     rhevm_rest_api_url => "$deltacloud_api",
     rhevm_data_center => "$deltacloud_data_center",
     rhevm_username => "$deltacloud_username",
     rhevm_password => "$deltacloud_password",
-    rhevm_nfs_export => "$nfs_export"
+    rhevm_nfs_export => "$nfs_export",
+    rhevm_network_name => "$network_name"
   }
 
   file {"$nfs_mount_point":
diff -uNr aeolus-configure-2.8.11/recipes/aeolus/manifests/rhevm/validate.pp 
aeolus-configure-2.8.11.network/recipes/aeolus/manifests/rhevm/validate.pp
--- aeolus-configure-2.8.11/recipes/aeolus/manifests/rhevm/validate.pp  
2012-10-25 19:15:06.000000000 -0200
+++ aeolus-configure-2.8.11.network/recipes/aeolus/manifests/rhevm/validate.pp  
2013-01-24 21:10:21.458125960 -0200
@@ -1,5 +1,5 @@
-define 
aeolus::rhevm::validate($rhevm_rest_api_url,$rhevm_data_center,$rhevm_username,$rhevm_password,$rhevm_nfs_export){
-  $result = 
rhevm_validate_export_type($rhevm_rest_api_url,$rhevm_data_center,$rhevm_username,$rhevm_password,$rhevm_nfs_export)
+define 
aeolus::rhevm::validate($rhevm_rest_api_url,$rhevm_data_center,$rhevm_username,$rhevm_password,$rhevm_nfs_export,$rhevm_network_name){
+  $result = 
rhevm_validate_export_type($rhevm_rest_api_url,$rhevm_data_center,$rhevm_username,$rhevm_password,$rhevm_nfs_export,$rhevm_network_name)
   notify {"${name}":
     message => "the RHEV NFS export is on the correct storage domain and has 
type 'export' => ${result}"
   }
diff -uNr aeolus-configure-2.8.11/recipes/aeolus/templates/rhevm.json 
aeolus-configure-2.8.11.network/recipes/aeolus/templates/rhevm.json
--- aeolus-configure-2.8.11/recipes/aeolus/templates/rhevm.json 2012-10-25 
19:15:06.000000000 -0200
+++ aeolus-configure-2.8.11.network/recipes/aeolus/templates/rhevm.json 
2013-01-24 20:32:32.964075078 -0200
@@ -10,6 +10,7 @@
     "nfs-host": "<%= params['nfs_server'] %>",
     "api-url": "<%= params['deltacloud_api'] %>",
     "cluster": "_any_",
+    "network_name": "<%= params['network_name'] %>",
     "timeout": <%= params['push_timeout'] %>
   }<%= remaining_instances.zero? ? nil : ',' %>
 <% end -%>




--
Vagner Farias 
[email protected]

Reply via email to