]> git.sur5r.net Git - bacula/bacula/commitdiff
Add more debug to SD for Autochangers + status output.
authorKern Sibbald <kern@sibbald.com>
Mon, 16 May 2005 09:35:29 +0000 (09:35 +0000)
committerKern Sibbald <kern@sibbald.com>
Mon, 16 May 2005 09:35:29 +0000 (09:35 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@2050 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/kernstodo
bacula/kes-1.37
bacula/src/dird/ua_cmds.c
bacula/src/stored/autochanger.c
bacula/src/stored/status.c
bacula/src/stored/stored_conf.h

index 3e2c57fb8b07475b95acea1a2353c6c1c113ec9f..e7401431b107a6cd0334fd8f6734975f1d7c94ce 100644 (file)
@@ -75,6 +75,7 @@ For 1.37:
 - Fix the Rescue CDROM.
 
 Maybe in 1.37:
+- Add ClientDefs similar to JobDefs.
 - Print more info when bextract -p accepts a bad block.
 - To mark files as deleted, run essentially a Verify to disk, and
   when a file is found missing (MarkId != JobId), then create
@@ -332,7 +333,9 @@ Documentation to do: (any release a little bit at a time)
 
 
 ===================================
-  
+- Add macro expansions in JobDefs.
+  Run Before Job = "SomeFile %{Level} %{Client}"
+  Write Bootstrap="/some/dir/%{JobName}_%{Client}.bsr"
 - Use non-blocking network I/O but if no data is available, use
   select().
 - Use gather write() for network I/O.
index 9f6a28e16364c9e55f18b46596407a2b6301e2b1..b371bbde63946eeddfffde620353d34c5042e027 100644 (file)
@@ -5,6 +5,7 @@ General:
 
 Changes to 1.37.18:
 16May05
+- Add more debug to SD for Autochangers + status output.
 - Add Scratch to PoolType in PostgreSQL make...tables and do not
   permit NULL PoolTypes. Fix for bug 319 reported by Eric.
 - Update LICENSE.
index 001caca19a0b4349575f515873051a5145e50583..77aedf191e52bb695ac934abd40d0620f93e6667 100644 (file)
@@ -125,7 +125,7 @@ static struct cmdstruct commands[] = {
  { N_("trace"),      trace_cmd,     _("turn on/off trace to file")},
  { N_("unmount"),    unmount_cmd,   _("unmount <storage-name>")},
  { N_("umount"),     unmount_cmd,   _("umount <storage-name> for old-time Unix guys")},
- { N_("update"),     update_cmd,    _("update Volume or Pool")},
+ { N_("update"),     update_cmd,    _("update Volume, Pool or slots")},
  { N_("use"),        use_cmd,       _("use catalog xxx")},
  { N_("var"),        var_cmd,       _("does variable expansion")},
  { N_("version"),    version_cmd,   _("print Director version")},
index 84bfae83f1c33854556fa6bf9cade75d8a89d7be..503282039cbd61d45f0a1f4081b9ac7f02532cdd 100644 (file)
@@ -229,7 +229,8 @@ bool autochanger_cmd(DCR *dcr, BSOCK *dir, const char *cmd)
 
    if (!dev_cap(dev, CAP_AUTOCHANGER) || !dcr->device->changer_name ||
        !dcr->device->changer_command) {
-      bnet_fsend(dir, _("3993 Not a autochanger device.\n"));
+      bnet_fsend(dir, _("3993 Device %s not an autochanger device.\n"),
+         dev->print_name());
       return false;
    }
 
@@ -273,7 +274,7 @@ bool autochanger_cmd(DCR *dcr, BSOCK *dir, const char *cmd)
    bpipe = open_bpipe(changer, timeout, "r");
    if (!bpipe) {
       unlock_changer(dcr);
-      bnet_fsend(dir, _("3993 Open bpipe failed.\n"));
+      bnet_fsend(dir, _("3996 Open bpipe failed.\n"));
       goto bail_out;
    }
    if (strcmp(cmd, "list") == 0) {
index 093e91e374a06a622662cfe07d58e1e4df015050..dc18ca4290d300f9f8be97aae093cee472dd026f 100644 (file)
@@ -61,6 +61,7 @@ static const char *level_to_str(int level);
 bool status_cmd(JCR *jcr)
 {
    DEVRES *device;
+   AUTOCHANGER *changer;
    DEVICE *dev;
    BSOCK *user = jcr->dir_bsock;
    char dt[MAX_TIME_LENGTH];
@@ -96,6 +97,17 @@ bool status_cmd(JCR *jcr)
     */
    bnet_fsend(user, _("\nDevice status:\n"));
 // LockRes();
+   foreach_res(changer, R_AUTOCHANGER) {
+      bnet_fsend(user, _("Autochanger \"%s\" with devices:\n"),
+         changer->hdr.name);
+      foreach_alist(device, changer->device) {
+         if (device->dev) {
+            bnet_fsend(user, "   %s\n", device->dev->print_name());
+         } else {
+            bnet_fsend(user, "   %s\n", device->hdr.name);
+         }
+      }
+   }
    foreach_res(device, R_DEVICE) {
       dev = device->dev;
       if (dev && dev->is_open()) {
index e51720e8a9a97fc6cebac3678cc63f9c653096bc..8819f3cc98972345b3f79a1619b301b77bede4e4 100644 (file)
@@ -52,7 +52,7 @@ public:
    int monitor;                       /* Have only access to status and .status functions */
 #ifdef HAVE_TLS
    int tls_enable;                    /* Enable TLS */
-   int tls_require;                  /* Require TLS */
+   int tls_require;                   /* Require TLS */
    int tls_verify_peer;              /* TLS Verify Client Certificate */
    char *tls_ca_certfile;             /* TLS CA Certificate File */
    char *tls_ca_certdir;              /* TLS CA Certificate Directory */
@@ -82,7 +82,7 @@ public:
    utime_t heartbeat_interval;        /* Interval to send hb to FD */
 #ifdef HAVE_TLS
    int tls_enable;                    /* Enable TLS */
-   int tls_require;                  /* Require TLS */
+   int tls_require;                   /* Require TLS */
    int tls_verify_peer;              /* TLS Verify Client Certificate */
    char *tls_ca_certfile;             /* TLS CA Certificate File */
    char *tls_ca_certdir;              /* TLS CA Certificate Directory */
@@ -99,7 +99,7 @@ typedef struct s_res_store STORES;
 class AUTOCHANGER {
 public:
    RES hdr;
-   alist *device;
+   alist *device;                     /* List of DEVRES device pointers */
    char *changer_name;                /* Changer device name */
    char *changer_command;             /* Changer command  -- external program */
    pthread_mutex_t changer_mutex;     /* One changer operation at a time */