Openais fails with following assertion if OPENAIS_RUN_DIR is set with
some relative path.
Dec 13 15:15:32.268209 [TOTEM] Couldn't
create ./tmp/ringid_192.168.11.13 No such file or directory
aisexec: totemsrp.c:2891: memb_ring_id_create_or_load: Assertion
`res == sizeof (unsigned long long)' failed.
Here I had set OPENAIS_RUN_DIR=./tmp.
Note that in totemsrp_initialize, it does a 'chdir' to the
OPENAIS_RUN_DIR and then again tries to append the rundir while forming
the filename in memb_ring_id_create_or_load, hence the above assertion.
The attached patch should fix this issue.
Regards,
Shridhar
Index: totemsrp.c
===================================================================
--- totemsrp.c (revision 1493)
+++ totemsrp.c (working copy)
@@ -2871,8 +2871,8 @@
int res;
char filename[256];
- sprintf (filename, "%s/ringid_%s",
- rundir, totemip_print (&instance->my_id.addr[0]));
+ sprintf (filename, "ringid_%s",
+ totemip_print (&instance->my_id.addr[0]));
fd = open (filename, O_RDONLY, 0700);
if (fd > 0) {
res = read (fd, &memb_ring_id->seq, sizeof (unsigned long long));
@@ -2910,8 +2910,8 @@
memcpy (&instance->my_ring_id, ring_id, sizeof (struct memb_ring_id));
- sprintf (filename, "%s/ringid_%s",
- rundir, totemip_print (&instance->my_id.addr[0]));
+ sprintf (filename, "ringid_%s",
+ totemip_print (&instance->my_id.addr[0]));
fd = open (filename, O_WRONLY, 0777);
if (fd == -1) {
_______________________________________________
Openais mailing list
[email protected]
https://lists.linux-foundation.org/mailman/listinfo/openais