Yaniv Bronhaim has uploaded a new change for review.

Change subject: Override firewall configurations on deploy for provisioned hosts
......................................................................

Override firewall configurations on deploy for provisioned hosts

Currently we don't have parameter for override-firewall configurations
in hosts\[id]\install restapi. Therefore we cannot pass this parameter along
the way from foreman to engine. Until adding the parameter to the API
this patch hacks the code to always override the firewall configurations
for vdsm deploy for each foreman installation when updateVdsCommand is
initiated by the reinstall request. This is monitored by checking that
the host in InstallingOS status, which can be only if the host is
firstly being provisioned by foreman.

https://bugzilla.redhat.com/show_bug.cgi?id=1177126
Signed-off-by: Yaniv Bronhaim <ybron...@redhat.com>
Change-Id: I2634c33d87e9ef8ef41deeac28287b3b7ae1344a
---
M 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/UpdateVdsCommand.java
1 file changed, 8 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/32/36632/1

diff --git 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/UpdateVdsCommand.java
 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/UpdateVdsCommand.java
index a693263..639c389 100644
--- 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/UpdateVdsCommand.java
+++ 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/UpdateVdsCommand.java
@@ -157,7 +157,14 @@
             InstallVdsParameters tempVar = new 
InstallVdsParameters(getVdsId(), getParameters().getPassword());
             
tempVar.setIsReinstallOrUpgrade(getParameters().getIsReinstallOrUpgrade());
             tempVar.setoVirtIsoFile(getParameters().getoVirtIsoFile());
-            tempVar.setOverrideFirewall(getParameters().getOverrideFirewall());
+            if (getVdsDAO().get(getVdsId()).getStatus() ==  
VDSStatus.InstallingOS) {
+                // TODO: remove hack when reinstall api will provider 
override-firewall parameter.
+                // https://bugzilla.redhat.com/show_bug.cgi?id=1177126 - for 
now we override firewall
+                // configurations on each deploy for provisioned host to avoid 
wrong deployment.
+                tempVar.setOverrideFirewall(true);
+            } else {
+                
tempVar.setOverrideFirewall(getParameters().getOverrideFirewall());
+            }
             tempVar.setActivateHost(getParameters().getActivateHost());
             
tempVar.setRebootAfterInstallation(getParameters().isRebootAfterInstallation());
             
tempVar.setNetworkProviderId(getParameters().getNetworkProviderId());


-- 
To view, visit http://gerrit.ovirt.org/36632
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2634c33d87e9ef8ef41deeac28287b3b7ae1344a
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: ovirt-engine-3.5
Gerrit-Owner: Yaniv Bronhaim <ybron...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to