From: Kern Sibbald Date: Mon, 16 May 2005 09:35:29 +0000 (+0000) Subject: Add more debug to SD for Autochangers + status output. X-Git-Tag: Release-7.0.0~8777 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=118517974fcd2c2cae193018ee35b6f2e16879ef;p=bacula%2Fbacula Add more debug to SD for Autochangers + status output. git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@2050 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/bacula/kernstodo b/bacula/kernstodo index 3e2c57fb8b..e7401431b1 100644 --- a/bacula/kernstodo +++ b/bacula/kernstodo @@ -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. diff --git a/bacula/kes-1.37 b/bacula/kes-1.37 index 9f6a28e163..b371bbde63 100644 --- a/bacula/kes-1.37 +++ b/bacula/kes-1.37 @@ -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. diff --git a/bacula/src/dird/ua_cmds.c b/bacula/src/dird/ua_cmds.c index 001caca19a..77aedf191e 100644 --- a/bacula/src/dird/ua_cmds.c +++ b/bacula/src/dird/ua_cmds.c @@ -125,7 +125,7 @@ static struct cmdstruct commands[] = { { N_("trace"), trace_cmd, _("turn on/off trace to file")}, { N_("unmount"), unmount_cmd, _("unmount ")}, { N_("umount"), unmount_cmd, _("umount 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")}, diff --git a/bacula/src/stored/autochanger.c b/bacula/src/stored/autochanger.c index 84bfae83f1..503282039c 100644 --- a/bacula/src/stored/autochanger.c +++ b/bacula/src/stored/autochanger.c @@ -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) { diff --git a/bacula/src/stored/status.c b/bacula/src/stored/status.c index 093e91e374..dc18ca4290 100644 --- a/bacula/src/stored/status.c +++ b/bacula/src/stored/status.c @@ -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()) { diff --git a/bacula/src/stored/stored_conf.h b/bacula/src/stored/stored_conf.h index e51720e8a9..8819f3cc98 100644 --- a/bacula/src/stored/stored_conf.h +++ b/bacula/src/stored/stored_conf.h @@ -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 */