Skip to content

Commit

Permalink
Accomdate changes in libne build, giving us some of their configured …
Browse files Browse the repository at this point in the history
…#defines.
  • Loading branch information
jti-lanl committed Oct 5, 2018
1 parent 9cfa711 commit e6317c0
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 11 deletions.
11 changes: 4 additions & 7 deletions Makefile.am
Expand Up @@ -46,11 +46,6 @@ if USE_DAL
AM_CPPFLAGS += -DUSE_DAL=1 AM_CPPFLAGS += -DUSE_DAL=1
endif endif


if USE_MC_SOCKETS
AM_CPPFLAGS += -DS3_AUTH
endif


if USE_MDAL if USE_MDAL
AM_CPPFLAGS += -DUSE_MDAL=1 AM_CPPFLAGS += -DUSE_MDAL=1
endif endif
Expand Down Expand Up @@ -377,7 +372,8 @@ gdb:
# @ exec gdb marfs_fuse `ps -elf | egrep 'marfs_fuse(.*)/marfs' | grep -v grep | awk '{print $$4}'` # @ exec gdb marfs_fuse `ps -elf | egrep 'marfs_fuse(.*)/marfs' | grep -v grep | awk '{print $$4}'`


fuse_pid: fuse_pid:
ps -elf | grep marfs_fuse | grep $(MARFS_MNT) | grep -v grep | awk '{print $$4}' @ # make turns "$$" into "$".
ps -elf | grep marfs_fuse | grep -v grep | egrep "$(MARFS_MNT)\$$" | awk '{print $$4}'


# fusectl filesystem. Under the fusectl mount-point, each existing # fusectl filesystem. Under the fusectl mount-point, each existing
# connection has a numbered subdirectory. There's a special file named # connection has a numbered subdirectory. There's a special file named
Expand Down Expand Up @@ -422,7 +418,8 @@ _mnt:
$(EXEC) ./marfs_fuse $(FUSE_FLAGS) $(MARFS_MNT) $(LOG) & $(EXEC) ./marfs_fuse $(FUSE_FLAGS) $(MARFS_MNT) $(LOG) &
@ echo "sleeping to give background fuse a chance to start" @ echo "sleeping to give background fuse a chance to start"
sleep 1 sleep 1
@ ps -elf | grep marfs_fuse | grep $(MARFS_MNT) | grep -v grep | awk '{print $$4}' > $(PID) @ # make turns "$$" into "$".
@ ps -elf | grep marfs_fuse | grep -v grep | egrep "$(MARFS_MNT)\$$" | awk '{print $$4}' > $(PID)
@ echo "PID: " `cat $(PID)` @ echo "PID: " `cat $(PID)`


mnt: mnt.std mnt: mnt.std
Expand Down
8 changes: 6 additions & 2 deletions fuse/src/dal.c
Expand Up @@ -820,11 +820,15 @@ int mc_config(struct DAL* dal,
SEM_INIT(&config->lock, 0, 1); SEM_INIT(&config->lock, 0, 1);
} }


#ifdef S3_AUTH #if S3_AUTH
// To allow generating per-connection auth-signatures, capture the S3 // To allow generating per-connection auth-signatures, capture the S3
// credentials up front, while we have access to the AWS config file // credentials up front, while we have access to the AWS config file
// (i.e. before de-escalation). If mc_user is null, skt_auth_install() // (i.e. before de-escalation). If mc_user is null, skt_auth_install()
// defaults to SKT_S3_USER. // defaults to SKT_S3_USER.
//
// NOTE: S3_AUTH is defined during *libne* configuration. The idea is
// that, if the RMDA server is built to expect S3-authentication,
// then it doesn't make sense for clients to be built without it.


if (is_sockets) { if (is_sockets) {


Expand Down Expand Up @@ -875,7 +879,7 @@ void mc_deconfig(struct DAL *dal) {
MC_Config *config = (MC_Config*)dal->global_state; MC_Config *config = (MC_Config*)dal->global_state;
WAIT(&config->lock); WAIT(&config->lock);


# ifdef S3_AUTH # if S3_AUTH
if (config->auth) if (config->auth)
skt_auth_free(config->auth); skt_auth_free(config->auth);
# endif # endif
Expand Down
4 changes: 2 additions & 2 deletions fuse/src/dal.h
Expand Up @@ -100,9 +100,9 @@ OF SUCH DAMAGE.


#if USE_MC #if USE_MC


# ifdef S3_AUTH # include "skt_config.h" // libne configure-time #defines, like S3_AUTH
# if S3_AUTH
# include <aws4c.h> # include <aws4c.h>
# define SOCKETS /* affects erasure.h */
# endif # endif
# define DEFAULT_SKT_AUTH_USER "mcadmin" /* libne's SKT_S3_USER might diverge */ # define DEFAULT_SKT_AUTH_USER "mcadmin" /* libne's SKT_S3_USER might diverge */


Expand Down

0 comments on commit e6317c0

Please sign in to comment.