I am upgrading from 1.1.1 to 1.2.0 and I can see that I will have this same problem again. Again, you would need to do this in the case that your NFS server (the FOG server) is not the same as where your files are (on a NAS or SAN). I wrote up this patch file. You would want to change 10.205.205.20 to the IP address of your SAN/NAS and you would want to change [FONT=Consolas]10.10.5.10 to the IP address of your FOG server.[/FONT]
[CODE]— packages/web/service/Post_Stage2.php.orig 2015-02-20 08:59:27.731899437 -0500
+++ packages/web/service/Post_Stage2.php 2015-02-20 08:59:51.191898383 -0500
@@ -52,7 +52,7 @@
// Where is it going?
$dest = $StorageNode->get(‘path’).‘/’.$_REQUEST[‘to’];
//Attempt transfer of image file to Storage Node
-
$ftp->set('host',$StorageNode->get('ip'))
-
$ftp->set('host','10.10.5.10') ->set('username',$StorageNode->get('user')) ->set('password',$StorageNode->get('pass')); if (!$ftp->connect())
— packages/web/lib/fog/ImageReplicator.class.php.orig 2015-02-20 09:02:09.363892178 -0500
+++ packages/web/lib/fog/ImageReplicator.class.php 2015-02-20 09:03:14.135889269 -0500
@@ -16,7 +16,7 @@
}
private function commonOutput()
{
-
$StorageNode = current($this->FOGCore->getClass('StorageNodeManager')->find(array('isMaster' => 1,'isEnabled' => 1, 'ip' => $this->FOGCore->getIPAddress())));
-
$StorageNode = current($this->FOGCore->getClass('StorageNodeManager')->find(array('isMaster' => 1,'isEnabled' => 1, 'ip' => '10.205.205.20'))); try { if ($StorageNode)
— packages/web/lib/fog/MulticastManager.class.php.orig 2015-02-20 09:04:44.975885190 -0500
+++ packages/web/lib/fog/MulticastManager.class.php 2015-02-20 09:05:23.587883456 -0500
@@ -78,7 +78,7 @@
{
try
{
-
$StorageNode = current($this->FOGCore->getClass('StorageNodeManager')->find(array('isMaster' => 1,'isEnabled' => 1,'ip' => $this->FOGCore->getIPAddress())));
-
$StorageNode = current($this->FOGCore->getClass('StorageNodeManager')->find(array('isMaster' => 1,'isEnabled' => 1, 'ip' => '10.205.205.20'))); if (!$StorageNode || !$StorageNode->isValid()) throw new Exception(sprintf(" | StorageNode Not found on this system.")); $myroot = $StorageNode->get('path');
— packages/web/lib/fog/Image.class.php.orig 2015-02-20 09:06:19.163880960 -0500
+++ packages/web/lib/fog/Image.class.php 2015-02-20 09:07:02.043879034 -0500
@@ -159,7 +159,7 @@
$SNME = ($SN && $SN->get(‘isEnabled’) == ‘1’ ? true : false);
if ($SNME)
{
-
$ftphost = $SN->get('ip');
-
$ftphost = '10.10.5.10'; $ftpuser = $SN->get('user'); $ftppass = $SN->get('pass'); $ftproot = rtrim($SN->get('path'),'/').'/'.$this->get('path');
— packages/web/lib/fog/FOGFTP.class.php.orig 2015-02-20 09:07:59.171876468 -0500
+++ packages/web/lib/fog/FOGFTP.class.php 2015-02-20 09:08:28.223875164 -0500
@@ -28,7 +28,7 @@
if (($this->link && $this->lastConnectionHash == $connectionHash) || !$this->get(‘host’) || !$this->get(‘username’) || !$this->get(‘password’) || !$this->get(‘port’))
return $this;
// Connect
-
$this->link = @ftp_connect($this->get('host'), $this->get('port'), $this->get('timeout'));
-
$this->link = @ftp_connect(('10.10.5.10'), $this->get('port'), $this->get('timeout')); if (!$this->link) { $error = error_get_last();
[/CODE]
Apply it like this …
Save the above file to fog_1.2.0.patch, and then:
[CODE]
tar xzf fog_1.2.0.tar.gz
cp ~/fog_1.2.0.patch fog_1.2.0
cd fog_1.2.0
patch -p0 < fog_1.2.0.patch
[/CODE]