simias-svn Mailing List for simias (Page 9)
Brought to you by:
srinidhi_bs
You can subscribe to this list here.
| 2009 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(6) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2010 |
Jan
|
Feb
(16) |
Mar
(9) |
Apr
(20) |
May
(24) |
Jun
(30) |
Jul
(29) |
Aug
(47) |
Sep
(11) |
Oct
(5) |
Nov
(3) |
Dec
(1) |
| 2011 |
Jan
(5) |
Feb
(2) |
Mar
(6) |
Apr
(15) |
May
(3) |
Jun
(2) |
Jul
(2) |
Aug
(5) |
Sep
(1) |
Oct
|
Nov
|
Dec
|
| 2012 |
Jan
|
Feb
|
Mar
(1) |
Apr
(5) |
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
| 2013 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
(6) |
Sep
(20) |
Oct
(5) |
Nov
|
Dec
|
| 2014 |
Jan
|
Feb
(3) |
Mar
(2) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2016 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
(4) |
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2017 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: <spr...@us...> - 2010-06-23 11:23:38
|
Revision: 7404
http://simias.svn.sourceforge.net/simias/?rev=7404&view=rev
Author: spratima
Date: 2010-06-23 11:23:32 +0000 (Wed, 23 Jun 2010)
Log Message:
-----------
Bumping version in windows client simias to 3.8.2.0
Modified Paths:
--------------
trunk/src/core/SimiasClient/Properties/AssemblyInfo.cs
Modified: trunk/src/core/SimiasClient/Properties/AssemblyInfo.cs
===================================================================
--- trunk/src/core/SimiasClient/Properties/AssemblyInfo.cs 2010-06-23 11:22:51 UTC (rev 7403)
+++ trunk/src/core/SimiasClient/Properties/AssemblyInfo.cs 2010-06-23 11:23:32 UTC (rev 7404)
@@ -29,5 +29,5 @@
// Build Number
// Revision
//
-[assembly: AssemblyVersion("3.8.1.0")]
-[assembly: AssemblyFileVersion("3.8.1.0")]
+[assembly: AssemblyVersion("3.8.2.0")]
+[assembly: AssemblyFileVersion("3.8.2.0")]
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <spr...@us...> - 2010-06-23 11:22:57
|
Revision: 7403
http://simias.svn.sourceforge.net/simias/?rev=7403&view=rev
Author: spratima
Date: 2010-06-23 11:22:51 +0000 (Wed, 23 Jun 2010)
Log Message:
-----------
Bumping version in windows client simias to 3.8.2.0
Modified Paths:
--------------
trunk/src/core/Properties/AssemblyInfo.cs
Modified: trunk/src/core/Properties/AssemblyInfo.cs
===================================================================
--- trunk/src/core/Properties/AssemblyInfo.cs 2010-06-23 11:21:36 UTC (rev 7402)
+++ trunk/src/core/Properties/AssemblyInfo.cs 2010-06-23 11:22:51 UTC (rev 7403)
@@ -29,5 +29,5 @@
// Build Number
// Revision
//
-[assembly: AssemblyVersion("3.8.1.0")]
-[assembly: AssemblyFileVersion("3.8.1.0")]
+[assembly: AssemblyVersion("3.8.2.0")]
+[assembly: AssemblyFileVersion("3.8.2.0")]
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <spr...@us...> - 2010-06-23 11:21:42
|
Revision: 7402
http://simias.svn.sourceforge.net/simias/?rev=7402&view=rev
Author: spratima
Date: 2010-06-23 11:21:36 +0000 (Wed, 23 Jun 2010)
Log Message:
-----------
Bumping version in windows client simias to 3.8.2.0
Modified Paths:
--------------
trunk/src/core/POBoxWS/Properties/AssemblyInfo.cs
Modified: trunk/src/core/POBoxWS/Properties/AssemblyInfo.cs
===================================================================
--- trunk/src/core/POBoxWS/Properties/AssemblyInfo.cs 2010-06-23 11:20:12 UTC (rev 7401)
+++ trunk/src/core/POBoxWS/Properties/AssemblyInfo.cs 2010-06-23 11:21:36 UTC (rev 7402)
@@ -29,5 +29,5 @@
// Build Number
// Revision
//
-[assembly: AssemblyVersion("3.8.1.0")]
-[assembly: AssemblyFileVersion("3.8.1.0")]
+[assembly: AssemblyVersion("3.8.2.0")]
+[assembly: AssemblyFileVersion("3.8..0")]
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <spr...@us...> - 2010-06-23 11:20:18
|
Revision: 7401
http://simias.svn.sourceforge.net/simias/?rev=7401&view=rev
Author: spratima
Date: 2010-06-23 11:20:12 +0000 (Wed, 23 Jun 2010)
Log Message:
-----------
Bumping version in windows client simias to 3.8.2.0
Modified Paths:
--------------
trunk/src/core/FlaimProvider/FlaimWrapper/FlaimWrapper.vcproj
Modified: trunk/src/core/FlaimProvider/FlaimWrapper/FlaimWrapper.vcproj
===================================================================
--- trunk/src/core/FlaimProvider/FlaimWrapper/FlaimWrapper.vcproj 2010-06-23 11:11:26 UTC (rev 7400)
+++ trunk/src/core/FlaimProvider/FlaimWrapper/FlaimWrapper.vcproj 2010-06-23 11:20:12 UTC (rev 7401)
@@ -84,7 +84,7 @@
Name="VCLinkerTool"
AdditionalDependencies="rpcrt4.lib ws2_32.lib odbc32.lib odbccp32.lib flaim.lib msvcrt.lib"
OutputFile=".\Release/FlaimWrapper.dll"
- Version="3.8.1.0"
+ Version="3.8.2.0"
LinkIncremental="1"
SuppressStartupBanner="true"
AdditionalLibraryDirectories=""$(SolutionDir)..\..\dependencies\external\libflaim\win32""
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <spr...@us...> - 2010-06-23 11:11:32
|
Revision: 7400
http://simias.svn.sourceforge.net/simias/?rev=7400&view=rev
Author: spratima
Date: 2010-06-23 11:11:26 +0000 (Wed, 23 Jun 2010)
Log Message:
-----------
Bumping version in windows client simias to 3.8.2.0
Modified Paths:
--------------
trunk/src/core/SimiasApp/Properties/AssemblyInfo.cs
Modified: trunk/src/core/SimiasApp/Properties/AssemblyInfo.cs
===================================================================
--- trunk/src/core/SimiasApp/Properties/AssemblyInfo.cs 2010-06-22 15:04:40 UTC (rev 7399)
+++ trunk/src/core/SimiasApp/Properties/AssemblyInfo.cs 2010-06-23 11:11:26 UTC (rev 7400)
@@ -29,5 +29,5 @@
// Build Number
// Revision
//
-[assembly: AssemblyVersion("3.8.1.0")]
-[assembly: AssemblyFileVersion("3.8.1.0")]
+[assembly: AssemblyVersion("3.8.2.0")]
+[assembly: AssemblyFileVersion("3.8.2.0")]
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jj...@us...> - 2010-06-22 15:04:47
|
Revision: 7399
http://simias.svn.sourceforge.net/simias/?rev=7399&view=rev
Author: jjohnny
Date: 2010-06-22 15:04:40 +0000 (Tue, 22 Jun 2010)
Log Message:
-----------
ID: Bug #611583
Reviewers: GG
Localization Required: No
Documentation Required: No
Description: simias-server-setup - During slave server configuration, quit if the slave server name is already used in the domain.
Modified Paths:
--------------
trunk/src/server/setup/SimiasServerSetup.cs
Modified: trunk/src/server/setup/SimiasServerSetup.cs
===================================================================
--- trunk/src/server/setup/SimiasServerSetup.cs 2010-06-22 14:55:48 UTC (rev 7398)
+++ trunk/src/server/setup/SimiasServerSetup.cs 2010-06-22 15:04:40 UTC (rev 7399)
@@ -2281,7 +2281,7 @@
// ldapSettings.SyncOnStart = Ldap.LdapSettings.DefaultSyncOnStart;
}
- if (slaveServer.Value && useLdap.Value)
+ if (status && slaveServer.Value && useLdap.Value)
{
//prompt for ldap settings.
ldapServer.Prompt = true;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jj...@us...> - 2010-06-22 14:55:54
|
Revision: 7398
http://simias.svn.sourceforge.net/simias/?rev=7398&view=rev
Author: jjohnny
Date: 2010-06-22 14:55:48 +0000 (Tue, 22 Jun 2010)
Log Message:
-----------
ID: Bug #614964
Reviewers: Bipin, Srinidhi
Localization Required: No
Documentation Required: No
Description: Removed bashism in ifdata script.
Credits : Patch by C Sights <cs...@fa...>
Modified Paths:
--------------
trunk/src/core/ifdata
Modified: trunk/src/core/ifdata
===================================================================
--- trunk/src/core/ifdata 2010-06-21 06:49:29 UTC (rev 7397)
+++ trunk/src/core/ifdata 2010-06-22 14:55:48 UTC (rev 7398)
@@ -1,12 +1,6 @@
#!/bin/sh
-#if [ "$OSTYPE" == "darwin7.0" ]
-#then
-# /sbin/ifconfig | grep 'inet ' | cut -f2 -d' ' | cut -f1 -d' '
-#else
-# /sbin/ifconfig | grep 'inet addr' | cut -f2 -d':' | cut -f1 -d' '
-#fi
ostype=`echo $OSTYPE | awk '/^darwin/ {print "darwin"}'`
-if [ "$ostype" == "darwin" ]
+if [ "$ostype" = "darwin" ]
then
/sbin/ifconfig | grep '\<inet\>' | cut -f2 -d' ' | cut -f1 -d' '
else
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jj...@us...> - 2010-06-21 06:49:35
|
Revision: 7397
http://simias.svn.sourceforge.net/simias/?rev=7397&view=rev
Author: jjohnny
Date: 2010-06-21 06:49:29 +0000 (Mon, 21 Jun 2010)
Log Message:
-----------
ID: Bug #609106
Reviewers: Anil
Localization Required: No
Documentation Required: No
Description: Local machine policies (default filetype filter policies) will not be shown in Admin console.
Local machine policies in GetiFolderPolicy and GetUserPolicy APIs
in iFolderAdmin.asmx would be filtered out.
Modified Paths:
--------------
trunk/src/core/CollectionStore/Policy.cs
trunk/src/core/Policy/FileTypeFilter.cs
trunk/src/webservices/UserPolicy.cs
trunk/src/webservices/iFolderPolicy.cs
Modified: trunk/src/core/CollectionStore/Policy.cs
===================================================================
--- trunk/src/core/CollectionStore/Policy.cs 2010-06-17 07:06:35 UTC (rev 7396)
+++ trunk/src/core/CollectionStore/Policy.cs 2010-06-21 06:49:29 UTC (rev 7397)
@@ -119,6 +119,25 @@
}
/// <summary>
+ /// Gets whether this is a local machine policy.
+ /// </summary>
+ public bool IsLocalMachinePolicy
+ {
+ get
+ {
+ Property p = properties.GetSingleProperty( PropertyTags.PolicyAssociation );
+
+ if (p != null) {
+ Store store = Store.GetStore();
+ Collection c = store.GetCollectionByID( ( p.Value as Relationship ).CollectionID );
+ return c.IsType (NodeTypes.LocalDatabaseType);
+ }
+ return false;
+ }
+ }
+
+
+ /// <summary>
/// Returns the PolicyTime object for this policy. If there is no time condition,
/// null is returned.
/// </summary>
@@ -782,6 +801,8 @@
/// returned if the Policy does not exist.</returns>
public Policy GetAggregatePolicy( string policyID, Member member )
{
+ // TODO : Mark GetAggregatePolicy methods as static.
+
return GetAggregatePolicy( policyID, member, false );
}
@@ -814,7 +835,24 @@
/// <param name="includeExceptions">Include exception policies.</param>
/// <returns>A reference to the associated aggregate Policy if successful. A null is
/// returned if the Policy does not exist.</returns>
- public Policy GetAggregatePolicy( string policyID, Member member, bool includeExceptions )
+ public Policy GetAggregatePolicy( string policyID, Member member, bool includeExceptions )
+ {
+ return GetAggregatePolicy( policyID, member, includeExceptions, true );
+ }
+
+ /// <summary>
+ /// Gets an aggregate Policy that is associated with the user. This routine will check for
+ /// an associated Policy on the Member first. If no Policy is found, the domain will
+ /// be searched for an associated Policy. If there is a local Policy for the user it will
+ /// be aggregated with the other Policy if one was found. Otherwise it will be returned.
+ /// </summary>
+ /// <param name="policyID">Strong name for the Policy.</param>
+ /// <param name="member">Member used to lookup the associated aggregate Policy.</param>
+ /// <param name="includeExceptions">Include exception policies.</param>
+ /// <param name="includeLocalMachinePolicy">Include local machine policies.</param>
+ /// <returns>A reference to the associated aggregate Policy if successful. A null is
+ /// returned if the Policy does not exist.</returns>
+ public Policy GetAggregatePolicy( string policyID, Member member, bool includeExceptions, bool includeLocalMachinePolicy )
{
// First look for an exception policy for the member object. If a policy is found,
// then we don't need to look for a domain policy since the exception policy will
@@ -874,23 +912,61 @@
policy.AddAggregatePolicy( policy );
}
- // Check for a local policy.
- Policy localPolicy = GetPolicy( policyID );
- if ( localPolicy != null )
+ if (includeLocalMachinePolicy)
+ {
+ // Check for a local policy.
+ Policy localPolicy = GetPolicy( policyID );
+ if ( localPolicy != null )
+ {
+ // If there is no exception or domain policy return the local policy.
+ if ( policy == null )
+ policy = localPolicy;
+
+ // Set the aggregation.
+ policy.AddAggregatePolicy( localPolicy );
+ }
+ }
+
+ return policy;
+ }
+
+ /// <summary>
+ /// Gets an aggregate Policy that is associated with the user and the specified Collection.
+ /// This routine will check for an associated Policy on the Member first. If no Policy is
+ /// found, the domain will be searched for an associated Policy. If there is a local Policy
+ /// for the user it will be aggregated with the other Policy if one was found. Otherwise
+ /// it will be returned. The procedure for the local Policy is also followed for an
+ /// associated Collection Policy.
+ /// </summary>
+ /// <param name="policyID">Strong name of the Policy.</param>
+ /// <param name="member">Member used to lookup the associated aggregate Policy.</param>
+ /// <param name="collection">Collection used to lookup the associated aggregate Policy.</param>
+ /// <param name="includeExceptions">Include exception policies.</param>
+ /// <param name="includeLocalMachinePolicy">Include local machine policies.</param>
+ /// <returns>A reference to the associated aggregate Policy if successful. A null is
+ /// returned if the Policy does not exist.</returns>
+ public Policy GetAggregatePolicy( string policyID, Member member, Collection collection, bool includeExceptions, bool includeLocalMachinePolicy )
+ {
+ // Get the aggregate for the member.
+ Policy policy = GetAggregatePolicy( policyID, member, includeExceptions, includeLocalMachinePolicy );
+
+ // Check for a collection policy.
+ Policy collectionPolicy = GetPolicy( policyID, collection , includeLocalMachinePolicy);
+ if ( collectionPolicy != null )
{
// If there is no exception or domain policy return the local policy.
if ( policy == null )
{
- policy = localPolicy;
+ policy = collectionPolicy;
}
// Set the aggregation.
- policy.AddAggregatePolicy( localPolicy );
+ policy.AddAggregatePolicy( collectionPolicy );
}
return policy;
}
-
+
/// <summary>
/// Gets an aggregate Policy that is associated with the user and the specified Collection.
/// This routine will check for an associated Policy on the Member first. If no Policy is
@@ -935,6 +1011,8 @@
/// returned if the Policy does not exist.</returns>
public Policy GetPolicy( string policyID )
{
+ //TODO : Mark GetPolicy methods static.
+
Policy policy = null;
// Search the local database for the specified policy.
@@ -1059,18 +1137,39 @@
/// returned if the Policy does not exist.</returns>
public Policy GetPolicy( string policyID, Collection collection )
{
+ return GetPolicy( policyID, collection, true );
+ }
+
+ /// <summary>
+ /// Gets the Policy that is associated with the collection.
+ /// </summary>
+ /// <param name="policyID">Strong name of the Policy.</param>
+ /// <param name="collection">Collection used to lookup the associated Policy.</param>
+ /// <param name="includeLocalMachinePolicy">Includes local machine policy.</param>
+ /// <returns>A reference to the associated Policy if successful. A null is
+ /// returned if the Policy does not exist.</returns>
+ public Policy GetPolicy( string policyID, Collection collection, bool includeLocalMachinePolicy )
+ {
Policy policy = null;
-
+
// Search the collection for the specified policy.
ICSList list = collection.Search( PropertyTags.PolicyID, policyID, SearchOp.Equal );
foreach ( ShallowNode sn in list )
{
Policy tempPolicy = new Policy( collection, sn );
- if ( !tempPolicy.IsSystemPolicy )
- {
- policy = tempPolicy;
- break;
- }
+ if (includeLocalMachinePolicy) {
+ if ( !tempPolicy.IsSystemPolicy )
+ {
+ policy = tempPolicy;
+ break;
+ }
+ } else {
+ if ( !tempPolicy.IsSystemPolicy && !tempPolicy.IsLocalMachinePolicy)
+ {
+ policy = tempPolicy;
+ break;
+ }
+ }
}
return policy;
Modified: trunk/src/core/Policy/FileTypeFilter.cs
===================================================================
--- trunk/src/core/Policy/FileTypeFilter.cs 2010-06-17 07:06:35 UTC (rev 7396)
+++ trunk/src/core/Policy/FileTypeFilter.cs 2010-06-21 06:49:29 UTC (rev 7397)
@@ -192,8 +192,28 @@
/// <summary>
/// Initializes a new instance of an object.
/// </summary>
+ /// <param name="member">Member that this file type filter is associated with.</param>
+ /// <param name="includeLocalMachinePolicy">Includes local machine policy.</param>
+ private FileTypeFilter( Member member, bool includeLocalMachinePolicy )
+ {
+ PolicyManager pm = new PolicyManager();
+ this.memberPolicy = pm.GetAggregatePolicy( FileTypeFilterPolicyID, member, true, includeLocalMachinePolicy );
+ }
+
+ /// <summary>
+ /// Initializes a new instance of an object.
+ /// </summary>
/// <param name="collection">Collection that this disk space quota is associated with.</param>
- private FileTypeFilter( Collection collection )
+ private FileTypeFilter( Collection collection ) :this( collection, true )
+ {
+ }
+
+ /// <summary>
+ /// Initializes a new instance of an object.
+ /// </summary>
+ /// <param name="collection">Collection that this disk space quota is associated with.</param>
+ /// <param name="includeLocalMachinePolicy">Includes local machine policy.</param>
+ private FileTypeFilter( Collection collection, bool includeLocalMachinePolicy )
{
PolicyManager pm = new PolicyManager();
@@ -209,9 +229,9 @@
// member should not be null , but if it is , then use old code.
member = collection.Owner;
}
- this.memberPolicy = pm.GetAggregatePolicy( FileTypeFilterPolicyID, member, true );
+ this.memberPolicy = pm.GetAggregatePolicy( FileTypeFilterPolicyID, member, true, includeLocalMachinePolicy );
- this.collectionPolicy = pm.GetAggregatePolicy( FileTypeFilterPolicyID, member, collection, true );
+ this.collectionPolicy = pm.GetAggregatePolicy( FileTypeFilterPolicyID, member, collection, true, includeLocalMachinePolicy );
}
#endregion
@@ -440,7 +460,18 @@
/// Gets the aggregate file type filter policy for the specified member.
/// </summary>
/// <param name="member">Member that filter is associated with.</param>
+ /// <param name="includeLocalMachinePolicy">Includes local machine policy.</param>
/// <returns>A FileTypeFilter object that contains the policy for the specified member.</returns>
+ static public FileTypeFilter Get( Member member, bool includeLocalMachinePolicy )
+ {
+ return new FileTypeFilter( member, includeLocalMachinePolicy);
+ }
+
+ /// <summary>
+ /// Gets the aggregate file type filter policy for the specified member.
+ /// </summary>
+ /// <param name="member">Member that filter is associated with.</param>
+ /// <returns>A FileTypeFilter object that contains the policy for the specified member.</returns>
static public FileTypeFilter Get( Member member )
{
return new FileTypeFilter( member );
@@ -469,6 +500,17 @@
}
/// <summary>
+ /// Gets the aggregate file type filter policy for the specified member and collection.
+ /// </summary>
+ /// <param name="collection">Collection to add to the aggregate quota policy.</param>
+ /// <param name="includeLocalMachinePolicy">Includes local machine policy.</param>
+ /// <returns>A FileTypeFilter object that contains the policy for the specified member.</returns>
+ static public FileTypeFilter Get( Collection collection, bool includeLocalMachinePolicy )
+ {
+ return new FileTypeFilter( collection, includeLocalMachinePolicy );
+ }
+
+ /// <summary>
/// Gets the file type filter patterns associated with the specified domain.
/// </summary>
/// <param name="domainID">Domain that the filter is associated with.</param>
Modified: trunk/src/webservices/UserPolicy.cs
===================================================================
--- trunk/src/webservices/UserPolicy.cs 2010-06-17 07:06:35 UTC (rev 7396)
+++ trunk/src/webservices/UserPolicy.cs 2010-06-21 06:49:29 UTC (rev 7397)
@@ -271,7 +271,7 @@
out props.FileTypesIncludes, out props.FileTypesExcludes);
// file types effective
- SystemPolicy.SplitFileTypes(FileTypeFilter.Get(member).FilterUserList,
+ SystemPolicy.SplitFileTypes(FileTypeFilter.Get(member, false).FilterUserList,
out props.FileTypesIncludesEffective, out props.FileTypesExcludesEffective);
props.AdminGroupRights = iFolderUser.GetAdminRights(AdminId , userID);
return props;
Modified: trunk/src/webservices/iFolderPolicy.cs
===================================================================
--- trunk/src/webservices/iFolderPolicy.cs 2010-06-17 07:06:35 UTC (rev 7396)
+++ trunk/src/webservices/iFolderPolicy.cs 2010-06-21 06:49:29 UTC (rev 7397)
@@ -190,7 +190,7 @@
SystemPolicy.SplitFileTypes(FileTypeFilter.GetPatterns(c),
out props.FileTypesIncludes, out props.FileTypesExcludes);
- SystemPolicy.SplitFileTypes(FileTypeFilter.Get(c).FilterList,
+ SystemPolicy.SplitFileTypes(FileTypeFilter.Get(c, false).FilterList,
out props.FileTypesIncludesEffective, out props.FileTypesExcludesEffective );
// file size
@@ -244,7 +244,7 @@
SystemPolicy.SplitFileTypes(FileTypeFilter.GetPatterns(c),
out props.FileTypesIncludes, out props.FileTypesExcludes);
- SystemPolicy.SplitFileTypes(FileTypeFilter.Get(c).FilterList,
+ SystemPolicy.SplitFileTypes(FileTypeFilter.Get(c, false).FilterList,
out props.FileTypesIncludesEffective, out props.FileTypesExcludesEffective );
// file size
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sb...@us...> - 2010-06-17 07:06:41
|
Revision: 7396
http://simias.svn.sourceforge.net/simias/?rev=7396&view=rev
Author: sbipin
Date: 2010-06-17 07:06:35 +0000 (Thu, 17 Jun 2010)
Log Message:
-----------
ID: #611393
Reviewer: GG
Localization Required: No
Documentation Required: No
Description: Created symlink for adminweb.log under
/var/opt/novell/log/oes/ifolder
Modified Paths:
--------------
trunk/package/linux/ifolder3-enterprise.spec.autobuild
Modified: trunk/package/linux/ifolder3-enterprise.spec.autobuild
===================================================================
--- trunk/package/linux/ifolder3-enterprise.spec.autobuild 2010-06-15 13:40:22 UTC (rev 7395)
+++ trunk/package/linux/ifolder3-enterprise.spec.autobuild 2010-06-17 07:06:35 UTC (rev 7396)
@@ -26,6 +26,7 @@
%define prefix /opt/novell/ifolder3
%define novell_lib /opt/novell/%_lib
%define sysconfdir /etc
+%define OES_LOG /var/opt/novell/log/oes/ifolder
License: GNU General Public License (GPL) v2
Group: Productivity/Networking/Novell
AutoReqProv: on
@@ -74,6 +75,8 @@
make DESTDIR=$RPM_BUILD_ROOT install
mkdir -p $RPM_BUILD_ROOT/etc/ld.so.conf.d/
/usr/bin/install src/server/setup/novell-ifolder3.conf $RPM_BUILD_ROOT/etc/ld.so.conf.d
+install -d $RPM_BUILD_ROOT%{OES_LOG}
+touch $RPM_BUILD_ROOT%{OES_LOG}/adminweb.log
#=============================================================================
%clean
@@ -81,6 +84,8 @@
#=============================================================================
%post
+[ -d %{OES_LOG} ] || mkdir -p %{OES_LOG}
+[ -L %{OES_LOG}/adminweb.log ] || ln -sf /var/log/ifolder3/adminweb.log %{OES_LOG}/adminweb.log
[ -f %{prefix}/%_lib/simias/admin/bin/SimiasLib.dll ] || \
ln -sf %{prefix}/%_lib/simias/web/bin/SimiasLib.dll %{prefix}/%_lib/simias/admin/bin/SimiasLib.dll
[ -f %{prefix}/%_lib/simias/webaccess/bin/SimiasLib.dll ] || \
@@ -149,6 +154,7 @@
%{prefix}/share/*
%dir %{prefix}/%_lib/simias/web
%dir %{prefix}/%_lib/simias/web/bin
+%dir %{OES_LOG}
%{prefix}/%_lib/simias/web/bin/SimiasClient.dll
%{prefix}/%_lib/simias/web/bin/Simias.Web.dll
%{prefix}/%_lib/simias/web/bin/Simias.POBox.Web.dll
@@ -187,6 +193,7 @@
%{prefix}/etc/novell-ifolder3.conf
/etc/ld.so.conf.d/novell-ifolder3.conf
%{novellmandir}/man8/ifolder-data-recovery.8
+%ghost %{OES_LOG}/adminweb.log
%changelog
* Fri May 02 2008 - sri...@no...
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <spr...@us...> - 2010-06-15 13:40:29
|
Revision: 7395
http://simias.svn.sourceforge.net/simias/?rev=7395&view=rev
Author: spratima
Date: 2010-06-15 13:40:22 +0000 (Tue, 15 Jun 2010)
Log Message:
-----------
Bug 608218 - Copy right information in Admin page has to be updated ; webacess update
Modified Paths:
--------------
trunk/src/webaccess/iFolderWeb.resx
Modified: trunk/src/webaccess/iFolderWeb.resx
===================================================================
--- trunk/src/webaccess/iFolderWeb.resx 2010-06-15 13:39:11 UTC (rev 7394)
+++ trunk/src/webaccess/iFolderWeb.resx 2010-06-15 13:40:22 UTC (rev 7395)
@@ -127,7 +127,7 @@
<value>Language:</value>
</data>
<data name="LOGIN.COPYRIGHT">
- <value>&copy; Copyright 2009 Novell, Inc. All rights reserved.</value>
+ <value>&copy; Copyright 2010 Novell, Inc. All rights reserved.</value>
</data>
<data name="LOGIN">
<value>Log In</value>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <spr...@us...> - 2010-06-15 13:39:17
|
Revision: 7394
http://simias.svn.sourceforge.net/simias/?rev=7394&view=rev
Author: spratima
Date: 2010-06-15 13:39:11 +0000 (Tue, 15 Jun 2010)
Log Message:
-----------
fix for Bug 608218 - Copy right information in Admin page has to be updated
Modified Paths:
--------------
trunk/src/admin/iFolderAdmin.resx
Modified: trunk/src/admin/iFolderAdmin.resx
===================================================================
--- trunk/src/admin/iFolderAdmin.resx 2010-06-09 13:55:45 UTC (rev 7393)
+++ trunk/src/admin/iFolderAdmin.resx 2010-06-15 13:39:11 UTC (rev 7394)
@@ -589,7 +589,7 @@
<value>Unable to connect to the iFolder server. Revoke sharing once the server is reachable.</value>
</data>
<data name="LOGINCOPYRIGHT">
- <value>&copy; Copyright 2009 Novell, Inc. All rights reserved.</value>
+ <value>&copy; Copyright 2010 Novell, Inc. All rights reserved.</value>
</data>
<data name="LOGINERROR">
<value>Error:</value>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <he...@us...> - 2010-06-09 11:20:34
|
Revision: 7391
http://simias.svn.sourceforge.net/simias/?rev=7391&view=rev
Author: hegdegg
Date: 2010-06-09 11:20:23 +0000 (Wed, 09 Jun 2010)
Log Message:
-----------
Fix for updating the new master information for 2nd server in
multiserver setup.
Modified Paths:
--------------
trunk/src/admin/ServerDetails.aspx.cs
trunk/src/admin/iFolderAdmin.resx
trunk/src/core/CollectionStore/Collection.cs
trunk/src/webservices/iFolderServer.cs
Modified: trunk/src/admin/ServerDetails.aspx.cs
===================================================================
--- trunk/src/admin/ServerDetails.aspx.cs 2010-06-08 14:00:58 UTC (rev 7390)
+++ trunk/src/admin/ServerDetails.aspx.cs 2010-06-09 11:20:23 UTC (rev 7391)
@@ -516,6 +516,8 @@
{
log.Info("This server needs a repair");
remoteweb.RepairChangeMasterUpdates();
+ server = web.GetServer( ServerID );
+ Type.Text = GetString( server.IsMaster ? "MASTER" : "SLAVE" );
}
}
catch (WebException ex)
@@ -586,16 +588,17 @@
remoteweb.Url = turl.ToString();
redirectUrl = remoteweb.Url;
remoteweb.Url = remoteweb.Url + "/iFolderAdmin.asmx";
-// TopNav.ShowInfo (String.Format("WebException-noproto {0} ", remoteweb.Url));
+ log.Info (String.Format("Connecting to {0} ", remoteweb.Url));
try
{
remoteweb.GetAuthenticatedUser();
}
- //catch (WebException ex1)
- catch
+ catch (Exception ex1)
+ //catch
{
// TopNav.ShowInfo (String.Format("WebException-noproto {0} {1}", ex1.Status, remoteweb.Url));
+ log.Info (String.Format("Exception-noproto {0} {1}", ex1.StackTrace, ex1.Message));
remoteweb = web;
Status.Text = String.Format("<font color=red><b>" + GetString("OFFLINE") + "</b></font>");
serverStatus = false;
@@ -649,6 +652,7 @@
MasterIP.Visible = MasterIP.Enabled = true;
MasterIP.Text = ldapInfo.MasterURL;
MasterUri.Text = GetString( "MASTERURI" );
+ ChangeMasterButton.Visible = true;
ChangeMasterButton.Enabled = true;
}
else
@@ -656,6 +660,7 @@
MasterIP.Enabled = false;
MasterIP.Text = "";
MasterUri.Text = "";
+ ChangeMasterButton.Visible = false;
ChangeMasterButton.Enabled = false;
}
@@ -1284,6 +1289,7 @@
remoteWebServer.PreAuthenticate = true;
remoteWebServer.Credentials = web.Credentials;
remoteWebServer.Url = connectUrl+ "/iFolderAdmin.asmx";
+ log.Info("Connecting to : {0}", remoteWebServer.Url);
while ( count <= retryCount)
{
@@ -1320,6 +1326,7 @@
remoteWebServer.PreAuthenticate = true;
remoteWebServer.Credentials = web.Credentials;
remoteWebServer.Url = connectUrl + "/iFolderAdmin.asmx";
+ log.Info("Connecting to : {0}", remoteWebServer.Url);
while ( count <= retryCount)
{
@@ -1346,8 +1353,8 @@
/// <summary>
/// Wrapper funtion to call SetAsMasterNodeAttribute
/// </summary>
+ /// <param name="connectUrl">Url of the server</param>
/// <param name="serverID">ID of the server</param>
- /// <param name="ServerURL">Url of the server</param>
/// <param name="nodeValue">true/false for master/slave</param>
protected bool SetMasterNode(string connectUrl, string serverID, bool nodeValue)
{
@@ -1358,6 +1365,7 @@
remoteWebServer.PreAuthenticate = true;
remoteWebServer.Credentials = web.Credentials;
remoteWebServer.Url = connectUrl + "/iFolderAdmin.asmx";
+ log.Info("Connecting to : {0}", remoteWebServer.Url);
while ( count <= retryCount)
{
@@ -1409,9 +1417,9 @@
if (retval != checkVal)
{
log.Info("Waiting for master node attrituge to sync accross old and new master server");
- Thread.Sleep(1000);
+ Thread.Sleep(5000);
}
- loop++;
+ loop++; count ++;
}
}
catch(Exception ex)
@@ -1436,6 +1444,7 @@
/// <param name="ServerURL">Url of the server</param>
protected bool SetMasterURL(string connectURL, string serverID, string serverURL)
{
+ log.Info("SetMasterURL");
int count = 0;
bool retval = false;
iFolderAdmin otherSlaveServers = new iFolderAdmin();
@@ -1448,13 +1457,14 @@
{
try
{
+ log.Info("will call setmasterUrls : {0} :{1} ", serverID, serverURL);
retval = otherSlaveServers.SetMasterServerUrl(serverID, serverURL);
break;
}
catch(Exception ex)
{
log.Info("Caught exception while SetMasterURL : {0} : {1}", ex.Message, ex.StackTrace);
- if (ex.Message.IndexOf("InvalidOperation") >= 0)
+ if (ex.Message.IndexOf("InvalidOperation") >= 0 )
{
count ++;
continue;
@@ -1544,6 +1554,7 @@
TopNav.ShowError(GetString("UNABLETOSETASMASTER"));
return;
}
+ log.Info("SetAsMaster Complete. Setting Node attributes");
// Master and Slave updated, now set the Master node attribute for new Master host on both
// current master and new master
if ( SetMasterNode(mServer.PublicUrl, mServer.ID, true))
@@ -1564,12 +1575,13 @@
StringBuilder failedServers = new System.Text.StringBuilder();
foreach(iFolderServer ifs in iFolderServers)
{
- if ( ifs.HostName != newmServer.HostName)
+ log.Info("Calling server : {0}: {1}", ifs.Name, ifs.PublicUrl);
+ if ( ifs.Name != newmServer.Name && ifs.Name != mServer.Name )
{
- if (SetMasterURL(ifs.PublicUrl, ServerID, newServerPublicUrl) != true)
+ if (SetMasterURL(ifs.PublicUrl.ToString(), ServerID, newServerPublicUrl) != true)
{
log.Info("Update master serverurl on {0} failed ", ifs.PublicUrl);
- list.Add(ifs.HostName);
+ list.Add(ifs.Name);
}
}
}
@@ -1580,7 +1592,6 @@
failedServers.Append(list[i].ToString()).Append(" ");
}
log.Info("Unable to set master url on : {0}", failedServers.ToString());
- TopNav.ShowError(GetString("UPDATEMASTERURLONSLAVEFAILED") + failedServers.ToString());
}
else
{
@@ -1590,7 +1601,6 @@
else
{
log.Info(String.Format ("Unable to get new Master ServerID and newServerPublicUrl, retry"));
- TopNav.ShowError(GetString("CHANGEMASTERINFOFAILED"));
}
}
else
@@ -1601,17 +1611,14 @@
finally
{
ChangeMasterButton.Enabled = false;
- /* this is just to get all the changes done on both the
- servers. does nothing other than logging. Will be useful
- for debuggind in case of any error */
- if (mServer != null && newmServer != null)
- web.VerifyChangeMaster(mServer.ID, newmServer.ID);
if (currentMasterUpdateComplete && newMasterUpdateComplete &&
slaveUpdateComplete)
{
- TopNav.ShowInfo (String.Format (GetString ("CHANGEMASTERSUCCESSFUL"), newServerPublicUrl));
+ TopNav.ShowInfo (String.Format (GetString ("CHANGEMASTERSUCCESSFUL"), newmServer.Name));
}
+ else
+ TopNav.ShowInfo (String.Format (GetString ("CHANGEMASTERWITHWARNING"), newmServer.Name));
}
return;
}
Modified: trunk/src/admin/iFolderAdmin.resx
===================================================================
--- trunk/src/admin/iFolderAdmin.resx 2010-06-08 14:00:58 UTC (rev 7390)
+++ trunk/src/admin/iFolderAdmin.resx 2010-06-09 11:20:23 UTC (rev 7391)
@@ -1300,8 +1300,11 @@
<value>Unable to get Server ID and New Server Public URL.</value>
</data>
<data name="CHANGEMASTERSUCCESSFUL">
- <value>Successfully changed the Master and Slave. New Master is {0}. Restart all servers for the changes to take effect.</value>
+ <value>Upgraded {0} as master server. Restart all servers for the changes to take effect.</value>
</data>
+ <data name="CHANGEMASTERWITHWARNING">
+ <value>Upgraded {0} as master server with exceptions. Refer Simias.log for more info. Restart all servers for the changes to take effect.</value>
+ </data>
<data name="CHANGEMASTERFAILED">
<value>Unable to change the Master and Slave. Check log files for more information.</value>
</data>
Modified: trunk/src/core/CollectionStore/Collection.cs
===================================================================
--- trunk/src/core/CollectionStore/Collection.cs 2010-06-08 14:00:58 UTC (rev 7390)
+++ trunk/src/core/CollectionStore/Collection.cs 2010-06-09 11:20:23 UTC (rev 7391)
@@ -820,7 +820,7 @@
{
if (value != null && value.Length != 0)
{
- Property p = new Property( PropertyTags.HostUri, value );
+ Property p = new Property( PropertyTags.HostUri, new Uri(value) );
p.LocalProperty = true;
properties.ModifyNodeProperty( p );
}
Modified: trunk/src/webservices/iFolderServer.cs
===================================================================
--- trunk/src/webservices/iFolderServer.cs 2010-06-08 14:00:58 UTC (rev 7390)
+++ trunk/src/webservices/iFolderServer.cs 2010-06-09 11:20:23 UTC (rev 7391)
@@ -87,7 +87,6 @@
[Serializable]
public class iFolderServer
{
- internal static string catalogID = "a93266fd-55de-4590-b1c7-428f2fed815d"; //TODO: refer.
/// <summary>
/// iFolder Log Instance
/// </summary>
@@ -252,7 +251,6 @@
string host = ldapSettings.Host;
bool SSL = ldapSettings.SSL;
string proxydn = ldapSettings.ProxyDN;
- string proxypwd = ldapSettings.ProxyPassword;
ProxyUser pu = new Simias.LdapProvider.ProxyUser();
string pwd2 = pu.Password;
string proxyfilename = "ldapdetails";
@@ -763,7 +761,6 @@
string ServerSection="Server";
string PublicAddressKey = "PublicAddress";
string PrivateAddressKey = "PrivateAddress";
- string MasterAddressKey = "MasterAddress";
if (!privateUrl.ToLower().StartsWith(Uri.UriSchemeHttp))
{
privateUrl = (new UriBuilder(Uri.UriSchemeHttp, privateUrl)).ToString();
@@ -797,28 +794,25 @@
{
// going to update the config file
// Load the configuration file into an xml document.
- XmlDocument document = new XmlDocument();
- document.Load(SimiasConfigFilePath );
+ XmlDocument document = new XmlDocument();
+ document.Load(SimiasConfigFilePath );
-
SetConfigValue( document, ServerSection, PublicAddressKey, publicUrl );
- SetConfigValue( document, ServerSection, PrivateAddressKey, privateUrl );
+ SetConfigValue( document, ServerSection, PrivateAddressKey, privateUrl );
if(MasterUrl != "")
- {
- /// it means its a slave server, so set the masters IP into config file
- UpdateStatus = SetConfigValueWithSSL( document, ServerSection, MasterAddressKey, MasterUrl );
- if(UpdateStatus == false)
- return false;
+ {
+ //verify and update simias too.
+ UpdateSimiasAndConfig(MasterUrl);
if (MasterUrl != null)
{
UpdateStatus = UpdateMasterURL(MasterUrl);
if(UpdateStatus == false)
return false;
}
- }
+ }
// Commit the config file changes.
- CommitConfiguration( document , SimiasConfigFilePath);
+ CommitConfiguration( document , SimiasConfigFilePath);
UpdateStatus = true;
}
catch(Exception ex)
@@ -840,7 +834,7 @@
bool needsRepair= false;
Store store = Store.GetStore();
Domain domain = store.GetDomain(store.DefaultDomain);
- Collection cat = store.GetCollectionByID(catalogID); //Simias.Server.Catalog.catalogID);
+ Collection cat = store.GetCollectionByID(Simias.Server.Catalog.catalogID);
HostNode localhostNode = HostNode.GetLocalHost();
@@ -890,12 +884,28 @@
}
catch (Exception ex)
{
- log.Info("Exception throw while RepairChangeMasterUpdate()");
+ log.Error("Exception throw while RepairChangeMasterUpdate() : {0}", ex.StackTrace);
status = false;
}
return status;
}
+ public static bool UpdateSimiasAndConfig(string MasterUrl)
+ {
+ bool status = false;
+ Store store = Store.GetStore();
+ Domain domain = store.GetDomain(store.DefaultDomain);
+ if ( domain.HostUri == MasterUrl)
+ {
+ status = SetMasterServerUrl(domain.HostID, domain.HostUri);
+ }
+ else
+ {
+ log.Error("New master url does not match with iFolder domain master url");
+ }
+ return status;
+ }
+
/// <summary>
/// This method is used to set the Master server url into simias.config file.
/// </summary>
@@ -905,25 +915,26 @@
bool UpdateStatus = false;
string ServerSection="Server";
string MasterAddressKey = "MasterAddress";
-
- if (MasterUrl != null && !MasterUrl.ToLower().StartsWith(Uri.UriSchemeHttps))
- {
- MasterUrl = (new UriBuilder(Uri.UriSchemeHttps, MasterUrl)).ToString();
- }
try
{
Store store = Store.GetStore();
Domain domain = store.GetDomain(store.DefaultDomain);
- HostNode localhostNode = HostNode.GetLocalHost();
domain.HostID = HostID;
- domain.HostUri = MasterUrl;
+ domain.HostUri = MasterUrl;
domain.Commit();
+ Collection cat = store.GetCollectionByID(Simias.Server.Catalog.catalogID);
+ cat.HostID = HostID;
+ cat.Commit(cat);
string SimiasConfigFilePath = Path.Combine ( Store.StorePath, "Simias.config");
if ( File.Exists( Path.Combine( Store.StorePath, Simias.Configuration.DefaultConfigFileName ) ) == true )
{
SimiasConfigFilePath = Path.Combine( Store.StorePath, Simias.Configuration.DefaultConfigFileName );
}
+ else
+ {
+ log.Info("Simias.config file does not exist");
+ }
XmlDocument document = new XmlDocument();
document.Load(SimiasConfigFilePath );
UpdateStatus = SetConfigValueWithSSL( document, ServerSection, MasterAddressKey, MasterUrl );
@@ -955,7 +966,7 @@
{
Store store = Store.GetStore();
Domain domain = store.GetDomain(store.DefaultDomain);
- Collection cat = store.GetCollectionByID(catalogID); //Simias.Server.Catalog.catalogID);
+ Collection cat = store.GetCollectionByID(Simias.Server.Catalog.catalogID);
HostNode localhostNode = HostNode.GetLocalHost();
@@ -979,6 +990,7 @@
domain.Role = Simias.Sync.SyncRoles.Slave;
log.Info("Setting SyncRole on the Domain to Slave ({0})", domain.Role);
+ domain.SystemSyncStatus = (domain.SystemSyncStatus | (ulong)Simias.Sync.CollectionSyncClient.StateMap.CatalogSyncOnce) ;
// Updating Catalog
cat.Role = Simias.Sync.SyncRoles.Slave;
log.Info("Setting SyncRole on the catalog");
@@ -1035,7 +1047,7 @@
{
Store store = Store.GetStore();
Domain domain = store.GetDomain(store.DefaultDomain);
- Collection cat = store.GetCollectionByID(catalogID); //Simias.Server.Catalog.catalogID);
+ Collection cat = store.GetCollectionByID(Simias.Server.Catalog.catalogID);
HostNode localhostNode = HostNode.GetHostByID(domain.ID, HostID);
@@ -1162,7 +1174,7 @@
{
Store store = Store.GetStore();
Domain domain = store.GetDomain(store.DefaultDomain);
- Collection cat = store.GetCollectionByID(catalogID); //Simias.Server.Catalog.catalogID);
+ Collection cat = store.GetCollectionByID(Simias.Server.Catalog.catalogID);
HostNode currentMasterNode = HostNode.GetHostByID(domain.ID, currentMasterID);
HostNode newMasterNode = HostNode.GetHostByID(domain.ID, newMasterID);
@@ -1185,9 +1197,8 @@
log.Info("IsMasterHost : {0}", newMasterNode.IsMasterHost);
log.Info("ChangeMasterState : {0}", newMasterNode.ChangeMasterState);
}
- catch (Exception ex)
+ catch
{
- log.Error("Uable to verify change master");
retval = false;
}
return retval;
@@ -1209,7 +1220,7 @@
masterNode.PrivateUrl = masterUrl;
domain.Commit(masterNode);
}
- catch (Exception ex)
+ catch
{
retVal = false;
}
@@ -1371,7 +1382,7 @@
if (masterAddress.ToLower().StartsWith(Uri.UriSchemeHttps))
{
string machineArch = GetServerArch();
- string webPath = webPath = Path.GetFullPath("../../../../lib/simias/web");
+ string webPath = Path.GetFullPath("../../../../lib/simias/web");
if (machineArch != null)
{
@@ -1379,29 +1390,31 @@
}
// swap policy
+ ICertificatePolicy policy = ServicePointManager.CertificatePolicy;
ServicePointManager.CertificatePolicy = new TrustAllCertificatePolicy();
- HttpWebRequest request = (HttpWebRequest) HttpWebRequest.Create(masterAddress);
+ HttpWebRequest request = (HttpWebRequest) HttpWebRequest.Create(RemoveVirtualPath(masterAddress));
+ log.Debug("Master URL is {0}", RemoveVirtualPath(masterAddress));
try
{
- HttpWebResponse response = (HttpWebResponse)request.GetResponse();
+ request.GetResponse();
}
- catch (Exception ex)
+ catch
{
// ignore
}
// restore policy
+ ServicePointManager.CertificatePolicy = policy;
// service point
ServicePoint sp = request.ServicePoint;
if(sp == null) throw new Exception("sp is null for master "+ masterAddress);
if(sp.Certificate == null) throw new Exception("sp.Certificate is null for master "+masterAddress);
if ((sp != null) && (sp.Certificate != null))
- {
+ {
string path = Path.GetFullPath(Path.Combine(webPath, "web.config"));
string certRawDetail = Convert.ToBase64String(sp.Certificate.GetRawCertData());
- string certDetail = sp.Certificate.ToString(true);
XmlDocument doc = new XmlDocument();
doc.Load(path);
XmlElement cert = (XmlElement)doc.DocumentElement.SelectSingleNode("//configuration/appSettings/add[@key='SimiasCert']");
@@ -1622,9 +1635,7 @@
SearchPrpList.Add(BaseSchema.ObjectType, NodeTypes.MemberType, SearchOp.Equal);
SearchPrpList.Add(PropertyTags.Types, HostNode.HostNodeType, SearchOp.Equal);
ICSList searchList = domain.Search(SearchPrpList);
- DateTime t1= DateTime.Now;
SearchState searchState = new SearchState( domain.ID, searchList.GetEnumerator() as ICSEnumerator, searchList.Count );
- int total = searchList.Count;
int i = 0;
if(index > 0)
searchState.Enumerator.SetCursor(Simias.Storage.Provider.IndexOrigin.SET, index);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <he...@us...> - 2010-06-08 14:01:09
|
Revision: 7390
http://simias.svn.sourceforge.net/simias/?rev=7390&view=rev
Author: hegdegg
Date: 2010-06-08 14:00:58 +0000 (Tue, 08 Jun 2010)
Log Message:
-----------
Fix for updating the new master information for 2nd server in 3 server
setup.
Modified Paths:
--------------
branches/iFolder_3.8.1_beta1/src/admin/ServerDetails.aspx.cs
branches/iFolder_3.8.1_beta1/src/admin/iFolderAdmin.resx
branches/iFolder_3.8.1_beta1/src/core/CollectionStore/Collection.cs
branches/iFolder_3.8.1_beta1/src/webservices/iFolderServer.cs
Modified: branches/iFolder_3.8.1_beta1/src/admin/ServerDetails.aspx.cs
===================================================================
--- branches/iFolder_3.8.1_beta1/src/admin/ServerDetails.aspx.cs 2010-06-08 04:23:37 UTC (rev 7389)
+++ branches/iFolder_3.8.1_beta1/src/admin/ServerDetails.aspx.cs 2010-06-08 14:00:58 UTC (rev 7390)
@@ -516,6 +516,8 @@
{
log.Info("This server needs a repair");
remoteweb.RepairChangeMasterUpdates();
+ server = web.GetServer( ServerID );
+ Type.Text = GetString( server.IsMaster ? "MASTER" : "SLAVE" );
}
}
catch (WebException ex)
@@ -586,7 +588,7 @@
remoteweb.Url = turl.ToString();
redirectUrl = remoteweb.Url;
remoteweb.Url = remoteweb.Url + "/iFolderAdmin.asmx";
-// TopNav.ShowInfo (String.Format("WebException-noproto {0} ", remoteweb.Url));
+ log.Info (String.Format("Connecting to {0} ", remoteweb.Url));
try
{
@@ -649,6 +651,7 @@
MasterIP.Visible = MasterIP.Enabled = true;
MasterIP.Text = ldapInfo.MasterURL;
MasterUri.Text = GetString( "MASTERURI" );
+ ChangeMasterButton.Visible = true;
ChangeMasterButton.Enabled = true;
}
else
@@ -656,6 +659,7 @@
MasterIP.Enabled = false;
MasterIP.Text = "";
MasterUri.Text = "";
+ ChangeMasterButton.Visible = false;
ChangeMasterButton.Enabled = false;
}
@@ -1284,6 +1288,7 @@
remoteWebServer.PreAuthenticate = true;
remoteWebServer.Credentials = web.Credentials;
remoteWebServer.Url = connectUrl+ "/iFolderAdmin.asmx";
+ log.Info("Connecting to : {0}", remoteWebServer.Url);
while ( count <= retryCount)
{
@@ -1320,6 +1325,7 @@
remoteWebServer.PreAuthenticate = true;
remoteWebServer.Credentials = web.Credentials;
remoteWebServer.Url = connectUrl + "/iFolderAdmin.asmx";
+ log.Info("Connecting to : {0}", remoteWebServer.Url);
while ( count <= retryCount)
{
@@ -1346,8 +1352,8 @@
/// <summary>
/// Wrapper funtion to call SetAsMasterNodeAttribute
/// </summary>
+ /// <param name="connectUrl">Url of the server</param>
/// <param name="serverID">ID of the server</param>
- /// <param name="ServerURL">Url of the server</param>
/// <param name="nodeValue">true/false for master/slave</param>
protected bool SetMasterNode(string connectUrl, string serverID, bool nodeValue)
{
@@ -1358,6 +1364,7 @@
remoteWebServer.PreAuthenticate = true;
remoteWebServer.Credentials = web.Credentials;
remoteWebServer.Url = connectUrl + "/iFolderAdmin.asmx";
+ log.Info("Connecting to : {0}", remoteWebServer.Url);
while ( count <= retryCount)
{
@@ -1409,9 +1416,9 @@
if (retval != checkVal)
{
log.Info("Waiting for master node attrituge to sync accross old and new master server");
- Thread.Sleep(1000);
+ Thread.Sleep(5000);
}
- loop++;
+ loop++; count ++;
}
}
catch(Exception ex)
@@ -1436,6 +1443,7 @@
/// <param name="ServerURL">Url of the server</param>
protected bool SetMasterURL(string connectURL, string serverID, string serverURL)
{
+ log.Info("SetMasterURL");
int count = 0;
bool retval = false;
iFolderAdmin otherSlaveServers = new iFolderAdmin();
@@ -1448,6 +1456,7 @@
{
try
{
+ log.Info("will call setmasterUrls : {0} :{1} ", serverID, serverURL);
retval = otherSlaveServers.SetMasterServerUrl(serverID, serverURL);
break;
}
@@ -1544,6 +1553,7 @@
TopNav.ShowError(GetString("UNABLETOSETASMASTER"));
return;
}
+ log.Info("SetAsMaster Complete. Setting Node attributes");
// Master and Slave updated, now set the Master node attribute for new Master host on both
// current master and new master
if ( SetMasterNode(mServer.PublicUrl, mServer.ID, true))
@@ -1564,12 +1574,13 @@
StringBuilder failedServers = new System.Text.StringBuilder();
foreach(iFolderServer ifs in iFolderServers)
{
- if ( ifs.HostName != newmServer.HostName)
+ log.Info("Calling server : {0}: {1}", ifs.Name, ifs.PublicUrl);
+ if ( ifs.Name != newmServer.Name && ifs.Name != mServer.Name )
{
- if (SetMasterURL(ifs.PublicUrl, ServerID, newServerPublicUrl) != true)
+ if (SetMasterURL(ifs.PublicUrl.ToString(), ServerID, newServerPublicUrl) != true)
{
log.Info("Update master serverurl on {0} failed ", ifs.PublicUrl);
- list.Add(ifs.HostName);
+ list.Add(ifs.Name);
}
}
}
@@ -1580,7 +1591,6 @@
failedServers.Append(list[i].ToString()).Append(" ");
}
log.Info("Unable to set master url on : {0}", failedServers.ToString());
- TopNav.ShowError(GetString("UPDATEMASTERURLONSLAVEFAILED") + failedServers.ToString());
}
else
{
@@ -1590,7 +1600,6 @@
else
{
log.Info(String.Format ("Unable to get new Master ServerID and newServerPublicUrl, retry"));
- TopNav.ShowError(GetString("CHANGEMASTERINFOFAILED"));
}
}
else
@@ -1601,17 +1610,14 @@
finally
{
ChangeMasterButton.Enabled = false;
- /* this is just to get all the changes done on both the
- servers. does nothing other than logging. Will be useful
- for debuggind in case of any error */
- if (mServer != null && newmServer != null)
- web.VerifyChangeMaster(mServer.ID, newmServer.ID);
if (currentMasterUpdateComplete && newMasterUpdateComplete &&
slaveUpdateComplete)
{
- TopNav.ShowInfo (String.Format (GetString ("CHANGEMASTERSUCCESSFUL"), newServerPublicUrl));
+ TopNav.ShowInfo (String.Format (GetString ("CHANGEMASTERSUCCESSFUL"), newmServer.Name));
}
+ else
+ TopNav.ShowInfo (String.Format (GetString ("CHANGEMASTERWITHWARNING"), newmServer.Name));
}
return;
}
Modified: branches/iFolder_3.8.1_beta1/src/admin/iFolderAdmin.resx
===================================================================
--- branches/iFolder_3.8.1_beta1/src/admin/iFolderAdmin.resx 2010-06-08 04:23:37 UTC (rev 7389)
+++ branches/iFolder_3.8.1_beta1/src/admin/iFolderAdmin.resx 2010-06-08 14:00:58 UTC (rev 7390)
@@ -1300,8 +1300,11 @@
<value>Unable to get Server ID and New Server Public URL.</value>
</data>
<data name="CHANGEMASTERSUCCESSFUL">
- <value>Successfully changed the Master and Slave. New Master is {0}. Restart all servers for the changes to take effect.</value>
+ <value>Upgraded {0} as master server. Restart all servers for the changes to take effect.</value>
</data>
+ <data name="CHANGEMASTERWITHWARNING">
+ <value>Upgraded {0} as master server with exceptions. Refer Simias.log for more info. Restart all servers for the changes to take effect.</value>
+ </data>
<data name="CHANGEMASTERFAILED">
<value>Unable to change the Master and Slave. Check log files for more information.</value>
</data>
Modified: branches/iFolder_3.8.1_beta1/src/core/CollectionStore/Collection.cs
===================================================================
--- branches/iFolder_3.8.1_beta1/src/core/CollectionStore/Collection.cs 2010-06-08 04:23:37 UTC (rev 7389)
+++ branches/iFolder_3.8.1_beta1/src/core/CollectionStore/Collection.cs 2010-06-08 14:00:58 UTC (rev 7390)
@@ -820,7 +820,7 @@
{
if (value != null && value.Length != 0)
{
- Property p = new Property( PropertyTags.HostUri, value );
+ Property p = new Property( PropertyTags.HostUri, new Uri(value) );
p.LocalProperty = true;
properties.ModifyNodeProperty( p );
}
Modified: branches/iFolder_3.8.1_beta1/src/webservices/iFolderServer.cs
===================================================================
--- branches/iFolder_3.8.1_beta1/src/webservices/iFolderServer.cs 2010-06-08 04:23:37 UTC (rev 7389)
+++ branches/iFolder_3.8.1_beta1/src/webservices/iFolderServer.cs 2010-06-08 14:00:58 UTC (rev 7390)
@@ -629,11 +629,9 @@
SetConfigValue( document, ServerSection, PublicAddressKey, publicUrl );
SetConfigValue( document, ServerSection, PrivateAddressKey, privateUrl );
if(MasterUrl != "")
- {
- /// it means its a slave server, so set the masters IP into config file
- UpdateStatus = SetConfigValueWithSSL( document, ServerSection, MasterAddressKey, MasterUrl );
- if(UpdateStatus == false)
- return false;
+ {
+ //verify and update simias too.
+ UpdateSimiasAndConfig(MasterUrl);
if (MasterUrl != null)
{
UpdateStatus = UpdateMasterURL(MasterUrl);
@@ -721,6 +719,23 @@
return status;
}
+ public static bool UpdateSimiasAndConfig(string MasterUrl)
+ {
+ bool status = false;
+ Store store = Store.GetStore();
+ Domain domain = store.GetDomain(store.DefaultDomain);
+ HostNode localhostNode = HostNode.GetLocalHost();
+ if ( domain.HostUri == MasterUrl)
+ {
+ status = SetMasterServerUrl(domain.HostID, domain.HostUri);
+ }
+ else
+ {
+ log.Error("New master url does not match with iFolder domain master url");
+ }
+ return status;
+ }
+
/// <summary>
/// This method is used to set the Master server url into simias.config file.
/// </summary>
@@ -731,24 +746,26 @@
string ServerSection="Server";
string MasterAddressKey = "MasterAddress";
- if (MasterUrl != null && !MasterUrl.ToLower().StartsWith(Uri.UriSchemeHttps))
- {
- MasterUrl = (new UriBuilder(Uri.UriSchemeHttps, MasterUrl)).ToString();
- }
try
{
Store store = Store.GetStore();
Domain domain = store.GetDomain(store.DefaultDomain);
- HostNode localhostNode = HostNode.GetLocalHost();
domain.HostID = HostID;
- domain.HostUri = MasterUrl;
+ domain.HostUri = MasterUrl;
domain.Commit();
+ Collection cat = store.GetCollectionByID(catalogID); //Simias.Server.Catalog.catalogID);
+ cat.HostID = HostID;
+ cat.Commit(cat);
string SimiasConfigFilePath = Path.Combine ( Store.StorePath, "Simias.config");
if ( File.Exists( Path.Combine( Store.StorePath, Simias.Configuration.DefaultConfigFileName ) ) == true )
{
SimiasConfigFilePath = Path.Combine( Store.StorePath, Simias.Configuration.DefaultConfigFileName );
}
+ else
+ {
+ log.Info("Simias.config file does not exist");
+ }
XmlDocument document = new XmlDocument();
document.Load(SimiasConfigFilePath );
UpdateStatus = SetConfigValueWithSSL( document, ServerSection, MasterAddressKey, MasterUrl );
@@ -804,6 +821,7 @@
domain.Role = Simias.Sync.SyncRoles.Slave;
log.Info("Setting SyncRole on the Domain to Slave ({0})", domain.Role);
+ domain.SystemSyncStatus = (domain.SystemSyncStatus | (ulong)Simias.Sync.CollectionSyncClient.StateMap.CatalogSyncOnce) ;
// Updating Catalog
cat.Role = Simias.Sync.SyncRoles.Slave;
log.Info("Setting SyncRole on the catalog");
@@ -1204,12 +1222,13 @@
}
// swap policy
+ ICertificatePolicy policy = ServicePointManager.CertificatePolicy;
ServicePointManager.CertificatePolicy = new TrustAllCertificatePolicy();
- HttpWebRequest request = (HttpWebRequest) HttpWebRequest.Create(masterAddress);
+ HttpWebRequest request = (HttpWebRequest) HttpWebRequest.Create(RemoveVirtualPath(masterAddress));
try
{
- HttpWebResponse response = (HttpWebResponse)request.GetResponse();
+ request.GetResponse();
}
catch (Exception ex)
{
@@ -1217,6 +1236,7 @@
}
// restore policy
+ ServicePointManager.CertificatePolicy = policy;
// service point
ServicePoint sp = request.ServicePoint;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <js...@us...> - 2010-06-08 04:23:44
|
Revision: 7389
http://simias.svn.sourceforge.net/simias/?rev=7389&view=rev
Author: jshaju
Date: 2010-06-08 04:23:37 +0000 (Tue, 08 Jun 2010)
Log Message:
-----------
ID: bug#610519
Reviewer: eswar
Localization Required: Yes
Documentation Required: Yes
Description: Removed reference to repair server link
Modified Paths:
--------------
trunk/src/admin/help/en/serverdetails.html
Modified: trunk/src/admin/help/en/serverdetails.html
===================================================================
--- trunk/src/admin/help/en/serverdetails.html 2010-06-07 09:16:49 UTC (rev 7388)
+++ trunk/src/admin/help/en/serverdetails.html 2010-06-08 04:23:37 UTC (rev 7389)
@@ -73,9 +73,9 @@
</TD><TD>
<P>The name assigned to the Server.</P>
</TD><TR><TD VALIGN="TOP">
- <P>Type (View Only)</P>
+ <P>Type</P>
</TD><TD>
- <P>The server type (Master or Slave). Click Set as Master to designate this server as a master server. If the server encounters any errors when you designate it as a master, the Repair Server link will be displayed. You can then click Repair Server to rectify the errors.</P>
+ <P>The server type (Master or Slave). Click Set as Master to designate this server as a master server. </P>
</TD><TR><TD VALIGN="TOP">
<P>DNS Name</P>
</TD><TD>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jj...@us...> - 2010-06-07 09:16:55
|
Revision: 7388
http://simias.svn.sourceforge.net/simias/?rev=7388&view=rev
Author: jjohnny
Date: 2010-06-07 09:16:49 +0000 (Mon, 07 Jun 2010)
Log Message:
-----------
ID: Bug #266227
Reviewers: Ravi
Localization Required: No
Documentation Required: No
Description: Display log messages only if the operation is executed.
Modified Paths:
--------------
trunk/src/server/setup/SimiasServerSetup.cs
Modified: trunk/src/server/setup/SimiasServerSetup.cs
===================================================================
--- trunk/src/server/setup/SimiasServerSetup.cs 2010-06-07 06:43:26 UTC (rev 7387)
+++ trunk/src/server/setup/SimiasServerSetup.cs 2010-06-07 09:16:49 UTC (rev 7388)
@@ -2923,10 +2923,10 @@
private void SetupPermissions()
{
// Setup the permissions to the store configuration.
- Console.WriteLine( "Setting up permissions..." );
-
if ( MyEnvironment.Mono && apache.Value )
{
+ Console.WriteLine( "Setting up permissions..." );
+
if ( storePath.TrimEnd( new char[] { '/' } ).EndsWith( "simias" ) )
{
// if ( Execute( "chown", " -R {0}:{1} {2}", apacheUser, apacheGroup, System.IO.Directory.GetParent( storePath ).FullName ) != 0 )
@@ -2943,9 +2943,9 @@
Console.WriteLine( "Unable to set an owner {0} for the store path.{1}", apacheUser.Value, storePath );
}
}
+
+ Console.Write( " Done." );
}
-
- Console.WriteLine( "Done" );
}
/// <summary>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jj...@us...> - 2010-06-07 06:43:33
|
Revision: 7387
http://simias.svn.sourceforge.net/simias/?rev=7387&view=rev
Author: jjohnny
Date: 2010-06-07 06:43:26 +0000 (Mon, 07 Jun 2010)
Log Message:
-----------
ID: Bug #601724
Reviewers: Johnny, Ramesh
Localization Required: No
Documentation Required: No
Description: When file transfer fails, collection.Commit succeeds and leaves a invalid node in database.
Patch handles IOErrors and attempts to restore to olderversion if possible.
Credits : Patch by C Sights <cs...@fa...>
Modified Paths:
--------------
trunk/src/core/Sync/ServerFile.cs
trunk/src/core/Sync/SyncFile.cs
Modified: trunk/src/core/Sync/ServerFile.cs
===================================================================
--- trunk/src/core/Sync/ServerFile.cs 2010-06-02 13:53:05 UTC (rev 7386)
+++ trunk/src/core/Sync/ServerFile.cs 2010-06-07 06:43:26 UTC (rev 7387)
@@ -173,30 +173,21 @@
SyncNodeStatus status = new SyncNodeStatus();
status.nodeID = node.ID;
status.status = SyncStatus.ClientError;
- if (commit)
+
+ try
{
- status.status = SyncStatus.Success;
- try
- {
- collection.Commit(node);
- }
- catch (CollisionException)
- {
- commit = false;
- status.status = SyncStatus.UpdateConflict;
- }
- catch
- {
- commit = false;
- status.status = SyncStatus.ServerFailure;
- }
+ status = base.Close(commit); // modified for new code
}
- base.Close(commit);
- // Not required since it is done in client side
- //if (commit == true)
- //{
- // map.CreateHashMap();
- //}
+ catch (CollisionException)
+ {
+ status.status = SyncStatus.UpdateConflict;
+ }
+ catch (Exception ex)
+ {
+ status.status = SyncStatus.ServerFailure;
+ Log.log.Info("Exception on Close {0}--{1}", ex.Message, ex.StackTrace);
+ }
+
return status;
}
@@ -260,7 +251,7 @@
SyncNodeStatus status = new SyncNodeStatus();
status.nodeID = node.ID;
status.status = SyncStatus.Success;
- base.Close();
+ base.Close(); // OutFile, base class code not modified
return status;
}
Modified: trunk/src/core/Sync/SyncFile.cs
===================================================================
--- trunk/src/core/Sync/SyncFile.cs 2010-06-02 13:53:05 UTC (rev 7386)
+++ trunk/src/core/Sync/SyncFile.cs 2010-06-07 06:43:26 UTC (rev 7387)
@@ -156,7 +156,7 @@
protected void Open(BaseFileNode node, string sessionID)
{
SetupFileNames(node, sessionID);
- Log.log.Debug("Opening File {0}", file);
+ Log.log.Debug("Opening File {0} (OutFile Open)", file);
FileInfo fi = new FileInfo(file);
if (Store.IsEnterpriseServer || fi.Length > (1024 * 100000))
{
@@ -229,7 +229,7 @@
/// </summary>
protected void Close()
{
- Log.log.Debug("Closing File {0}", file);
+ Log.log.Debug("Closing File {0} (OutFile Close())", file);
Close (false);
}
@@ -442,7 +442,7 @@
{
SetupFileNames(node, "");
CheckForNameConflict();
- Log.log.Debug("Opening File {0}", file);
+ Log.log.Debug("Opening File {0} (InFile Open)", file);
// Open the file so that it cannot be modified.
oldNode = collection.GetNodeByID(node.ID) as BaseFileNode;
@@ -629,10 +629,10 @@
/// <summary>
/// Called to close the file and cleanup resources.
/// </summary>
- protected void Close(bool commit)
+ protected SyncNodeStatus Close(bool commit)
{
- Log.log.Debug("Closing File {0}", file);
- Close (false, commit);
+ Log.log.Debug("Closing File {0} (protected InFile Close)", file);
+ return Close (false, commit);
}
/// <summary>
@@ -719,12 +719,17 @@
/// </summary>
/// <param name="InFinalizer"></param>
/// <param name="commit"></param>
- private void Close(bool InFinalizer, bool commit)
+ private SyncNodeStatus Close(bool InFinalizer, bool commit)
{
if (!InFinalizer)
{
GC.SuppressFinalize(this);
}
+
+ SyncNodeStatus status = new SyncNodeStatus();
+ status.nodeID = node.ID;
+ status.status = SyncStatus.ClientError;
+
if (stream != null)
{
stream.Close();
@@ -737,50 +742,114 @@
}
if (commit)
{
- if (File.Exists(file))
- {
- string tmpFile = file + ".~stmp";
+ // backup file for rolling back on failure
+ string tmpFile = "";
+ if (File.Exists(file)){
+ tmpFile = file + ".~stmp";
File.Move(file, tmpFile);
- try
- {
- File.Move(workFile, file);
- File.Delete(tmpFile);
- workFile = null;
- }
- catch
- {
- File.Move(tmpFile, file);
- throw;
- }
+ Log.log.Info("backing up {0}->{1}",file,tmpFile);
}
- else
+
+ // first try to write the file
+ try
{
+ Log.log.Info("trying to move {0}->{1}",workFile,file);
File.Move(workFile, file);
workFile = null;
}
- FileInfo fi = new FileInfo(file);
- fi.LastWriteTime = node.LastWriteTime;
- fi.CreationTime = node.CreationTime;
- if (oldNode != null)
+ catch
{
- // Check if this was a rename.
- // If the old path does not equal the new path
- // Delete the old file.
- string oldPath = oldNode.GetFullPath(collection);
+ Log.log.Info("Couldn't move {0}->{1}", workFile, file);
+ Log.log.Info("Restoring file {0}", file);
+ try {
+ if (File.Exists(file))
+ File.Delete(file); // delete newly transferred file
+ if (File.Exists(tmpFile))
+ File.Move(tmpFile, file); // restore backup file into place
+ }
+ catch (Exception ex)
+ {
+ Log.log.Info("couldn't return to prior state{0}--{1}", ex.Message, ex.StackTrace);
+ };
+ // DELETE HASHMAP ?
+
+ throw; // and don't try to commit
+ }
+ // try to collection.commit()
+ status.status = SyncStatus.Success;
+ try
+ {
+ Log.log.Info("trying to commit collection");
+ collection.Commit(node);
+ }
+ catch (CollisionException ce)
+ {
+ commit = false;
+ status.status = SyncStatus.UpdateConflict;
+ Log.log.Info("Couldn't commit collection: UpdateConflict {0}--{1}", ce.Message, ce.StackTrace);
+ }
+ catch (Exception ex)
+ {
+ commit = false;
+ status.status = SyncStatus.ServerFailure;
+ Log.log.Info("Couldn't commit collection {0}--{1}", ex.Message, ex.StackTrace);
+ }
+ if (!commit) // restore orig file if collection.Commit failed.
+ {
+ try {
+ // delete newly transferred file
+ if (File.Exists(file))
+ File.Delete(file);
+ // restore backup file into place
+ if (File.Exists(tmpFile))
+ File.Move(tmpFile, file);
+ // delete hashmap ?
+ }
+ catch (Exception ex)
+ {
+ Log.log.Info("couldn't return to prior state {0}--{1}", ex.Message, ex.StackTrace);
+ };
+ }
+ else // commit successful, delete the temporary (.~stmp) file.
+ {
try
{
- if (MyEnvironment.Windows)
+ // restore backup file into place
+ if (File.Exists(tmpFile))
+ File.Delete(tmpFile);
+ }
+ catch (Exception ex)
+ {
+ Log.log.Info("problem deleting .~stmp file {0}--{1}", ex.Message, ex.StackTrace);
+ };
+ }
+ if (commit)
+ {
+ FileInfo fi = new FileInfo(file);
+ fi.LastWriteTime = node.LastWriteTime;
+ fi.CreationTime = node.CreationTime;
+ if (oldNode != null)
+ {
+ // Check if this was a rename.
+ // If the old path does not equal the new path
+ // Delete the old file.
+ string oldPath = oldNode.GetFullPath(collection);
+ try
{
- if (string.Compare(oldPath, file, true) != 0)
- File.Delete(oldPath);
+ Log.log.Info("{0} may have been moved to {1}", file, oldPath);
+ if (MyEnvironment.Windows)
+ {
+ if (string.Compare(oldPath, file, true) != 0)
+ File.Delete(oldPath);
+ }
+ else
+ {
+ if (oldPath != file)
+ File.Delete(oldPath);
+ }
}
- else
- {
- if (oldPath != file)
- File.Delete(oldPath);
- }
+ catch {};
}
- catch {};
}
}
@@ -796,6 +865,8 @@
if (partialFile != null)
File.Delete(partialFile);
+
+ return status;
}
#endregion
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sp...@us...> - 2010-06-02 13:53:18
|
Revision: 7386
http://simias.svn.sourceforge.net/simias/?rev=7386&view=rev
Author: spkumar
Date: 2010-06-02 13:53:05 +0000 (Wed, 02 Jun 2010)
Log Message:
-----------
fixed an issue while restoring ifolder policies for non admin users
Modified Paths:
--------------
trunk/src/utils/restore/iFolderServer.cs
Modified: trunk/src/utils/restore/iFolderServer.cs
===================================================================
--- trunk/src/utils/restore/iFolderServer.cs 2010-06-02 13:42:40 UTC (rev 7385)
+++ trunk/src/utils/restore/iFolderServer.cs 2010-06-02 13:53:05 UTC (rev 7386)
@@ -1317,6 +1317,35 @@
return retval;
}
/// <summary>
+ /// Retrieves the User policy from the given User ID.
+ /// </summary>
+ /// <param name="userId"> ID of the User for whom policy needs to be retreived.</param>
+ ///
+ /// <returns>returns UserPolicy object on Success and null on Failures.</returns>
+
+ public UserPolicy GetUserPolicy( string userId )
+ {
+ UserPolicy usrPolicy = null;
+ try {
+ int count = 0;
+ while (count < MaxCount){
+ try {
+ return this.admin.GetUserPolicy(userId, null);
+
+ } catch(Exception ex) {
+ if(ex.Message.IndexOf("InvalidOperation") >= 0 || ex.StackTrace.IndexOf("InvalidOperation") >= 0 ) {
+ count++;
+ continue;
+ }
+ throw ex;
+ }
+ }
+ } catch(Exception ex){
+ MainClass.DebugLog.Write(string.Format("Exception while fetching User policy {0}--{1}", ex.Message, ex.StackTrace));
+ }
+ return usrPolicy;
+ }
+ /// <summary>
/// Retrieves the iFolder policy from the given iFolder ID.
/// </summary>
/// <param name="iFolderID"> ID of the iFolder for which policy needs to be retreived.</param>
@@ -1333,8 +1362,8 @@
{
try
{
- ifdPolicy = this.web.GetiFolderPolicy(ifolderid);
- break;
+ return this.admin.GetiFolderPolicy(ifolderid, null);
+
}
catch(Exception ex)
{
@@ -1371,7 +1400,7 @@
{
try
{
- this.web.SetiFolderPolicy(ifdPolicy);
+ this.admin.SetiFolderPolicy(ifdPolicy);
break;
}
catch(Exception ex)
@@ -1723,13 +1752,13 @@
if (MainClass.useSameAdminName == true)
{
- newAdminPassword = ForPasswordString(string.Format("| Password for user( {0} ):",MainClass.newAdminName),null);
+ newAdminPassword = ForPasswordString(string.Format("| Password for iFolder server admin (user={0}):",MainClass.newAdminName),null);
oldAdminPassword = newAdminPassword;
}
else
{
- oldAdminPassword = ForPasswordString(string.Format("| Password for user( {0} ):",MainClass.oldAdminName),null);
- newAdminPassword = ForPasswordString(string.Format("\n| Password for user( {0} ):",MainClass.newAdminName),null);
+ oldAdminPassword = ForPasswordString(string.Format("| Password for backup iFolder server admin (user={0}):",MainClass.oldAdminName),null);
+ newAdminPassword = ForPasswordString(string.Format("\n| Password for current iFolder server admin (user={0}):",MainClass.newAdminName),null);
}
}
@@ -2466,10 +2495,10 @@
}
//This check needs to be done unconditionally. Policy violation can happen
- // during a partial or a full restore.
- checkiFolderPolicyStatus(iFolderID, NewServer);
+ // during a partial or a full restore.
+ CheckiFolderPolicyStatus(iFolderID, NewServer);
+ CheckUserPolicyStatus(userName,NewServer);
-
}
return retval;
}
@@ -2869,6 +2898,30 @@
ifdPolicy.SyncInterval, ifdPolicy.SharingStatus, ifdPolicy.FileSizeLimit, includeFilter.ToString(), excludeFilter.ToString()));
}
+ /// <summary>
+ /// Checks the Userr policy voilations after the data is restored.
+ /// </summary>
+ /// <param name="UserID"> User ID.</param>
+ /// <param name="oldserver">iFolderServer object where the iFolder exists..</param>
+ ///
+ /// <returns>void.</returns>
+
+ public static void CheckUserPolicyStatus(string userName, iFolderServer ifServer){
+ UserPolicy usrPolicy = null;
+ String userID = ifServer.GetUserIDFromName(userName);
+ if( userID != null) {
+ Console.WriteLine("| Checking user policies post data restore. |");
+ usrPolicy = ifServer.GetUserPolicy(userID);
+ if( (usrPolicy != null) && !usrPolicy.LoginEnabled) {
+ Console.WriteLine("| Warning: Data is restored into a iFolder owned by disabled User. |");
+ Console.WriteLine("| User - {0} needs to be enabled to access the data. |",userName);
+ }
+ } else {
+ Console.WriteLine("| Warning: User - {0} does not exist on current iFolder server. |",userName);
+ }
+
+
+ }
/// <summary>
/// Checks the iFolder policy voilations after the data is restored.
/// </summary>
@@ -2877,7 +2930,7 @@
///
/// <returns>void.</returns>
- public static void checkiFolderPolicyStatus(string iFolderID, iFolderServer ifServer)
+ public static void CheckiFolderPolicyStatus(string iFolderID, iFolderServer ifServer)
{
iFolderPolicy currentPolicy = null;
@@ -2888,7 +2941,8 @@
return;
}
- if(( currentPolicy.SpaceUsed > currentPolicy.SpaceLimitEffective )
+ if( currentPolicy.SpaceLimitEffective != -1)//-1 means Policies are not set
+ if( ( currentPolicy.SpaceUsed > currentPolicy.SpaceLimitEffective )
|| (currentPolicy.SpaceAvailable == 0))
{
Console.WriteLine("| |");
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sp...@us...> - 2010-06-02 13:42:47
|
Revision: 7385
http://simias.svn.sourceforge.net/simias/?rev=7385&view=rev
Author: spkumar
Date: 2010-06-02 13:42:40 +0000 (Wed, 02 Jun 2010)
Log Message:
-----------
fixed an issue while restoring iFolder policies for non admin users
Modified Paths:
--------------
branches/iFolder_3.8.1_beta1/src/utils/restore/iFolderServer.cs
Modified: branches/iFolder_3.8.1_beta1/src/utils/restore/iFolderServer.cs
===================================================================
--- branches/iFolder_3.8.1_beta1/src/utils/restore/iFolderServer.cs 2010-06-01 09:29:10 UTC (rev 7384)
+++ branches/iFolder_3.8.1_beta1/src/utils/restore/iFolderServer.cs 2010-06-02 13:42:40 UTC (rev 7385)
@@ -1317,6 +1317,35 @@
return retval;
}
/// <summary>
+ /// Retrieves the User policy from the given User ID.
+ /// </summary>
+ /// <param name="userId"> ID of the User for whom policy needs to be retreived.</param>
+ ///
+ /// <returns>returns UserPolicy object on Success and null on Failures.</returns>
+
+ public UserPolicy GetUserPolicy( string userId )
+ {
+ UserPolicy usrPolicy = null;
+ try {
+ int count = 0;
+ while (count < MaxCount){
+ try {
+ return this.admin.GetUserPolicy(userId, null);
+
+ } catch(Exception ex) {
+ if(ex.Message.IndexOf("InvalidOperation") >= 0 || ex.StackTrace.IndexOf("InvalidOperation") >= 0 ) {
+ count++;
+ continue;
+ }
+ throw ex;
+ }
+ }
+ } catch(Exception ex){
+ MainClass.DebugLog.Write(string.Format("Exception while fetching User policy {0}--{1}", ex.Message, ex.StackTrace));
+ }
+ return usrPolicy;
+ }
+ /// <summary>
/// Retrieves the iFolder policy from the given iFolder ID.
/// </summary>
/// <param name="iFolderID"> ID of the iFolder for which policy needs to be retreived.</param>
@@ -1333,8 +1362,8 @@
{
try
{
- ifdPolicy = this.web.GetiFolderPolicy(ifolderid);
- break;
+ return this.admin.GetiFolderPolicy(ifolderid, null);
+
}
catch(Exception ex)
{
@@ -1371,7 +1400,7 @@
{
try
{
- this.web.SetiFolderPolicy(ifdPolicy);
+ this.admin.SetiFolderPolicy(ifdPolicy);
break;
}
catch(Exception ex)
@@ -1723,13 +1752,13 @@
if (MainClass.useSameAdminName == true)
{
- newAdminPassword = ForPasswordString(string.Format("| Password for user( {0} ):",MainClass.newAdminName),null);
+ newAdminPassword = ForPasswordString(string.Format("| Password for iFolder server admin (user={0}):",MainClass.newAdminName),null);
oldAdminPassword = newAdminPassword;
}
else
{
- oldAdminPassword = ForPasswordString(string.Format("| Password for user( {0} ):",MainClass.oldAdminName),null);
- newAdminPassword = ForPasswordString(string.Format("\n| Password for user( {0} ):",MainClass.newAdminName),null);
+ oldAdminPassword = ForPasswordString(string.Format("| Password for backup iFolder server admin (user={0}):",MainClass.oldAdminName),null);
+ newAdminPassword = ForPasswordString(string.Format("\n| Password for current iFolder server admin (user={0}):",MainClass.newAdminName),null);
}
}
@@ -2466,10 +2495,10 @@
}
//This check needs to be done unconditionally. Policy violation can happen
- // during a partial or a full restore.
- checkiFolderPolicyStatus(iFolderID, NewServer);
+ // during a partial or a full restore.
+ CheckiFolderPolicyStatus(iFolderID, NewServer);
+ CheckUserPolicyStatus(userName,NewServer);
-
}
return retval;
}
@@ -2869,6 +2898,30 @@
ifdPolicy.SyncInterval, ifdPolicy.SharingStatus, ifdPolicy.FileSizeLimit, includeFilter.ToString(), excludeFilter.ToString()));
}
+ /// <summary>
+ /// Checks the Userr policy voilations after the data is restored.
+ /// </summary>
+ /// <param name="UserID"> User ID.</param>
+ /// <param name="oldserver">iFolderServer object where the iFolder exists..</param>
+ ///
+ /// <returns>void.</returns>
+
+ public static void CheckUserPolicyStatus(string userName, iFolderServer ifServer){
+ UserPolicy usrPolicy = null;
+ String userID = ifServer.GetUserIDFromName(userName);
+ if( userID != null) {
+ Console.WriteLine("| Checking user policies post data restore. |");
+ usrPolicy = ifServer.GetUserPolicy(userID);
+ if( (usrPolicy != null) && !usrPolicy.LoginEnabled) {
+ Console.WriteLine("| Warning: Data is restored into a iFolder owned by disabled User. |");
+ Console.WriteLine("| User - {0} needs to be enabled to access the data. |",userName);
+ }
+ } else {
+ Console.WriteLine("| Warning: User - {0} does not exist on current iFolder server. |",userName);
+ }
+
+
+ }
/// <summary>
/// Checks the iFolder policy voilations after the data is restored.
/// </summary>
@@ -2877,7 +2930,7 @@
///
/// <returns>void.</returns>
- public static void checkiFolderPolicyStatus(string iFolderID, iFolderServer ifServer)
+ public static void CheckiFolderPolicyStatus(string iFolderID, iFolderServer ifServer)
{
iFolderPolicy currentPolicy = null;
@@ -2888,7 +2941,8 @@
return;
}
- if(( currentPolicy.SpaceUsed > currentPolicy.SpaceLimitEffective )
+ if( currentPolicy.SpaceLimitEffective != -1)//-1 means Policies are not set
+ if( ( currentPolicy.SpaceUsed > currentPolicy.SpaceLimitEffective )
|| (currentPolicy.SpaceAvailable == 0))
{
Console.WriteLine("| |");
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ra...@us...> - 2010-06-01 09:29:17
|
Revision: 7384
http://simias.svn.sourceforge.net/simias/?rev=7384&view=rev
Author: ravim85
Date: 2010-06-01 09:29:10 +0000 (Tue, 01 Jun 2010)
Log Message:
-----------
Removing slave server entry does not remove entry from catalog. Issue is
Fixed. Removed few warnings from code.
Reviewer : Anil
Modified Paths:
--------------
trunk/src/server/Simias.HostService/HostService.cs
trunk/src/server/Simias.Server/Catalog.cs
trunk/src/server/setup/SimiasServerSetup.cs
Modified: trunk/src/server/Simias.HostService/HostService.cs
===================================================================
--- trunk/src/server/Simias.HostService/HostService.cs 2010-05-27 15:44:10 UTC (rev 7383)
+++ trunk/src/server/Simias.HostService/HostService.cs 2010-06-01 09:29:10 UTC (rev 7384)
@@ -362,6 +362,7 @@
{
Domain domain = this.domain;
HostNode host = domain.GetNodeByID( id ) as HostNode;
+ Catalog.DeleteSlaveEntryFromCatalog(host.Name);
domain.Commit( domain.Delete( host ) );
}
@@ -373,6 +374,7 @@
public void DeleteHostByName( string Name )
{
Domain domain = this.domain;
+ Catalog.DeleteSlaveEntryFromCatalog(Name);
HostNode host = HostNode.GetHostByName(domain.ID, Name);
domain.Commit( domain.Delete( host ) );
}
Modified: trunk/src/server/Simias.Server/Catalog.cs
===================================================================
--- trunk/src/server/Simias.Server/Catalog.cs 2010-05-27 15:44:10 UTC (rev 7383)
+++ trunk/src/server/Simias.Server/Catalog.cs 2010-06-01 09:29:10 UTC (rev 7384)
@@ -1208,6 +1208,44 @@
return ;
}
+ /// <summary>
+ /// Delete a catalog entry for the slave host that is to be removed
+ /// </summary>
+ static public void DeleteSlaveEntryFromCatalog(string name )
+ {
+ log.Debug(" Deleting catalog entry of slave server - {0}", name);
+
+ ICSList list = catalog.FindType(NodeTypes.MemberType);
+ Node node = null;
+ foreach( ShallowNode sn in list )
+ {
+ if( sn != null)
+ {
+ if(sn.Name.Equals(name))
+ {
+ node = catalog.GetNodeByID(sn.ID);
+ if( node != null && node.IsType("Host"))
+ {
+ log.Debug("Delting the node from catalog {0} --- {1}",node.Name, node.ID);
+
+ CatalogEntry entry = new CatalogEntry(sn);
+ if( entry != null )
+ {
+ catalog.Commit(catalog.Delete(entry));
+ log.Debug(" Deleted catalog entry of slave server - {0}", name);
+ }
+ else
+ {
+ log.Debug("Unable to delete the catalog Entry for slave server {0}",name);
+ }
+ break;
+ }
+ }
+ }
+ }
+ return;
+ }
+
/// <summary>
/// Delete a catalog entry for the specified collection
/// </summary>
@@ -1220,7 +1258,7 @@
{
catalog.Commit(catalog.Delete(entry));
c.Commit(c.Delete());
- }
+ }
log.Debug("Out of DeleteEntryByCollectionID ...");
return ;
}
Modified: trunk/src/server/setup/SimiasServerSetup.cs
===================================================================
--- trunk/src/server/setup/SimiasServerSetup.cs 2010-05-27 15:44:10 UTC (rev 7383)
+++ trunk/src/server/setup/SimiasServerSetup.cs 2010-06-01 09:29:10 UTC (rev 7384)
@@ -406,7 +406,7 @@
{
bool enableSSL = String.Compare(useSsl.Value, NonSsl, true) == 0 ? false : true ;
string scheme = enableSSL?Uri.UriSchemeHttps:Uri.UriSchemeHttp;
- System.Net.IPHostEntry hostInfo = System.Net.Dns.GetHostByName( System.Net.Dns.GetHostName() );
+ System.Net.IPHostEntry hostInfo = System.Net.Dns.GetHostEntry( System.Net.Dns.GetHostName() );
if(publicUrl.Assigned)
{
UriBuilder urlBild = new UriBuilder(publicUrl.Value);
@@ -1094,7 +1094,7 @@
{
Console.WriteLine("Unable to find the User Move plugin configuration files..");
Console.WriteLine("{0}", usermoveModuleConfigPath );
- Console.WriteLine("Please make sure, ifolder-enterprise-plugins rpm is installed.\n\n");
+ Console.WriteLine("Please make sure, novell-ifolder-enterprise-plugins rpm is installed.\n\n");
return false;
}
string destModulesDir = Path.Combine( storePath, ModulesDir );
@@ -1143,7 +1143,7 @@
if ( File.Exists( ldapModuleConfigPath ) == false )
{
Console.WriteLine("Failed to find the Ldap plugin configuration files..");
- Console.WriteLine("Please make sure, ifolder-enterprise-plugins rpm is installed.\n\n");
+ Console.WriteLine("Please make sure, novell-ifolder-enterprise-plugins rpm is installed.\n\n");
return false;
}
string destModulesDir = Path.Combine( storePath, ModulesDir );
@@ -1729,7 +1729,7 @@
new Uri(
Uri.UriSchemeHttp +
"://" +
- System.Net.Dns.GetHostByName(System.Net.Dns.GetHostName()).AddressList[0].ToString() +
+ System.Net.Dns.GetHostEntry(System.Net.Dns.GetHostName()).AddressList[0].ToString() +
":80" +
"/simias10");
string pubAddress = config.Get( ServerSection, PublicAddressKey );
@@ -1980,7 +1980,7 @@
if(ldapServer.Value.Equals("localhost"))
{
- System.Net.IPHostEntry hostInfo = System.Net.Dns.GetHostByName( System.Net.Dns.GetHostName() );
+ System.Net.IPHostEntry hostInfo = System.Net.Dns.GetHostEntry( System.Net.Dns.GetHostName() );
ldapServer.Value = hostInfo.AddressList[0].ToString();
}
newUri.Host = ldapServer.Value;
@@ -2465,7 +2465,7 @@
if(ldapServer.Value.Equals("localhost"))
{
- System.Net.IPHostEntry hostInfo = System.Net.Dns.GetHostByName( System.Net.Dns.GetHostName() );
+ System.Net.IPHostEntry hostInfo = System.Net.Dns.GetHostEntry( System.Net.Dns.GetHostName() );
ldapServer.Value = hostInfo.AddressList[0].ToString();
}
newUri.Host = ldapServer.Value;
@@ -2514,7 +2514,7 @@
if(ldapServer.Value.Equals("localhost"))
{
- System.Net.IPHostEntry hostInfo = System.Net.Dns.GetHostByName( System.Net.Dns.GetHostName() );
+ System.Net.IPHostEntry hostInfo = System.Net.Dns.GetHostEntry( System.Net.Dns.GetHostName() );
ldapServer.Value = hostInfo.AddressList[0].ToString();
}
newUri.Host = ldapServer.Value;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sp...@us...> - 2010-05-27 06:43:30
|
Revision: 7382
http://simias.svn.sourceforge.net/simias/?rev=7382&view=rev
Author: spkumar
Date: 2010-05-27 06:43:24 +0000 (Thu, 27 May 2010)
Log Message:
-----------
updated the code with a review comment to consider the scenario of
retry during the restore
Modified Paths:
--------------
trunk/src/utils/restore/iFolderServer.cs
Modified: trunk/src/utils/restore/iFolderServer.cs
===================================================================
--- trunk/src/utils/restore/iFolderServer.cs 2010-05-27 06:15:20 UTC (rev 7381)
+++ trunk/src/utils/restore/iFolderServer.cs 2010-05-27 06:43:24 UTC (rev 7382)
@@ -2460,7 +2460,7 @@
retval = RestoreiFolderData(iFolderID, OldServer, oldUnManagedPath, NewServer,
newifolderDetails.UnManagedPath, relativepath, MainClass.UseWebAccess);
}
- if( (retval == 0) && (MainClass.OverwritePolicies == true) && (MainClass.Operation != (int)Command.Retry))
+ if( (retval == 0) && (MainClass.OverwritePolicies == true))
{
retval = RestoreiFolderPolicy(iFolderID, OldServer, NewServer);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sp...@us...> - 2010-05-27 06:15:26
|
Revision: 7381
http://simias.svn.sourceforge.net/simias/?rev=7381&view=rev
Author: spkumar
Date: 2010-05-27 06:15:20 +0000 (Thu, 27 May 2010)
Log Message:
-----------
Included the support to restore iFolder policies during the iFolder
restore
Modified Paths:
--------------
branches/iFolder_3.8.1_beta1/src/utils/restore/iFolderServer.cs
branches/iFolder_3.8.1_beta1/src/utils/restore/ifolder-data-recovery.8
Modified: branches/iFolder_3.8.1_beta1/src/utils/restore/iFolderServer.cs
===================================================================
--- branches/iFolder_3.8.1_beta1/src/utils/restore/iFolderServer.cs 2010-05-27 05:40:32 UTC (rev 7380)
+++ branches/iFolder_3.8.1_beta1/src/utils/restore/iFolderServer.cs 2010-05-27 06:15:20 UTC (rev 7381)
@@ -149,6 +149,10 @@
/// Input current server IP is empty
/// </summary>
EmptyNewServerUrl,
+ /// <summary>
+ /// Failed to restore iFolder policy
+ /// </summary>
+ PolicyRestoreFailed,
}
public enum Command
@@ -1236,7 +1240,6 @@
public NodeEntrySet GetEntries(string ifolderID, int type, string relPath, int index, int max, string accessID)
{
int count = 0;
- long TotalCount = 0;
NodeEntrySet entryset = null;
do
{
@@ -1313,6 +1316,82 @@
}while(count < MaxCount);
return retval;
}
+ /// <summary>
+ /// Retrieves the iFolder policy from the given iFolder ID.
+ /// </summary>
+ /// <param name="iFolderID"> ID of the iFolder for which policy needs to be retreived.</param>
+ ///
+ /// <returns>returns iFolderPolicy object on Success and null on Failures.</returns>
+
+ public iFolderPolicy GetiFolderPolicy( string ifolderid )
+ {
+ iFolderPolicy ifdPolicy = null;
+ try
+ {
+ int count = 0;
+ while (count < MaxCount)
+ {
+ try
+ {
+ ifdPolicy = this.web.GetiFolderPolicy(ifolderid);
+ break;
+ }
+ catch(Exception ex)
+ {
+ if(ex.Message.IndexOf("InvalidOperation") >= 0 || ex.StackTrace.IndexOf("InvalidOperation") >= 0 )
+ {
+ count++;
+ continue;
+ }
+ throw ex;
+ }
+ }
+ }
+ catch(Exception ex)
+ {
+ MainClass.DebugLog.Write(string.Format("Exception while fetching iFolder policies {0}--{1}", ex.Message, ex.StackTrace));
+ }
+ return ifdPolicy;
+ }
+
+ /// <summary>
+ /// Set the iFolder policy from the given iFolder.
+ /// </summary>
+ /// <param name="ifdPolicy"> iFolder policy that needs to be updated on the server.</param>
+ ///
+ /// <returns>returns 0 on Success and PolicyRestoreFailed on Failures.</returns>
+
+ public int SetiFolderPolicy(iFolderPolicy ifdPolicy )
+ {
+ int retval = 0;
+ try
+ {
+ int count = 0;
+ while (count < MaxCount)
+ {
+ try
+ {
+ this.web.SetiFolderPolicy(ifdPolicy);
+ break;
+ }
+ catch(Exception ex)
+ {
+ if(ex.Message.IndexOf("InvalidOperation") >= 0 || ex.StackTrace.IndexOf("InvalidOperation") >= 0 )
+ {
+ count++;
+ continue;
+ }
+ throw ex;
+ }
+ }
+ }
+ catch(Exception ex)
+ {
+ retval = (int)status.PolicyRestoreFailed;
+ MainClass.DebugLog.Write(string.Format("Exception while setting iFolder policy: {0}--{1}", ex.Message, ex.StackTrace));
+ }
+ return retval;
+ }
} //End of Class iFolderServer
@@ -1328,6 +1407,8 @@
public Option CurrentServerUrlOption = new Option("server-url", "current server IP", "current server IP", true, "http://127.0.0.1");
public Option iFolderIDOption = new Option("ifolder-id", "ID of ifolder to be restored", "ID of ifolder to be restored", true, "null");
public Option UserNameOption = new Option("user", "username for ifolder to be listed", "username for ifolder to be listed", true, "admin");
+
+ public Option PolicyOption = new Option("restore-policies", "Overwrite the iFolder Policies with the Policy of the backup iFolder", " Use this option to overwrite the iFolder policies", false, null);
public Option RecoverOption = new Option( "restore,r", "flag that tells that this is a restore scenario", "flag that tells that this is a restore scenario", false, null);
public Option RetryOption = new Option( "retry", "flag that tells that this is a retry scenario", "flag that tells that this is a retry scenario", false, null);
public Option PathOption = new Option( "path,f", "The path where the data is present", "Location of old database", true, null);
@@ -1360,6 +1441,7 @@
UseWebAccessOption.OnOptionEntered = new Option.OptionEnteredHandler( OnUseWebAccess);
RecoverOption.OnOptionEntered = new Option.OptionEnteredHandler( OnRecover);
RetryOption.OnOptionEntered = new Option.OptionEnteredHandler( OnRetry);
+ PolicyOption.OnOptionEntered = new Option.OptionEnteredHandler( OnPolicy);
LogLocationOption.OnOptionEntered = new Option.OptionEnteredHandler( OnLogLocation);
} //End of function CommandParsing Constructor
@@ -1516,6 +1598,12 @@
return true;
}
+ private bool OnPolicy()
+ {
+ MainClass.OverwritePolicies = true;
+ return true;
+ }
+
private bool OnLogLocation()
{
MainClass.LogLocation = LogLocationOption.Value;
@@ -1550,6 +1638,7 @@
public static Logger FailedLog;
public static Logger FileNotFound;
public static bool UseWebAccess = false;
+ public static bool OverwritePolicies = false;
public static string RedirectedNewServerUrl = "";
public static string OldServerUrl = "http://127.0.0.1:8086/simias10";
public static bool PrecheckFlag = false;
@@ -1727,8 +1816,7 @@
NewServer = new iFolderServer(RedirectedNewServerUrl, newAdminName, newAdminPassword, false);
/// Added
- Hashtable ht = new Hashtable();
- int remainingItems = 0, totalitems = 0;
+ int remainingItems = 0;
previousstatus = xmlObj.VerifyStatus();
MainClass.DebugLog.Write(string.Format("Previous status = {0}, remainingitems = {1}", previousstatus, remainingItems));
@@ -1811,7 +1899,7 @@
if( relativePath == null || relativePath == string.Empty)
fullrecovery = true;
-
+
bool retStatus = false;
if( fullrecovery)
{
@@ -1819,6 +1907,7 @@
}
else
{
+
ifolder = NewServer.GetiFolder( collectionid );
if( ifolder != null)
retStatus = true;
@@ -2140,12 +2229,18 @@
}
if( Operation == (int)Command.Restore )
{
- if(relativePath != string.Empty && relativePath != null)
+ if(relativePath != string.Empty && relativePath != null) {
if( !File.Exists(Path.Combine(FolderLocation,relativePath) )
&& !Directory.Exists(Path.Combine(FolderLocation,relativePath) ))
{
return (int)status.InvalidRelativePath;
}
+ if (MainClass.OverwritePolicies )
+ {
+ Console.WriteLine("| Option \"restore-policies\" must not be used for directory or file restore operation |");
+ return (int)status.InvalidInput;
+ }
+ }
}
/// In case of listing, we should have the temporary server up and running, and old server credentials should be proper. User name is expected.
@@ -2209,6 +2304,7 @@
{
iFolderServer OldServer = new iFolderServer( OldServerUrl,oldAdminName, oldAdminPassword, false);
iFolderDetails ifd = null;
+
userID = OldServer.GetUserIDFromName(userName);
if(userID == null)
@@ -2242,6 +2338,9 @@
Console.WriteLine("\niFolder Name: {0} \r\n\tiFolderID: {1} \r\n\tPath :{2}", ifd.Name, ifd.ID, ifd.UnManagedPath);
MainClass.DebugLog.Write(string.Format("iFolder {0}", str));
+
+
+
}
}
catch(Exception ex)
@@ -2361,7 +2460,16 @@
retval = RestoreiFolderData(iFolderID, OldServer, oldUnManagedPath, NewServer,
newifolderDetails.UnManagedPath, relativepath, MainClass.UseWebAccess);
}
+ if( (retval == 0) && (MainClass.OverwritePolicies == true))
+ {
+ retval = RestoreiFolderPolicy(iFolderID, OldServer, NewServer);
+ }
+
+ //This check needs to be done unconditionally. Policy violation can happen
+ // during a partial or a full restore.
+ checkiFolderPolicyStatus(iFolderID, NewServer);
+
}
return retval;
}
@@ -2464,8 +2572,6 @@
if(File.Exists( logpath) && File.Exists( logpath+".working") )
{
MainClass.DebugLog.Write(string.Format("both file exist"));
- byte[] buff = new byte[4096];
- int readCount =0;
try
{
logwriter = new FileInfo(logpath+".working").AppendText();
@@ -2615,7 +2721,7 @@
int type = -1;
int max = 100;
NodeEntrySet entryset = null;
- NodeEntry[] entries = null;
+ //NodeEntry[] entries = null;
/// fetch 100 nodes at a time from old server and iteratively parse them...
string fullpath = Path.Combine(oldpath, relativepath);
if( File.Exists(fullpath))
@@ -2729,7 +2835,115 @@
return retval;
}
+
+ /// <summary>
+ /// Prints iFolder policy to the logger.
+ /// </summary>
+ /// <param name="ifdPolicy">iFolder policy object.</param>
+ ///
+ /// <returns>void.</returns>
+ public static void PrintPolicyToLogger(iFolderPolicy ifdPolicy)
+ {
+ StringBuilder includeFilter = new StringBuilder();
+ StringBuilder excludeFilter = new StringBuilder();
+
+ foreach(string inc in ifdPolicy.FileTypesIncludes){
+ if(includeFilter.Length == 0){
+ includeFilter.Append(inc);
+ } else {
+ includeFilter.AppendFormat(", {0}",inc);
+ }
+ }
+
+
+ foreach(string exstr in ifdPolicy.FileTypesExcludes){
+ if(excludeFilter.Length == 0){
+ excludeFilter.Append(exstr);
+ } else {
+ excludeFilter.AppendFormat(", {0}",exstr);
+ }
+ }
+
+ MainClass.DebugLog.Write(string.Format(" iFolderID-{0},\n\tLocked-{1} \n\tSpaceLimit - {2}, \n\tSyncInterval - {3},\n\tSharingStatus - {4},\n\tFileSizeLimit-{5},\n\tFileTypesIncludes - {6},\n\tFileTypesExcludes - {7} ",
+ ifdPolicy.iFolderID, ifdPolicy.Locked, ifdPolicy.SpaceLimit,
+ ifdPolicy.SyncInterval, ifdPolicy.SharingStatus, ifdPolicy.FileSizeLimit, includeFilter.ToString(), excludeFilter.ToString()));
+
+ }
+ /// <summary>
+ /// Checks the iFolder policy voilations after the data is restored.
+ /// </summary>
+ /// <param name="iFolderID">iFolder ID.</param>
+ /// <param name="oldserver">iFolderServer object where the iFolder exists..</param>
+ ///
+ /// <returns>void.</returns>
+
+ public static void checkiFolderPolicyStatus(string iFolderID, iFolderServer ifServer)
+ {
+ iFolderPolicy currentPolicy = null;
+
+ currentPolicy = ifServer.GetiFolderPolicy(iFolderID );
+ if ( currentPolicy == null) {
+ Console.WriteLine("| |");
+ Console.WriteLine("| Warning: Failed to check iFolder policies after restoring data. |");
+ return;
+ }
+
+ if(( currentPolicy.SpaceUsed > currentPolicy.SpaceLimitEffective )
+ || (currentPolicy.SpaceAvailable == 0))
+ {
+ Console.WriteLine("| |");
+ Console.WriteLine("| Warning: Restoring the data resulted in violation of the space limit |");
+ Console.WriteLine("| policy for the iFolder. User should delete unused data to reduce used |");
+ Console.WriteLine("| space to permissible limits. Space Used = {0}, Effective Space Limit={1} |",currentPolicy.SpaceUsed, currentPolicy.SpaceLimitEffective);
+
+ }
+
+ if(currentPolicy.Locked )
+ {
+ Console.WriteLine("| |");
+ Console.WriteLine("| Warning: Data is restored into a disabled iFolder. |");
+ Console.WriteLine("| iFolder needs to be enabled for the user to access the data. |");
+ Console.WriteLine("| |");
+
+ }
+
+ }
+ /// <summary>
+ /// Restores the iFolder policy from the backup iFolder.
+ /// </summary>
+ /// <param name="iFolderID">.</param>
+ /// <param name="oldserver">.</param>
+ /// <param name="newserver">.</param>
+ ///
+ /// <returns>returns 0 on Success and PolicyRestoreFailed on Failures.</returns>
+ public static int RestoreiFolderPolicy( string iFolderID, iFolderServer oldserver, iFolderServer newserver) {
+ iFolderPolicy oldPolicy = null;
+ iFolderPolicy newPolicy = null;
+ int retval = 0;
+ MainClass.DebugLog.Write(string.Format(" iFolderID-{0}, oldserver-{1}, newserver-{2}",iFolderID.ToString(), oldserver.ToString(), newserver.ToString()));
+ Console.WriteLine("| Processing iFolder policies |");
+ MainClass.DebugLog.Write(string.Format("Fetching iFolder policy details from backup"));
+ oldPolicy = oldserver.GetiFolderPolicy(iFolderID);
+ if(oldPolicy == null) {
+ retval = (int)status.PolicyRestoreFailed;
+ }
+ else
+ {
+ MainClass.DebugLog.Write("\nBackup iFolder policy details: ");
+ PrintPolicyToLogger(oldPolicy);
+ newPolicy = newserver.GetiFolderPolicy(iFolderID );
+ MainClass.DebugLog.Write("\nCurrent iFolder policy details: ");
+ if(newPolicy != null) {
+ PrintPolicyToLogger(newPolicy);
+ }
+ MainClass.DebugLog.Write(string.Format("Restoring iFolder policy details "));
+ retval = newserver.SetiFolderPolicy(oldPolicy);
+ }
+ if( retval == 0)
+ Console.WriteLine("| Restoring iFolder policies sucessful |");
+ return retval;
+ }
/// <summary>
///
/// </summary>
@@ -2779,6 +2993,7 @@
else
Console.WriteLine("\n| Restore process failed. |");
}
+
}
if( runpreviousiter )
@@ -2812,6 +3027,7 @@
return retval;
}
+
/// <summary>
///
@@ -2822,37 +3038,38 @@
{
Console.WriteLine("Command For Execution: $ifolder-data-recovery <Operation> <Arguments>\n");
- Console.WriteLine("Operation:\n\t-l, --list\t\tList iFolders with details like Name, iFolderID and Path \n\t\t\t(at the time of backup) belong to the specified user.");
+ Console.WriteLine("Operation:\n\t-l, --list\tLists iFolders owned by the specified user and details such as Name,\n\t\t\t\tiFolderID, and Path (at the time of backup)");
Console.WriteLine("\t-r, --restore\tRestore requested data (File/Folder/iFolder) from specified backup store.");
Console.WriteLine("\t--retry\t\tRetry restore opreation for failed data in last run.");
- Console.WriteLine("\t-h, --help\t\tPrint help regarding Opreation, argument and usage.");
- Console.WriteLine("\t\nArguments:\n\t--path=<path for simias file in backup store>");
- Console.WriteLine("\t-U, --backup-admin=<admin login name for backup. >");
- Console.WriteLine("\t-u,--current-admin=<admin login name for current server. Use this Option if backup admin is different from current admin.>");
- Console.WriteLine("\t--server-url=<current iFolder server url>");
- Console.WriteLine("\t--user=<user for whome associated ifolders to be listed>");
- Console.WriteLine("\t--ifolder-id=<ifolder ID of for/inside which restore operation is performed>");
- Console.WriteLine("\t--ifolder-path=<parent level path(excluding ifolder name) for actual data to be restored>");
- Console.WriteLine("\t--relative-path=<relative path of file/folder to be restored, starting from iFolder name>");
- Console.WriteLine("\t--usewebaccess does not take any value, adding this will specifies the mode to restore");
+ Console.WriteLine("\t-h, --help\tPrint help regarding Operation, argument and usage.");
+ Console.WriteLine("\t\nArguments:\n\t--path\t\t\tpath for simias file in backup store");
+ Console.WriteLine("\t-U, --backup-admin\tLogin name of the Administrator who performed the backup");
+ Console.WriteLine("\t-u,--current-admin\tAdministrator login name for the current server. Use this Option if backup \n\t\t\t\t admin is different from current admin.");
+ Console.WriteLine("\t--server-url\t\tURL of the server where data is to be restored");
+ Console.WriteLine("\t--user\t\t\tUsername of the user for whom the specified operation is to be performed");
+ Console.WriteLine("\t--ifolder-id\t\tID of the iFolder for which the specified operation is to be performed");
+ Console.WriteLine("\t--ifolder-path\t\tAbsolute path (excluding the iFolder name) of the actual data to be restored");
+ Console.WriteLine("\t--relative-path\t\tRelative path of file/folder to be restored, starting from iFolder name");
+ Console.WriteLine("\t--usewebaccess\t\tSpecifies the mode to restore. Does not take any value.");
+ Console.WriteLine("\t--restore-policies\tOverwrites current iFolder policies with the policies of the iFolder from backup");
Console.WriteLine("\t\nExamples:");
Console.WriteLine("\n\tFor Help:");
Console.WriteLine("\t\t$./ifolder-data-recovery --help");
Console.WriteLine("\n\tFor Listing iFolder for given user:");
- Console.WriteLine("\t\t$./ifolder-data-recovery --list --path=/home/ifolder/SimiasFile/ --backup-admin=admin --user=user1");
+ Console.WriteLine("\t\t$./ifolder-data-recovery --list --path=/home/recovery/data/ --backup-admin=admin --user=user1");
Console.WriteLine("\n\tFor Restoring iFolder:");
- Console.WriteLine("\t\t$./ifolder-data-recovery --restore --path=/home/ifolder/SimiasFile/ --backup-admin=oldadmin --current-admin=admin --server-url=http://192.162.1.10 --ifolder-id=7fe6cd5d-40d4-4982-bfa3-94292d4e36ab --ifolder-path=/home/ifolder/recovery/data");
+ Console.WriteLine("\t\t$./ifolder-data-recovery --restore --path=/home/recovery/data/ --backup-admin=oldadmin --current-admin=admin --server-url=http://192.162.1.10 --ifolder-id=7fe6cd5d-40d4-4982-bfa3-94292d4e36ab --ifolder-path=/home/ifolder/7fe6cd5d-40d4-4982-bfa3-94292d4e36ab");
Console.WriteLine("\n\tFor Restoring Folder:");
- Console.WriteLine("\t\t$./ifolder-data-recovery --restore --path=/home/ifolder/SimiasFile/ --backup-admin=oldadmin --current-admin=admin --server-url=http://192.162.1.10 --ifolder-id=7fe6cd5d-40d4-4982-bfa3-94292d4e36ab --ifolder-path=/home/ifolder/recovery/data --relative-path=abc1if1/new folder");
+ Console.WriteLine("\t\t$./ifolder-data-recovery --restore --path=/home/recovery/data/ --backup-admin=admin --server-url=http://192.162.1.10 --ifolder-id=7fe6cd5d-40d4-4982-bfa3-94292d4e36ab --ifolder-path=/home/ifolder/7fe6cd5d-40d4-4982-bfa3-94292d4e36ab --relative-path=MyiFolder/Subdir");
Console.WriteLine("\n\tFor Restoring File:");
- Console.WriteLine("\t\t$./ifolder-data-recovery --restore --path=/home/ifolder/SimiasFile/ --backup-admin=oldadmin --current-admin=admin --server-url=http://192.162.1.10 --ifolder-id=7fe6cd5d-40d4-4982-bfa3-94292d4e36ab --ifolder-path=/home/ifolder/recovery/data --relative-path=abc1if1/new folder/qfrep.exe");
+ Console.WriteLine("\t\t$./ifolder-data-recovery --restore --path=/home/recovery/data/ --backup-admin=oldadmin --current-admin=admin --server-url=http://192.162.1.10 --ifolder-id=7fe6cd5d-40d4-4982-bfa3-94292d4e36ab --ifolder-path=/home/ifolder/7fe6cd5d-40d4-4982-bfa3-94292d4e36ab --relative-path=MyiFolder/Subdir/MyFile.txt");
Console.WriteLine("\n\tFor Retrying:");
- Console.WriteLine("\t\t$./ifolder-data-recovery --retry --path=/home/ifolder/SimiasFile/ --backup-admin=oldadmin --current-admin=admin --server-url=http://192.162.1.10 --ifolder-id=7fe6cd5d-40d4-4982-bfa3-94292d4e36ab --ifolder-path=/home/ifolder/recovery/data --relative-path=abc1if1/qfrep.exe\n");
+ Console.WriteLine("\t\t$./ifolder-data-recovery --retry --path=/home/recovery/data/ --backup-admin=oldadmin --current-admin=admin --server-url=http://192.162.1.10 --ifolder-id=7fe6cd5d-40d4-4982-bfa3-94292d4e36ab --ifolder-path=/home/ifolder/7fe6cd5d-40d4-4982-bfa3-94292d4e36ab --relative-path=MyiFolder/Subdir\n");
}
@@ -2934,6 +3151,9 @@
case (int)status.EmptyNewServerUrl:
Console.WriteLine("\n| Input Current Server IP is Empty. |");
break;
+ case (int)status.PolicyRestoreFailed:
+ Console.WriteLine("\n| iFolder Policy Restore Failed. |");
+ break;
default:
Console.WriteLine("\n| iFolder data restore Failed with error code: {0} |", result);
break;
@@ -2984,7 +3204,7 @@
public static long NumberOfLines(string fileName)
{
MainClass.DebugLog.Write(string.Format("Enter Function NumberOfLines for file:{0}",fileName));
- string line = null;
+ string line = null;
long numOfLines = 0;
TextReader reader = null;
if(fileName != null || fileName != string.Empty)
Modified: branches/iFolder_3.8.1_beta1/src/utils/restore/ifolder-data-recovery.8
===================================================================
--- branches/iFolder_3.8.1_beta1/src/utils/restore/ifolder-data-recovery.8 2010-05-27 05:40:32 UTC (rev 7380)
+++ branches/iFolder_3.8.1_beta1/src/utils/restore/ifolder-data-recovery.8 2010-05-27 06:15:20 UTC (rev 7381)
@@ -105,6 +105,11 @@
Relative path of the file or folder to be restored, starting from the iFolder name
.RE
.PP
+\-\-restore\-policies
+.RS 4
+ Overwrites current iFolder policies with the policies of the iFolder from backup
+.RE
+.PP
\-\-usewebaccess
.RS 4
Specifies the mode to restore. Does not take any value.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sp...@us...> - 2010-05-27 05:40:39
|
Revision: 7380
http://simias.svn.sourceforge.net/simias/?rev=7380&view=rev
Author: spkumar
Date: 2010-05-27 05:40:32 +0000 (Thu, 27 May 2010)
Log Message:
-----------
Included the support to restore iFolder policies during the iFolder
restore
Modified Paths:
--------------
trunk/src/utils/restore/iFolderServer.cs
trunk/src/utils/restore/ifolder-data-recovery.8
Modified: trunk/src/utils/restore/iFolderServer.cs
===================================================================
--- trunk/src/utils/restore/iFolderServer.cs 2010-05-26 12:31:14 UTC (rev 7379)
+++ trunk/src/utils/restore/iFolderServer.cs 2010-05-27 05:40:32 UTC (rev 7380)
@@ -149,6 +149,10 @@
/// Input current server IP is empty
/// </summary>
EmptyNewServerUrl,
+ /// <summary>
+ /// Failed to restore iFolder policy
+ /// </summary>
+ PolicyRestoreFailed,
}
public enum Command
@@ -1236,7 +1240,6 @@
public NodeEntrySet GetEntries(string ifolderID, int type, string relPath, int index, int max, string accessID)
{
int count = 0;
- long TotalCount = 0;
NodeEntrySet entryset = null;
do
{
@@ -1313,6 +1316,82 @@
}while(count < MaxCount);
return retval;
}
+ /// <summary>
+ /// Retrieves the iFolder policy from the given iFolder ID.
+ /// </summary>
+ /// <param name="iFolderID"> ID of the iFolder for which policy needs to be retreived.</param>
+ ///
+ /// <returns>returns iFolderPolicy object on Success and null on Failures.</returns>
+
+ public iFolderPolicy GetiFolderPolicy( string ifolderid )
+ {
+ iFolderPolicy ifdPolicy = null;
+ try
+ {
+ int count = 0;
+ while (count < MaxCount)
+ {
+ try
+ {
+ ifdPolicy = this.web.GetiFolderPolicy(ifolderid);
+ break;
+ }
+ catch(Exception ex)
+ {
+ if(ex.Message.IndexOf("InvalidOperation") >= 0 || ex.StackTrace.IndexOf("InvalidOperation") >= 0 )
+ {
+ count++;
+ continue;
+ }
+ throw ex;
+ }
+ }
+ }
+ catch(Exception ex)
+ {
+ MainClass.DebugLog.Write(string.Format("Exception while fetching iFolder policies {0}--{1}", ex.Message, ex.StackTrace));
+ }
+ return ifdPolicy;
+ }
+
+ /// <summary>
+ /// Set the iFolder policy from the given iFolder.
+ /// </summary>
+ /// <param name="ifdPolicy"> iFolder policy that needs to be updated on the server.</param>
+ ///
+ /// <returns>returns 0 on Success and PolicyRestoreFailed on Failures.</returns>
+
+ public int SetiFolderPolicy(iFolderPolicy ifdPolicy )
+ {
+ int retval = 0;
+ try
+ {
+ int count = 0;
+ while (count < MaxCount)
+ {
+ try
+ {
+ this.web.SetiFolderPolicy(ifdPolicy);
+ break;
+ }
+ catch(Exception ex)
+ {
+ if(ex.Message.IndexOf("InvalidOperation") >= 0 || ex.StackTrace.IndexOf("InvalidOperation") >= 0 )
+ {
+ count++;
+ continue;
+ }
+ throw ex;
+ }
+ }
+ }
+ catch(Exception ex)
+ {
+ retval = (int)status.PolicyRestoreFailed;
+ MainClass.DebugLog.Write(string.Format("Exception while setting iFolder policy: {0}--{1}", ex.Message, ex.StackTrace));
+ }
+ return retval;
+ }
} //End of Class iFolderServer
@@ -1328,6 +1407,8 @@
public Option CurrentServerUrlOption = new Option("server-url", "current server IP", "current server IP", true, "http://127.0.0.1");
public Option iFolderIDOption = new Option("ifolder-id", "ID of ifolder to be restored", "ID of ifolder to be restored", true, "null");
public Option UserNameOption = new Option("user", "username for ifolder to be listed", "username for ifolder to be listed", true, "admin");
+
+ public Option PolicyOption = new Option("restore-policies", "Overwrite the iFolder Policies with the Policy of the backup iFolder", " Use this option to overwrite the iFolder policies", false, null);
public Option RecoverOption = new Option( "restore,r", "flag that tells that this is a restore scenario", "flag that tells that this is a restore scenario", false, null);
public Option RetryOption = new Option( "retry", "flag that tells that this is a retry scenario", "flag that tells that this is a retry scenario", false, null);
public Option PathOption = new Option( "path,f", "The path where the data is present", "Location of old database", true, null);
@@ -1360,6 +1441,7 @@
UseWebAccessOption.OnOptionEntered = new Option.OptionEnteredHandler( OnUseWebAccess);
RecoverOption.OnOptionEntered = new Option.OptionEnteredHandler( OnRecover);
RetryOption.OnOptionEntered = new Option.OptionEnteredHandler( OnRetry);
+ PolicyOption.OnOptionEntered = new Option.OptionEnteredHandler( OnPolicy);
LogLocationOption.OnOptionEntered = new Option.OptionEnteredHandler( OnLogLocation);
} //End of function CommandParsing Constructor
@@ -1516,6 +1598,12 @@
return true;
}
+ private bool OnPolicy()
+ {
+ MainClass.OverwritePolicies = true;
+ return true;
+ }
+
private bool OnLogLocation()
{
MainClass.LogLocation = LogLocationOption.Value;
@@ -1550,6 +1638,7 @@
public static Logger FailedLog;
public static Logger FileNotFound;
public static bool UseWebAccess = false;
+ public static bool OverwritePolicies = false;
public static string RedirectedNewServerUrl = "";
public static string OldServerUrl = "http://127.0.0.1:8086/simias10";
public static bool PrecheckFlag = false;
@@ -1727,8 +1816,7 @@
NewServer = new iFolderServer(RedirectedNewServerUrl, newAdminName, newAdminPassword, false);
/// Added
- Hashtable ht = new Hashtable();
- int remainingItems = 0, totalitems = 0;
+ int remainingItems = 0;
previousstatus = xmlObj.VerifyStatus();
MainClass.DebugLog.Write(string.Format("Previous status = {0}, remainingitems = {1}", previousstatus, remainingItems));
@@ -1811,7 +1899,7 @@
if( relativePath == null || relativePath == string.Empty)
fullrecovery = true;
-
+
bool retStatus = false;
if( fullrecovery)
{
@@ -1819,6 +1907,7 @@
}
else
{
+
ifolder = NewServer.GetiFolder( collectionid );
if( ifolder != null)
retStatus = true;
@@ -2140,12 +2229,18 @@
}
if( Operation == (int)Command.Restore )
{
- if(relativePath != string.Empty && relativePath != null)
+ if(relativePath != string.Empty && relativePath != null) {
if( !File.Exists(Path.Combine(FolderLocation,relativePath) )
&& !Directory.Exists(Path.Combine(FolderLocation,relativePath) ))
{
return (int)status.InvalidRelativePath;
}
+ if (MainClass.OverwritePolicies )
+ {
+ Console.WriteLine("| Option \"restore-policies\" must not be used for directory or file restore operation |");
+ return (int)status.InvalidInput;
+ }
+ }
}
/// In case of listing, we should have the temporary server up and running, and old server credentials should be proper. User name is expected.
@@ -2209,6 +2304,7 @@
{
iFolderServer OldServer = new iFolderServer( OldServerUrl,oldAdminName, oldAdminPassword, false);
iFolderDetails ifd = null;
+
userID = OldServer.GetUserIDFromName(userName);
if(userID == null)
@@ -2242,6 +2338,9 @@
Console.WriteLine("\niFolder Name: {0} \r\n\tiFolderID: {1} \r\n\tPath :{2}", ifd.Name, ifd.ID, ifd.UnManagedPath);
MainClass.DebugLog.Write(string.Format("iFolder {0}", str));
+
+
+
}
}
catch(Exception ex)
@@ -2361,7 +2460,16 @@
retval = RestoreiFolderData(iFolderID, OldServer, oldUnManagedPath, NewServer,
newifolderDetails.UnManagedPath, relativepath, MainClass.UseWebAccess);
}
+ if( (retval == 0) && (MainClass.OverwritePolicies == true) && (MainClass.Operation != (int)Command.Retry))
+ {
+ retval = RestoreiFolderPolicy(iFolderID, OldServer, NewServer);
+ }
+
+ //This check needs to be done unconditionally. Policy violation can happen
+ // during a partial or a full restore.
+ checkiFolderPolicyStatus(iFolderID, NewServer);
+
}
return retval;
}
@@ -2464,8 +2572,6 @@
if(File.Exists( logpath) && File.Exists( logpath+".working") )
{
MainClass.DebugLog.Write(string.Format("both file exist"));
- byte[] buff = new byte[4096];
- int readCount =0;
try
{
logwriter = new FileInfo(logpath+".working").AppendText();
@@ -2615,7 +2721,7 @@
int type = -1;
int max = 100;
NodeEntrySet entryset = null;
- NodeEntry[] entries = null;
+ //NodeEntry[] entries = null;
/// fetch 100 nodes at a time from old server and iteratively parse them...
string fullpath = Path.Combine(oldpath, relativepath);
if( File.Exists(fullpath))
@@ -2729,7 +2835,115 @@
return retval;
}
+
+ /// <summary>
+ /// Prints iFolder policy to the logger.
+ /// </summary>
+ /// <param name="ifdPolicy">iFolder policy object.</param>
+ ///
+ /// <returns>void.</returns>
+ public static void PrintPolicyToLogger(iFolderPolicy ifdPolicy)
+ {
+ StringBuilder includeFilter = new StringBuilder();
+ StringBuilder excludeFilter = new StringBuilder();
+
+ foreach(string inc in ifdPolicy.FileTypesIncludes){
+ if(includeFilter.Length == 0){
+ includeFilter.Append(inc);
+ } else {
+ includeFilter.AppendFormat(", {0}",inc);
+ }
+ }
+
+
+ foreach(string exstr in ifdPolicy.FileTypesExcludes){
+ if(excludeFilter.Length == 0){
+ excludeFilter.Append(exstr);
+ } else {
+ excludeFilter.AppendFormat(", {0}",exstr);
+ }
+ }
+
+ MainClass.DebugLog.Write(string.Format(" iFolderID-{0},\n\tLocked-{1} \n\tSpaceLimit - {2}, \n\tSyncInterval - {3},\n\tSharingStatus - {4},\n\tFileSizeLimit-{5},\n\tFileTypesIncludes - {6},\n\tFileTypesExcludes - {7} ",
+ ifdPolicy.iFolderID, ifdPolicy.Locked, ifdPolicy.SpaceLimit,
+ ifdPolicy.SyncInterval, ifdPolicy.SharingStatus, ifdPolicy.FileSizeLimit, includeFilter.ToString(), excludeFilter.ToString()));
+
+ }
+ /// <summary>
+ /// Checks the iFolder policy voilations after the data is restored.
+ /// </summary>
+ /// <param name="iFolderID">iFolder ID.</param>
+ /// <param name="oldserver">iFolderServer object where the iFolder exists..</param>
+ ///
+ /// <returns>void.</returns>
+
+ public static void checkiFolderPolicyStatus(string iFolderID, iFolderServer ifServer)
+ {
+ iFolderPolicy currentPolicy = null;
+
+ currentPolicy = ifServer.GetiFolderPolicy(iFolderID );
+ if ( currentPolicy == null) {
+ Console.WriteLine("| |");
+ Console.WriteLine("| Warning: Failed to check iFolder policies after restoring data. |");
+ return;
+ }
+
+ if(( currentPolicy.SpaceUsed > currentPolicy.SpaceLimitEffective )
+ || (currentPolicy.SpaceAvailable == 0))
+ {
+ Console.WriteLine("| |");
+ Console.WriteLine("| Warning: Restoring the data resulted in violation of the space limit |");
+ Console.WriteLine("| policy for the iFolder. User should delete unused data to reduce used |");
+ Console.WriteLine("| space to permissible limits. Space Used = {0}, Effective Space Limit={1} |",currentPolicy.SpaceUsed, currentPolicy.SpaceLimitEffective);
+
+ }
+
+ if(currentPolicy.Locked )
+ {
+ Console.WriteLine("| |");
+ Console.WriteLine("| Warning: Data is restored into a disabled iFolder. |");
+ Console.WriteLine("| iFolder needs to be enabled for the user to access the data. |");
+ Console.WriteLine("| |");
+
+ }
+
+ }
+ /// <summary>
+ /// Restores the iFolder policy from the backup iFolder.
+ /// </summary>
+ /// <param name="iFolderID">.</param>
+ /// <param name="oldserver">.</param>
+ /// <param name="newserver">.</param>
+ ///
+ /// <returns>returns 0 on Success and PolicyRestoreFailed on Failures.</returns>
+ public static int RestoreiFolderPolicy( string iFolderID, iFolderServer oldserver, iFolderServer newserver) {
+ iFolderPolicy oldPolicy = null;
+ iFolderPolicy newPolicy = null;
+ int retval = 0;
+ MainClass.DebugLog.Write(string.Format(" iFolderID-{0}, oldserver-{1}, newserver-{2}",iFolderID.ToString(), oldserver.ToString(), newserver.ToString()));
+ Console.WriteLine("| Processing iFolder policies |");
+ MainClass.DebugLog.Write(string.Format("Fetching iFolder policy details from backup"));
+ oldPolicy = oldserver.GetiFolderPolicy(iFolderID);
+ if(oldPolicy == null) {
+ retval = (int)status.PolicyRestoreFailed;
+ }
+ else
+ {
+ MainClass.DebugLog.Write("\nBackup iFolder policy details: ");
+ PrintPolicyToLogger(oldPolicy);
+ newPolicy = newserver.GetiFolderPolicy(iFolderID );
+ MainClass.DebugLog.Write("\nCurrent iFolder policy details: ");
+ if(newPolicy != null) {
+ PrintPolicyToLogger(newPolicy);
+ }
+ MainClass.DebugLog.Write(string.Format("Restoring iFolder policy details "));
+ retval = newserver.SetiFolderPolicy(oldPolicy);
+ }
+ if( retval == 0)
+ Console.WriteLine("| Restoring iFolder policies sucessful |");
+ return retval;
+ }
/// <summary>
///
/// </summary>
@@ -2779,6 +2993,7 @@
else
Console.WriteLine("\n| Restore process failed. |");
}
+
}
if( runpreviousiter )
@@ -2812,6 +3027,7 @@
return retval;
}
+
/// <summary>
///
@@ -2822,37 +3038,38 @@
{
Console.WriteLine("Command For Execution: $ifolder-data-recovery <Operation> <Arguments>\n");
- Console.WriteLine("Operation:\n\t-l, --list\t\tList iFolders with details like Name, iFolderID and Path \n\t\t\t(at the time of backup) belong to the specified user.");
+ Console.WriteLine("Operation:\n\t-l, --list\tLists iFolders owned by the specified user and details such as Name,\n\t\t\t\tiFolderID, and Path (at the time of backup)");
Console.WriteLine("\t-r, --restore\tRestore requested data (File/Folder/iFolder) from specified backup store.");
Console.WriteLine("\t--retry\t\tRetry restore opreation for failed data in last run.");
- Console.WriteLine("\t-h, --help\t\tPrint help regarding Opreation, argument and usage.");
- Console.WriteLine("\t\nArguments:\n\t--path=<path for simias file in backup store>");
- Console.WriteLine("\t-U, --backup-admin=<admin login name for backup. >");
- Console.WriteLine("\t-u,--current-admin=<admin login name for current server. Use this Option if backup admin is different from current admin.>");
- Console.WriteLine("\t--server-url=<current iFolder server url>");
- Console.WriteLine("\t--user=<user for whome associated ifolders to be listed>");
- Console.WriteLine("\t--ifolder-id=<ifolder ID of for/inside which restore operation is performed>");
- Console.WriteLine("\t--ifolder-path=<parent level path(excluding ifolder name) for actual data to be restored>");
- Console.WriteLine("\t--relative-path=<relative path of file/folder to be restored, starting from iFolder name>");
- Console.WriteLine("\t--usewebaccess does not take any value, adding this will specifies the mode to restore");
+ Console.WriteLine("\t-h, --help\tPrint help regarding Operation, argument and usage.");
+ Console.WriteLine("\t\nArguments:\n\t--path\t\t\tpath for simias file in backup store");
+ Console.WriteLine("\t-U, --backup-admin\tLogin name of the Administrator who performed the backup");
+ Console.WriteLine("\t-u,--current-admin\tAdministrator login name for the current server. Use this Option if backup \n\t\t\t\t admin is different from current admin.");
+ Console.WriteLine("\t--server-url\t\tURL of the server where data is to be restored");
+ Console.WriteLine("\t--user\t\t\tUsername of the user for whom the specified operation is to be performed");
+ Console.WriteLine("\t--ifolder-id\t\tID of the iFolder for which the specified operation is to be performed");
+ Console.WriteLine("\t--ifolder-path\t\tAbsolute path (excluding the iFolder name) of the actual data to be restored");
+ Console.WriteLine("\t--relative-path\t\tRelative path of file/folder to be restored, starting from iFolder name");
+ Console.WriteLine("\t--usewebaccess\t\tSpecifies the mode to restore. Does not take any value.");
+ Console.WriteLine("\t--restore-policies\tOverwrites current iFolder policies with the policies of the iFolder from backup");
Console.WriteLine("\t\nExamples:");
Console.WriteLine("\n\tFor Help:");
Console.WriteLine("\t\t$./ifolder-data-recovery --help");
Console.WriteLine("\n\tFor Listing iFolder for given user:");
- Console.WriteLine("\t\t$./ifolder-data-recovery --list --path=/home/ifolder/SimiasFile/ --backup-admin=admin --user=user1");
+ Console.WriteLine("\t\t$./ifolder-data-recovery --list --path=/home/recovery/data/ --backup-admin=admin --user=user1");
Console.WriteLine("\n\tFor Restoring iFolder:");
- Console.WriteLine("\t\t$./ifolder-data-recovery --restore --path=/home/ifolder/SimiasFile/ --backup-admin=oldadmin --current-admin=admin --server-url=http://192.162.1.10 --ifolder-id=7fe6cd5d-40d4-4982-bfa3-94292d4e36ab --ifolder-path=/home/ifolder/recovery/data");
+ Console.WriteLine("\t\t$./ifolder-data-recovery --restore --path=/home/recovery/data/ --backup-admin=oldadmin --current-admin=admin --server-url=http://192.162.1.10 --ifolder-id=7fe6cd5d-40d4-4982-bfa3-94292d4e36ab --ifolder-path=/home/ifolder/7fe6cd5d-40d4-4982-bfa3-94292d4e36ab");
Console.WriteLine("\n\tFor Restoring Folder:");
- Console.WriteLine("\t\t$./ifolder-data-recovery --restore --path=/home/ifolder/SimiasFile/ --backup-admin=oldadmin --current-admin=admin --server-url=http://192.162.1.10 --ifolder-id=7fe6cd5d-40d4-4982-bfa3-94292d4e36ab --ifolder-path=/home/ifolder/recovery/data --relative-path=abc1if1/new folder");
+ Console.WriteLine("\t\t$./ifolder-data-recovery --restore --path=/home/recovery/data/ --backup-admin=admin --server-url=http://192.162.1.10 --ifolder-id=7fe6cd5d-40d4-4982-bfa3-94292d4e36ab --ifolder-path=/home/ifolder/7fe6cd5d-40d4-4982-bfa3-94292d4e36ab --relative-path=MyiFolder/Subdir");
Console.WriteLine("\n\tFor Restoring File:");
- Console.WriteLine("\t\t$./ifolder-data-recovery --restore --path=/home/ifolder/SimiasFile/ --backup-admin=oldadmin --current-admin=admin --server-url=http://192.162.1.10 --ifolder-id=7fe6cd5d-40d4-4982-bfa3-94292d4e36ab --ifolder-path=/home/ifolder/recovery/data --relative-path=abc1if1/new folder/qfrep.exe");
+ Console.WriteLine("\t\t$./ifolder-data-recovery --restore --path=/home/recovery/data/ --backup-admin=oldadmin --current-admin=admin --server-url=http://192.162.1.10 --ifolder-id=7fe6cd5d-40d4-4982-bfa3-94292d4e36ab --ifolder-path=/home/ifolder/7fe6cd5d-40d4-4982-bfa3-94292d4e36ab --relative-path=MyiFolder/Subdir/MyFile.txt");
Console.WriteLine("\n\tFor Retrying:");
- Console.WriteLine("\t\t$./ifolder-data-recovery --retry --path=/home/ifolder/SimiasFile/ --backup-admin=oldadmin --current-admin=admin --server-url=http://192.162.1.10 --ifolder-id=7fe6cd5d-40d4-4982-bfa3-94292d4e36ab --ifolder-path=/home/ifolder/recovery/data --relative-path=abc1if1/qfrep.exe\n");
+ Console.WriteLine("\t\t$./ifolder-data-recovery --retry --path=/home/recovery/data/ --backup-admin=oldadmin --current-admin=admin --server-url=http://192.162.1.10 --ifolder-id=7fe6cd5d-40d4-4982-bfa3-94292d4e36ab --ifolder-path=/home/ifolder/7fe6cd5d-40d4-4982-bfa3-94292d4e36ab --relative-path=MyiFolder/Subdir\n");
}
@@ -2934,6 +3151,9 @@
case (int)status.EmptyNewServerUrl:
Console.WriteLine("\n| Input Current Server IP is Empty. |");
break;
+ case (int)status.PolicyRestoreFailed:
+ Console.WriteLine("\n| iFolder Policy Restore Failed. |");
+ break;
default:
Console.WriteLine("\n| iFolder data restore Failed with error code: {0} |", result);
break;
@@ -2984,7 +3204,7 @@
public static long NumberOfLines(string fileName)
{
MainClass.DebugLog.Write(string.Format("Enter Function NumberOfLines for file:{0}",fileName));
- string line = null;
+ string line = null;
long numOfLines = 0;
TextReader reader = null;
if(fileName != null || fileName != string.Empty)
Modified: trunk/src/utils/restore/ifolder-data-recovery.8
===================================================================
--- trunk/src/utils/restore/ifolder-data-recovery.8 2010-05-26 12:31:14 UTC (rev 7379)
+++ trunk/src/utils/restore/ifolder-data-recovery.8 2010-05-27 05:40:32 UTC (rev 7380)
@@ -105,6 +105,11 @@
Relative path of the file or folder to be restored, starting from the iFolder name
.RE
.PP
+\-\-restore\-policies
+.RS 4
+ Overwrites current iFolder policies with the policies of the iFolder from backup
+.RE
+.PP
\-\-usewebaccess
.RS 4
Specifies the mode to restore. Does not take any value.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <js...@us...> - 2010-05-26 11:56:33
|
Revision: 7378
http://simias.svn.sourceforge.net/simias/?rev=7378&view=rev
Author: jshaju
Date: 2010-05-26 11:56:27 +0000 (Wed, 26 May 2010)
Log Message:
-----------
ID: fate#306428
Reviewer: anil
Localization Required: yes
Documentation Required: yes
Description: Updated help file for common proxy user support
Modified Paths:
--------------
trunk/src/admin/help/en/ldapsettings.html
Modified: trunk/src/admin/help/en/ldapsettings.html
===================================================================
--- trunk/src/admin/help/en/ldapsettings.html 2010-05-25 11:58:17 UTC (rev 7377)
+++ trunk/src/admin/help/en/ldapsettings.html 2010-05-26 11:56:27 UTC (rev 7378)
@@ -104,7 +104,7 @@
of the user list. Use the <i>Sync Now</i> option under <i>LDAP Details</i>
on the Server Details page to synchronize the iFolder user list on demand
and verify your new Proxy user settings.</P>
- </TD></TR>
+ </TD></TR>
<TR><TD VALIGN="TOP"><P>Proxy User Password </P></TD><TD>
<P>The password is used to authenticate the iFolder Proxy user to the
LDAP server when iFolder synchronizes users with the LDAP server. </P>
@@ -113,9 +113,7 @@
<P>This password must match the password stored in the iFolder Proxy user’s
eDirectory<sup><small>TM</small></sup> object. </P>
<P>Specify the password twice, then click <i>OK</i> to update the password stored in the LDAP settings.</P>
-
-
- </TD></TR><TR><TD VALIGN="TOP">
+<P>Note: If iFolder is configured to use OES common proxy, then the proxy user password must not be changed from iFolder Web Admin console.</P></TD></TR><TR><TD VALIGN="TOP">
<P>LDAP Contexts</P>
</TD><TD>
<P> Specify or edit the LDAP containers, groups, or users where iFolder
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <js...@us...> - 2010-05-25 11:58:24
|
Revision: 7377
http://simias.svn.sourceforge.net/simias/?rev=7377&view=rev
Author: jshaju
Date: 2010-05-25 11:58:17 +0000 (Tue, 25 May 2010)
Log Message:
-----------
ID: bug#401699
Reviewer: ravi
Localization Required: Yes
Documentation Required: No
Description: Updated help file to modify the help image path
Modified Paths:
--------------
trunk/src/webaccess/help/en/browse.html
trunk/src/webaccess/help/en/changepassword.html
trunk/src/webaccess/help/en/details.html
trunk/src/webaccess/help/en/history.html
trunk/src/webaccess/help/en/home.html
trunk/src/webaccess/help/en/index.html
trunk/src/webaccess/help/en/legalnotices.html
trunk/src/webaccess/help/en/login.html
trunk/src/webaccess/help/en/members.html
trunk/src/webaccess/help/en/newfolder.html
trunk/src/webaccess/help/en/newifolder.html
trunk/src/webaccess/help/en/search.html
trunk/src/webaccess/help/en/share.html
trunk/src/webaccess/help/en/upload.html
Property Changed:
----------------
trunk/src/webaccess/help/en/
Property changes on: trunk/src/webaccess/help/en
___________________________________________________________________
Added: tsvn:logtemplate
+ ID:
Reviewer:
Localization Required: No
Documentation Required: No
Description:
Modified: trunk/src/webaccess/help/en/browse.html
===================================================================
--- trunk/src/webaccess/help/en/browse.html 2010-05-25 11:50:15 UTC (rev 7376)
+++ trunk/src/webaccess/help/en/browse.html 2010-05-25 11:58:17 UTC (rev 7377)
@@ -36,7 +36,7 @@
<body bgcolor="white" marginwidth="0" marginheight="0" leftmargin="0" topmargin="0">
<!-- This is the start of the Help Banner Layer --> <div id="headgraphic">
<table border="0" cellspacing="0" cellpadding="0" width="100%" height="26" style="margin:0px; padding:0px; background-image: url(../../images/header_pattern.gif); background-repeat: repeat-x;">
-<tr> <td width="221"><img src="../../images/help_title.gif" alt="Novell iFolder" border="0" width="221" height="26"></td><td align="right" width="100%" class="tabCell" style="background-image: url(../../images/header_background.gif); background-repeat: no-repeat;">
+<tr> <td width="221"><img src="help_title.gif" alt="Novell iFolder" border="0" width="221" height="26"></td><td align="right" width="100%" class="tabCell" style="background-image: url(../../images/header_background.gif); background-repeat: no-repeat;">
</td></tr> </table></div><!-- This is end of the Help Banner Layer -->
<!-- This is the start of the Help Content Layer --> <div id="helpcontent" style="left: 10px; top: 38px">
<!-- The Page Heading uses CSS style "head3b". This creates an H3 header
Modified: trunk/src/webaccess/help/en/changepassword.html
===================================================================
--- trunk/src/webaccess/help/en/changepassword.html 2010-05-25 11:50:15 UTC (rev 7376)
+++ trunk/src/webaccess/help/en/changepassword.html 2010-05-25 11:58:17 UTC (rev 7377)
@@ -35,7 +35,7 @@
<body bgcolor="white" marginwidth="0" marginheight="0" leftmargin="0" topmargin="0">
<!-- This is the start of the Help Banner Layer --> <div id="headgraphic">
<table border="0" cellspacing="0" cellpadding="0" width="100%" height="26" style="margin:0px; padding:0px; background-image: url('../../images/header_pattern.gif'); background-repeat: repeat-x">
-<tr> <td width="221"><img src="../../images/help_title.gif" alt="Novell iFolder" border="0" width="221" height="26"></td>
+<tr> <td width="221"><img src="help_title.gif" alt="Novell iFolder" border="0" width="221" height="26"></td>
<td align="right" width="100%" class="tabCell" style="background-image: url('../../images/header_background.gif'); background-repeat: no-repeat">
</td></tr> </table></div><!-- This is end of the Help Banner Layer -->
<!-- This is the start of the Help Content Layer -->
Modified: trunk/src/webaccess/help/en/details.html
===================================================================
--- trunk/src/webaccess/help/en/details.html 2010-05-25 11:50:15 UTC (rev 7376)
+++ trunk/src/webaccess/help/en/details.html 2010-05-25 11:58:17 UTC (rev 7377)
@@ -39,7 +39,7 @@
leftmargin="0" topmargin="0">
<!-- This is the start of the Help Banner Layer --> <div id="headgraphic">
<table border="0" cellspacing="0" cellpadding="0" width="100%" height="26" style="margin:0px; padding:0px; background-image: url('../../images/header_pattern.gif'); background-repeat: repeat-x">
-<tr> <td width="221"><img src="../../images/help_title.gif" alt="Novell iFolder" border="0" width="221" height="26"></td>
+<tr> <td width="221"><img src="help_title.gif" alt="Novell iFolder" border="0" width="221" height="26"></td>
<td align="right" width="100%" class="tabCell" style="background-image: url('../../images/header_background.gif'); background-repeat: no-repeat"></td></tr></table></div><!-- This is end of the Help Banner Layer -->
<!-- This is the start of the Help Content Layer --> <div id="helpcontent">
<!-- The Page Heading uses CSS style "head3b". This creates an H3 header
Modified: trunk/src/webaccess/help/en/history.html
===================================================================
--- trunk/src/webaccess/help/en/history.html 2010-05-25 11:50:15 UTC (rev 7376)
+++ trunk/src/webaccess/help/en/history.html 2010-05-25 11:58:17 UTC (rev 7377)
@@ -40,7 +40,7 @@
leftmargin="0" topmargin="0">
<!-- This is the start of the Help Banner Layer --> <div id="headgraphic">
<table border="0" cellspacing="0" cellpadding="0" width="100%" height="26" style="margin:0px; padding:0px; background-image: url(../../images/header_pattern.gif); background-repeat: repeat-x;">
-<tr> <td width="221"><img src="../../images/help_title.gif" alt="Novell iFolder" border="0" width="221" height="26"></td><td align="right" width="100%" class="tabCell" style="background-image: url(../../images/header_background.gif); background-repeat: no-repeat;"></td></tr></table></div><!-- This is end of the Help Banner Layer -->
+<tr> <td width="221"><img src="help_title.gif" alt="Novell iFolder" border="0" width="221" height="26"></td><td align="right" width="100%" class="tabCell" style="background-image: url(../../images/header_background.gif); background-repeat: no-repeat;"></td></tr></table></div><!-- This is end of the Help Banner Layer -->
<!-- This is the start of the Help Content Layer --> <div id="helpcontent">
<!-- The Page Heading uses CSS style "head3b". This creates an H3 header
with a line beneath it.
Modified: trunk/src/webaccess/help/en/home.html
===================================================================
--- trunk/src/webaccess/help/en/home.html 2010-05-25 11:50:15 UTC (rev 7376)
+++ trunk/src/webaccess/help/en/home.html 2010-05-25 11:58:17 UTC (rev 7377)
@@ -36,7 +36,7 @@
<body bgcolor="white" marginwidth="0" marginheight="0" leftmargin="0" topmargin="0">
<!-- This is the start of the Help Banner Layer --> <div id="headgraphic">
<table border="0" cellspacing="0" cellpadding="0" width="100%" height="26" style="margin:0px; padding:0px; background-image: url(../../images/header_pattern.gif); background-repeat: repeat-x;">
-<tr> <td width="221"><img src="../../images/help_title.gif" alt="Novell iFolder" border="0" width="221" height="26"></td><td align="right" width="100%" class="tabCell" style="background-image: url(../../images/header_background.gif); background-repeat: no-repeat;">
+<tr> <td width="221"><img src="help_title.gif" alt="Novell iFolder" border="0" width="221" height="26"></td><td align="right" width="100%" class="tabCell" style="background-image: url(../../images/header_background.gif); background-repeat: no-repeat;">
</td></tr> </table></div><!-- This is end of the Help Banner Layer -->
<!-- This is the start of the Help Content Layer --> <div id="helpcontent" style="left: 10px; top: 38px">
<!-- The Page Heading uses CSS style "head3b". This creates an H3 header
Modified: trunk/src/webaccess/help/en/index.html
===================================================================
--- trunk/src/webaccess/help/en/index.html 2010-05-25 11:50:15 UTC (rev 7376)
+++ trunk/src/webaccess/help/en/index.html 2010-05-25 11:58:17 UTC (rev 7377)
@@ -36,7 +36,7 @@
<body bgcolor="white" marginwidth="0" marginheight="0" leftmargin="0" topmargin="0">
<!-- This is the start of the Help Banner Layer --> <div id="headgraphic">
<table border="0" cellspacing="0" cellpadding="0" width="100%" height="26" style="margin:0px; padding:0px; background-image: url(../../images/header_pattern.gif); background-repeat: repeat-x;">
-<tr> <td width="221"><img src="../../images/help_title.gif" alt="Novell iFolder" border="0" width="221" height="26"></td><td align="right" width="100%" class="tabCell" style="background-image: url(../../images/header_background.gif); background-repeat: no-repeat;">
+<tr> <td width="221"><img src="help_title.gif" alt="Novell iFolder" border="0" width="221" height="26"></td><td align="right" width="100%" class="tabCell" style="background-image: url(../../images/header_background.gif); background-repeat: no-repeat;">
</td></tr> </table></div><!-- This is end of the Help Banner Layer -->
<!-- This is the start of the Help Content Layer --> <div id="helpcontent" style="left: 10px; top: 38px">
<!-- The Page Heading uses CSS style "head3b". This creates an H3 header
Modified: trunk/src/webaccess/help/en/legalnotices.html
===================================================================
--- trunk/src/webaccess/help/en/legalnotices.html 2010-05-25 11:50:15 UTC (rev 7376)
+++ trunk/src/webaccess/help/en/legalnotices.html 2010-05-25 11:58:17 UTC (rev 7377)
@@ -39,7 +39,7 @@
leftmargin="0" topmargin="0">
<!-- This is the start of the Help Banner Layer --> <div id="headgraphic">
<table border="0" cellspacing="0" cellpadding="0" width="100%" height="26" style="margin:0px; padding:0px; background-image: url('../../images/header_pattern.gif'); background-repeat: repeat-x">
-<tr> <td width="221"> <img src="../../images/help_title.gif" alt="Novell iFolder" border="0" width="221" height="26"></td>
+<tr> <td width="221"> <img src="help_title.gif" alt="Novell iFolder" border="0" width="221" height="26"></td>
<td align="right" width="100%" class="tabCell" style="background-image: url('../../images/header_background.gif'); background-repeat: no-repeat"></td></tr></table></div><!-- This is end of the Help Banner Layer -->
<!-- This is the start of the Help Content Layer --> <div id="helpcontent"> <!-- The Page Heading uses CSS style "head3b". This creates an H3 header
with a line beneath it.
@@ -67,11 +67,7 @@
International Trade Services Web page </a> for more information on exporting
Novell software. Novell assumes no responsibility for your failure to obtain
any necessary export approvals.</p>
- <h3>Novell Trademarks</h3><p>For Novell trademarks, see <a href=http://www.novell.com/company/legal/ trademarks/tmlist.html>the Novell Trademark and Service Mark list</a> </p><h3>Third-Party Trademarks</h3><p>All third-party trademarks are
-the property of their respective owners.</p><h3>Documentation Conventions</h3><p>This
-documentation uses a greater-than symbol (>) to separate actions within a step
-and items in a cross-reference path.</p><p>A trademark symbol (<sup><small>®</small></sup>,
-<sup><small>TM</small></sup>) denotes a Novell trademark. An asterisk (*)
-denotes a third-party trademark.</p></div>
+ <h3> </h3>
+</div>
</body>
</html>
\ No newline at end of file
Modified: trunk/src/webaccess/help/en/login.html
===================================================================
--- trunk/src/webaccess/help/en/login.html 2010-05-25 11:50:15 UTC (rev 7376)
+++ trunk/src/webaccess/help/en/login.html 2010-05-25 11:58:17 UTC (rev 7377)
@@ -41,7 +41,7 @@
<!-- This is the start of the Help Banner Layer --> <div id="headgraphic">
<table border="0" cellspacing="0" cellpadding="0" width="100%" height="26" style="margin:0px; padding:0px; background-image: url(../../images/header_pattern.gif); background-repeat: repeat-x;">
<tr>
- <td width="221"><img src="../../images/help_title.gif" alt="Novell iFolder" border="0" width="221" height="26"></td>
+ <td width="221"><img src="help_title.gif" alt="Novell iFolder" border="0" width="221" height="26"></td>
<td align="right" width="100%" class="tabCell" style="background-image: url(../../images/header_background.gif); background-repeat: no-repeat;"></td></tr></table></div><!-- This is end of the Help Banner Layer -->
<!-- This is the start of the Help Content Layer --> <div id="helpcontent">
<!-- The Page Heading uses CSS style "head3b". This creates an H3 header
Modified: trunk/src/webaccess/help/en/members.html
===================================================================
--- trunk/src/webaccess/help/en/members.html 2010-05-25 11:50:15 UTC (rev 7376)
+++ trunk/src/webaccess/help/en/members.html 2010-05-25 11:58:17 UTC (rev 7377)
@@ -35,7 +35,7 @@
<body bgcolor="white" marginwidth="0" marginheight="0" leftmargin="0" topmargin="0">
<!-- This is the start of the Help Banner Layer --> <div id="headgraphic">
<table border="0" cellspacing="0" cellpadding="0" width="100%" height="26" style="margin:0px; padding:0px; background-image: url('../../images/header_pattern.gif'); background-repeat: repeat-x">
-<tr> <td width="221"><img src="../../images/help_title.gif" alt="Novell iFolder" border="0" width="221" height="26"></td>
+<tr> <td width="221"><img src="help_title.gif" alt="Novell iFolder" border="0" width="221" height="26"></td>
<td align="right" width="100%" class="tabCell" style="background-image: url('../../images/header_background.gif'); background-repeat: no-repeat">
</td></tr> </table></div><!-- This is end of the Help Banner Layer -->
<!-- This is the start of the Help Content Layer --> <div id="helpcontent" style="left: 10px; top: 38px">
Modified: trunk/src/webaccess/help/en/newfolder.html
===================================================================
--- trunk/src/webaccess/help/en/newfolder.html 2010-05-25 11:50:15 UTC (rev 7376)
+++ trunk/src/webaccess/help/en/newfolder.html 2010-05-25 11:58:17 UTC (rev 7377)
@@ -36,7 +36,7 @@
<body bgcolor="white" marginwidth="0" marginheight="0" leftmargin="0" topmargin="0">
<!-- This is the start of the Help Banner Layer --> <div id="headgraphic">
<table border="0" cellspacing="0" cellpadding="0" width="100%" height="26" style="margin:0px; padding:0px; background-image: url(../../images/header_pattern.gif); background-repeat: repeat-x;">
-<tr> <td width="221"><img src="../../images/help_title.gif" alt="Novell iFolder" border="0" width="221" height="26"></td><td align="right" width="100%" class="tabCell" style="background-image: url(../../images/header_background.gif); background-repeat: no-repeat;">
+<tr> <td width="221"><img src="help_title.gif" alt="Novell iFolder" border="0" width="221" height="26"></td><td align="right" width="100%" class="tabCell" style="background-image: url(../../images/header_background.gif); background-repeat: no-repeat;">
</td></tr> </table></div><!-- This is end of the Help Banner Layer -->
<!-- This is the start of the Help Content Layer -->
<div id="helpcontent" style="left: 10px; top: 38px">
Modified: trunk/src/webaccess/help/en/newifolder.html
===================================================================
--- trunk/src/webaccess/help/en/newifolder.html 2010-05-25 11:50:15 UTC (rev 7376)
+++ trunk/src/webaccess/help/en/newifolder.html 2010-05-25 11:58:17 UTC (rev 7377)
@@ -36,7 +36,7 @@
<body bgcolor="white" marginwidth="0" marginheight="0" leftmargin="0" topmargin="0">
<!-- This is the start of the Help Banner Layer --> <div id="headgraphic">
<table border="0" cellspacing="0" cellpadding="0" width="100%" height="26" style="margin:0px; padding:0px; background-image: url(../../images/header_pattern.gif); background-repeat: repeat-x;">
-<tr> <td width="221"><img src="../../images/help_title.gif" alt="Novell iFolder" border="0" width="221" height="26"></td><td align="right" width="100%" class="tabCell" style="background-image: url(../../images/header_background.gif); background-repeat: no-repeat;">
+<tr> <td width="221"><img src="help_title.gif" alt="Novell iFolder" border="0" width="221" height="26"></td><td align="right" width="100%" class="tabCell" style="background-image: url(../../images/header_background.gif); background-repeat: no-repeat;">
</td></tr> </table></div><!-- This is end of the Help Banner Layer -->
<!-- This is the start of the Help Content Layer -->
<div id="helpcontent" style="left: 10px; top: 38px"><!-- The Page Heading uses CSS style "head3b". This creates an H3 header
@@ -57,12 +57,10 @@
<p><strong>Note: </strong> Do not use the following invalid characters in
the names of iFolders or in the names of folders and files in them:</p>
\/:*?"<>|;<br>
- <p>For more information on naming conventions, see Section 7.3 in the <A HREF="http://www.novell.com/documentation/ifolder3/ifolder36_user/data/bookinfo.html">iFolder
- Cross Platfrom User Guide </A>.</p>
<p><strong>IMPORTANT: </strong>When you attempt to create an iFolder whose
name exceeds the file limit supported by the iFolder server file system,
it throws an error message that the name of the iFolder is too long to
- be created.</p>
+ be created.</p>
<BR>
<B> Description</B><BR>
A short description of the iFolder.<br>
Modified: trunk/src/webaccess/help/en/search.html
===================================================================
--- trunk/src/webaccess/help/en/search.html 2010-05-25 11:50:15 UTC (rev 7376)
+++ trunk/src/webaccess/help/en/search.html 2010-05-25 11:58:17 UTC (rev 7377)
@@ -36,7 +36,7 @@
<body bgcolor="white" marginwidth="0" marginheight="0" leftmargin="0" topmargin="0">
<!-- This is the start of the Help Banner Layer --> <div id="headgraphic">
<table border="0" cellspacing="0" cellpadding="0" width="100%" height="26" style="margin:0px; padding:0px; background-image: url(../../images/header_pattern.gif); background-repeat: repeat-x;">
-<tr> <td width="221"><img src="../../images/help_title.gif" alt="Novell iFolder" border="0" width="221" height="26"></td><td align="right" width="100%" class="tabCell" style="background-image: url(../../images/header_background.gif); background-repeat: no-repeat;">
+<tr> <td width="221"><img src="help_title.gif" alt="Novell iFolder" border="0" width="221" height="26"></td><td align="right" width="100%" class="tabCell" style="background-image: url(../../images/header_background.gif); background-repeat: no-repeat;">
</td></tr> </table></div><!-- This is end of the Help Banner Layer -->
<!-- This is the start of the Help Content Layer --> <div id="helpcontent" style="left: 10px; top: 38px">
<!-- The Page Heading uses CSS style "head3b". This creates an H3 header
Modified: trunk/src/webaccess/help/en/share.html
===================================================================
--- trunk/src/webaccess/help/en/share.html 2010-05-25 11:50:15 UTC (rev 7376)
+++ trunk/src/webaccess/help/en/share.html 2010-05-25 11:58:17 UTC (rev 7377)
@@ -36,7 +36,7 @@
<body bgcolor="white" marginwidth="0" marginheight="0" leftmargin="0" topmargin="0">
<!-- This is the start of the Help Banner Layer --> <div id="headgraphic">
<table border="0" cellspacing="0" cellpadding="0" width="100%" height="26" style="margin:0px; padding:0px; background-image: url(../../images/header_pattern.gif); background-repeat: repeat-x;">
-<tr> <td width="221"><img src="../../images/help_title.gif" alt="Novell iFolder" border="0" width="221" height="26"></td><td align="right" width="100%" class="tabCell" style="background-image: url(../../images/header_background.gif); background-repeat: no-repeat;">
+<tr> <td width="221"><img src="help_title.gif" alt="Novell iFolder" border="0" width="221" height="26"></td><td align="right" width="100%" class="tabCell" style="background-image: url(../../images/header_background.gif); background-repeat: no-repeat;">
</td></tr> </table></div><!-- This is end of the Help Banner Layer -->
<!-- This is the start of the Help Content Layer --> <div id="helpcontent" style="left: 10px; top: 38px">
<!-- The Page Heading uses CSS style "head3b". This creates an H3 header
Modified: trunk/src/webaccess/help/en/upload.html
===================================================================
--- trunk/src/webaccess/help/en/upload.html 2010-05-25 11:50:15 UTC (rev 7376)
+++ trunk/src/webaccess/help/en/upload.html 2010-05-25 11:58:17 UTC (rev 7377)
@@ -35,7 +35,7 @@
<body bgcolor="white" marginwidth="0" marginheight="0" leftmargin="0" topmargin="0">
<!-- This is the start of the Help Banner Layer --> <div id="headgraphic">
<table border="0" cellspacing="0" cellpadding="0" width="100%" height="26" style="margin:0px; padding:0px; background-image: url('../../images/header_pattern.gif'); background-repeat: repeat-x">
-<tr> <td width="221"><img src="../../images/help_title.gif" alt="Novell iFolder" border="0" width="221" height="26"></td>
+<tr> <td width="221"><img src="help_title.gif" alt="Novell iFolder" border="0" width="221" height="26"></td>
<td align="right" width="100%" class="tabCell" style="background-image: url('../../images/header_background.gif'); background-repeat: no-repeat">
</td></tr> </table></div><!-- This is end of the Help Banner Layer -->
<!-- This is the start of the Help Content Layer --> <div id="helpcontent" style="left: 10px; top: 38px">
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ra...@us...> - 2010-05-25 11:42:12
|
Revision: 7375
http://simias.svn.sourceforge.net/simias/?rev=7375&view=rev
Author: ravim85
Date: 2010-05-25 11:42:05 +0000 (Tue, 25 May 2010)
Log Message:
-----------
Linguistic errors on admin page. N/A was shown in English. Issue is
fixed
Modified Paths:
--------------
trunk/src/admin/ProvisionUsers.aspx.cs
trunk/src/admin/ServerDetails.aspx.cs
trunk/src/admin/Users.aspx.cs
trunk/src/admin/iFolderDetailsPage.aspx.cs
trunk/src/admin/userMove.aspx.cs
Modified: trunk/src/admin/ProvisionUsers.aspx.cs
===================================================================
--- trunk/src/admin/ProvisionUsers.aspx.cs 2010-05-25 11:34:05 UTC (rev 7374)
+++ trunk/src/admin/ProvisionUsers.aspx.cs 2010-05-25 11:42:05 UTC (rev 7375)
@@ -310,7 +310,7 @@
{
string [] ProvisioningListStr = new string [ProvisioningListStrTemp.Length + 1];
/// making 1st entry of dropdownlist as None
- ProvisioningListStr[0] = "N/A";
+ ProvisioningListStr[0] = GetString("NOTAPPLICABLE");
for (int i = 1; i <= ProvisioningListStrTemp.Length ; i++)
ProvisioningListStr[i] = String.Copy(ProvisioningListStrTemp[i-1]);
return ProvisioningListStr;
@@ -527,7 +527,7 @@
protected void OnSelectServerList_Changed(Object sender, EventArgs e)
{
string SelectedServerName = SelectServerList.SelectedItem.Text;
- if( SelectedServerName.Equals("N/A"))
+ if( SelectedServerName.Equals(GetString("NOTAPPLICABLE")))
{
OkButton.Enabled = false;
}
Modified: trunk/src/admin/ServerDetails.aspx.cs
===================================================================
--- trunk/src/admin/ServerDetails.aspx.cs 2010-05-25 11:34:05 UTC (rev 7374)
+++ trunk/src/admin/ServerDetails.aspx.cs 2010-05-25 11:42:05 UTC (rev 7375)
@@ -483,7 +483,7 @@
}
catch
{
- reports.Add ("N/A");
+ reports.Add (GetString("NOTAPPLICABLE"));
}
if (files == null || files.Length == 0) {
Modified: trunk/src/admin/Users.aspx.cs
===================================================================
--- trunk/src/admin/Users.aspx.cs 2010-05-25 11:34:05 UTC (rev 7374)
+++ trunk/src/admin/Users.aspx.cs 2010-05-25 11:42:05 UTC (rev 7375)
@@ -568,7 +568,7 @@
{
string [] ProvisioningListStr = new string [ProvisioningListStrTemp.Length + 1];
/// making 1st entry of dropdownlist as None
- ProvisioningListStr[0] = "N/A";
+ ProvisioningListStr[0] = GetString("NOTAPPLICABLE");
for (int i = 1; i <= ProvisioningListStrTemp.Length ; i++)
ProvisioningListStr[i] = String.Copy(ProvisioningListStrTemp[i-1]);
return ProvisioningListStr;
@@ -576,7 +576,7 @@
else
{
string [] ProvisioningListStrNA = new string [ 1 ];
- ProvisioningListStrNA[0] = "N/A";
+ ProvisioningListStrNA[0] = GetString("NOTAPPLICABLE");
return ProvisioningListStrNA;
}
}
@@ -852,7 +852,7 @@
DataGridItem item = ServerProvisioningList.Parent.Parent as DataGridItem;
string SelectedName = ServerProvisioningList.SelectedItem.Text;
string UserID = item.Cells[ AccountsIDColumn ].Text;
- if(SelectedName.Equals("N/A"))
+ if(SelectedName.Equals(GetString("NOTAPPLICABLE")))
{
/// remove entry fron hashtable, if any for this userid
if(ServerProvisioningNames.ContainsKey(UserID))
Modified: trunk/src/admin/iFolderDetailsPage.aspx.cs
===================================================================
--- trunk/src/admin/iFolderDetailsPage.aspx.cs 2010-05-25 11:34:05 UTC (rev 7374)
+++ trunk/src/admin/iFolderDetailsPage.aspx.cs 2010-05-25 11:42:05 UTC (rev 7375)
@@ -554,7 +554,7 @@
dr[1] = false;
dr[2] = user.ID;
dr[3] = user.FullName;
- dr[4] = "<font color=red>N/A</font>";
+ dr[4] = String.Format("<font color=red>" + GetString("NOTAPPLICABLE") + "</font>");
dt.Rows.Add(dr);
Modified: trunk/src/admin/userMove.aspx.cs
===================================================================
--- trunk/src/admin/userMove.aspx.cs 2010-05-25 11:34:05 UTC (rev 7374)
+++ trunk/src/admin/userMove.aspx.cs 2010-05-25 11:42:05 UTC (rev 7375)
@@ -448,7 +448,7 @@
DataGridItem item = ServerProvisioningList.Parent.Parent as DataGridItem;
string SelectedName = ServerProvisioningList.SelectedItem.Text;
string UserID = item.Cells[ AccountsIDColumn ].Text;
- if(SelectedName.Equals("N/A"))
+ if(SelectedName.Equals(GetString("NOTAPPLICABLE")))
{
/// remove entry fron hashtable, if any for this userid
if(ServerProvisioningNames.ContainsKey(UserID))
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|