[sanlock] branch master updated: sanlock: include full host name in
log
by pagure@pagure.io
This is an automated email from the git hooks/post-receive script.
teigland pushed a commit to branch master
in repository sanlock.
The following commit(s) were added to refs/heads/master by this push:
new cff3488 sanlock: include full host name in log
cff3488 is described below
commit cff348800722f7dadf030ffe7494c2df714996e3
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Tue Dec 17 11:26:55 2019 -0600
sanlock: include full host name in log
---
src/main.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/main.c b/src/main.c
index a8a0bf5..5d2a9b6 100644
--- a/src/main.c
+++ b/src/main.c
@@ -1641,6 +1641,7 @@ static void helper_dead(int ci GNUC_UNUSED)
static int do_daemon(void)
{
+ struct utsname nodename;
int fd, rv;
run_dir = env_get(SANLOCK_RUN_DIR, DEFAULT_RUN_DIR);
@@ -1700,7 +1701,9 @@ static int do_daemon(void)
setup_uid_gid();
- log_warn("sanlock daemon started %s host %s", VERSION, our_host_name_global);
+ uname(&nodename);
+
+ log_warn("sanlock daemon started %s host %s (%s)", VERSION, our_host_name_global, nodename.nodename);
setup_priority();
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
4 years, 3 months
[sanlock] 02/02: sanlock: check for invalid args
by pagure@pagure.io
This is an automated email from the git hooks/post-receive script.
teigland pushed a commit to branch master
in repository sanlock.
commit a8e3e326faf4acd33562ae9e19835007f724d65f
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Mon Dec 2 10:09:01 2019 -0600
sanlock: check for invalid args
---
src/client.c | 3 +++
src/main.c | 11 +++++++----
2 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/src/client.c b/src/client.c
index 1cf6029..89fb68e 100644
--- a/src/client.c
+++ b/src/client.c
@@ -1909,6 +1909,9 @@ int sanlock_res_to_str(struct sanlk_resource *res, char **str_ret)
char *str;
int ret, len, pos, d;
+ if (!res)
+ return -EINVAL;
+
str = malloc(SANLK_MAX_RES_STR + 1);
if (!str)
return -ENOMEM;
diff --git a/src/main.c b/src/main.c
index 9538cc5..a8a0bf5 100644
--- a/src/main.c
+++ b/src/main.c
@@ -1402,6 +1402,7 @@ static void setup_host_name(void)
struct utsname name;
char uuid[37];
uuid_t uu;
+ int ret;
memset(rand_state, 0, sizeof(rand_state));
initstate(time(NULL), rand_state, sizeof(rand_state));
@@ -1423,8 +1424,10 @@ static void setup_host_name(void)
uuid_generate(uu);
uuid_unparse_lower(uu, uuid);
- snprintf(our_host_name_global, NAME_ID_SIZE, "%s.%s",
- uuid, name.nodename);
+ ret = snprintf(our_host_name_global, NAME_ID_SIZE, "%s.", uuid);
+
+ if (ret < NAME_ID_SIZE)
+ memcpy(our_host_name_global+ret, name.nodename, NAME_ID_SIZE-ret);
}
static void setup_limits(void)
@@ -3435,7 +3438,7 @@ out:
static int do_direct_init(void)
{
char *res_str = NULL;
- int rv;
+ int rv = -EINVAL;
if (com.lockspace.host_id_disk.path[0]) {
if (com.sector_size)
@@ -3452,7 +3455,7 @@ static int do_direct_init(void)
rv = direct_write_lockspace(&main_task, &com.lockspace,
com.io_timeout_arg);
- } else {
+ } else if (com.res_args[0]) {
if (com.sector_size)
com.res_args[0]->flags |= sanlk_res_sector_size_to_flag(com.sector_size);
if (com.align_size)
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
4 years, 3 months
[sanlock] 01/02: sanlock: include -H in man page
by pagure@pagure.io
This is an automated email from the git hooks/post-receive script.
teigland pushed a commit to branch master
in repository sanlock.
commit 150a24732ef09e5e5d4a9723566857aa645fdde6
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Mon Sep 9 10:27:51 2019 -0500
sanlock: include -H in man page
---
src/sanlock.8 | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/sanlock.8 b/src/sanlock.8
index 0bc38ea..8232c47 100644
--- a/src/sanlock.8
+++ b/src/sanlock.8
@@ -587,6 +587,9 @@ user id
.BI -G " gid"
group id
+.BI -H " num"
+renewal history size
+
.BI -t " num"
max worker threads
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
4 years, 3 months