commit cdec2d6c316ace1f4d7a25f903573ce0b44fa780
Merge: 4177516 edc6dbc
Author: Klaus Aehlig <[email protected]>
Date:   Tue Apr 29 13:00:57 2014 +0200

    Merge branch 'stable-2.10' into stable-2.11
    
    * stable-2.10
      Set correct Ganeti version on setup commands
      Add a utility to combine shell commands
      Add design doc for performance tests
    
    Conflicts:
        Makefile.am
        doc/design-draft.rst
        lib/bootstrap.py
    Resolution:
        always take all additions
    
    Signed-off-by: Klaus Aehlig <[email protected]>

diff --cc Makefile.am
index a31d92f,2ce5b24..efacbf8
--- a/Makefile.am
+++ b/Makefile.am
@@@ -547,11 -532,11 +547,13 @@@ docinput = 
        doc/design-openvswitch.rst \
        doc/design-opportunistic-locking.rst \
        doc/design-optables.rst \
 +      doc/design-os.rst \
        doc/design-ovf-support.rst \
        doc/design-partitioned.rst \
+       doc/design-performance-tests.rst \
+       doc/design-query-splitting.rst \
        doc/design-query2.rst \
 +      doc/design-query-splitting.rst \
        doc/design-reason-trail.rst \
        doc/design-resource-model.rst \
        doc/design-restricted-commands.rst \
diff --cc doc/design-draft.rst
index deeb924,81faa80..6c87b04
--- a/doc/design-draft.rst
+++ b/doc/design-draft.rst
@@@ -18,8 -19,7 +18,9 @@@ Design document draft
     design-ceph-ganeti-support.rst
     design-daemons.rst
     design-hsqueeze.rst
 +   design-os.rst
 +   design-node-security.rst
+    design-performance-tests.rst
  
  .. vim: set textwidth=72 :
  .. Local Variables:
diff --cc lib/bootstrap.py
index 3c32d4a,1735b7d..9cd7f2b
--- a/lib/bootstrap.py
+++ b/lib/bootstrap.py
@@@ -308,18 -311,39 +308,43 @@@ def RunNodeSetupCmd(cluster_name, node
    if verbose:
      cmd.append("--verbose")
  
+   logging.debug("Node setup command: %s", cmd)
+ 
+   version = constants.DIR_VERSION
+   all_cmds = [["test", "-d", os.path.join(pathutils.PKGLIBDIR, version)]]
+   if constants.HAS_GNU_LN:
+     all_cmds.extend([["ln", "-s", "-f", "-T",
+                       os.path.join(pathutils.PKGLIBDIR, version),
+                       os.path.join(pathutils.SYSCONFDIR, "ganeti/lib")],
+                      ["ln", "-s", "-f", "-T",
+                       os.path.join(pathutils.SHAREDIR, version),
+                       os.path.join(pathutils.SYSCONFDIR, "ganeti/share")]])
+   else:
+     all_cmds.extend([["rm", "-f",
+                       os.path.join(pathutils.SYSCONFDIR, "ganeti/lib")],
+                      ["ln", "-s", "-f",
+                       os.path.join(pathutils.PKGLIBDIR, version),
+                       os.path.join(pathutils.SYSCONFDIR, "ganeti/lib")],
+                      ["rm", "-f",
+                       os.path.join(pathutils.SYSCONFDIR, "ganeti/share")],
+                      ["ln", "-s", "-f",
+                       os.path.join(pathutils.SHAREDIR, version),
+                       os.path.join(pathutils.SYSCONFDIR, "ganeti/share")]])
+   all_cmds.append(cmd)
+ 
 +  if port is None:
 +    port = netutils.GetDaemonPort(constants.SSH)
 +
    family = ssconf.SimpleStore().GetPrimaryIPFamily()
    srun = ssh.SshRunner(cluster_name,
                         ipv6=(family == netutils.IP6Address.family))
    scmd = srun.BuildCmd(node, constants.SSH_LOGIN_USER,
-                        utils.ShellQuoteArgs(cmd),
+                        utils.ShellQuoteArgs(
+                            utils.ShellCombineCommands(all_cmds)),
                         batch=False, ask_key=ask_key, quiet=False,
                         strict_host_check=strict_host_check,
 -                       use_cluster_key=use_cluster_key)
 +                       use_cluster_key=use_cluster_key,
 +                       port=port)
  
    tempfh = tempfile.TemporaryFile()
    try:

-- 
Klaus Aehlig
Google Germany GmbH, Dienerstr. 12, 80331 Muenchen
Registergericht und -nummer: Hamburg, HRB 86891
Sitz der Gesellschaft: Hamburg
Geschaeftsfuehrer: Graham Law, Christine Elizabeth Flores

Reply via email to