]> dgit.raspbian.org Git - git-annex.git/commitdiff
make extendcluster also updatecluster
authorJoey Hess <joeyh@joeyh.name>
Thu, 27 Jun 2024 19:34:45 +0000 (15:34 -0400)
committerJoey Hess <joeyh@joeyh.name>
Thu, 27 Jun 2024 19:34:45 +0000 (15:34 -0400)
This avoids the user forgetting to do it and simplifies the
documentation.

Command/ExtendCluster.hs
doc/clusters.mdwn
doc/git-annex-extendcluster.mdwn

index 6fa248d57a084ab80ba0143c014bd8fd04040447..21e65903f1eeeadd3294a05643fcfcc661562c1d 100644 (file)
@@ -15,6 +15,7 @@ import Types.Cluster
 import Config
 import Types.GitConfig
 import qualified Remote
+import qualified Command.UpdateCluster
 
 import qualified Data.Map as M
 
@@ -27,7 +28,9 @@ seek (remotename:clustername:[]) = Remote.byName (Just clusterremotename) >>= \c
        Just clusterremote -> Remote.byName (Just remotename) >>= \case
                Just gatewayremote -> 
                        case mkClusterUUID (Remote.uuid clusterremote) of
-                               Just cu -> commandAction $ start cu clustername gatewayremote
+                               Just cu -> do
+                                       commandAction $ start cu clustername gatewayremote
+                                       Command.UpdateCluster.seek []
                                Nothing -> giveup $ clusterremotename 
                                        ++ " is not a cluster remote."
                Nothing -> giveup $ "No remote named " ++ remotename ++ " exists."
index e26163a88e1e10e3f7c0824b4d789c2f9f0dfe1f..1a4a70ae97001428664316042ce5b087c7a52b70 100644 (file)
@@ -168,7 +168,6 @@ for NYC, and extending the cluster to there as well:
     AMS$ git remote add NYC me@nyc.example.com:annex
     AMS$ git-annex sync NYC
     NYC$ git-annex extendcluster NYC mycluster
-    AMS$ git-annex updatecluster
 
 A user can now add either AMS or NYC as a remote, and will have access
 to the entire cluster as either `AMS-mycluster` or `NYC-mycluster`.
index 79796fe6e839bc3a80a0d0a0c648e3b4bb0acc81..9674cc9d15102d533483ac2f9984883a5afe0778 100644 (file)
@@ -17,8 +17,12 @@ The `clustername` parameter is the name of the cluster.
 
 The next step after running this command is to configure
 any additional cluster nodes that this gateway serves to the cluster,
-then run [[git-annex-updatecluster]] on each gateway. 
-See the documentation of that command for details about configuring nodes.
+then run [[git-annex-updatecluster]]. See the documentation of that
+command for details about configuring nodes.
+
+After running this command in the new gateway repository, it typically
+also needs to be run in the other gateway repositories as well, 
+after adding the new gateway repository as a remote.
 
 # OPTIONS