Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/dev-sjones-euca-12440'
Browse files Browse the repository at this point in the history
  • Loading branch information
sjones4 committed Jun 22, 2016
2 parents a36c44b + bc2f57d commit 76beb7a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
7 changes: 7 additions & 0 deletions clc/modules/bootstrap/src/main/native/eucalyptus-bootstrap.c
Expand Up @@ -221,6 +221,11 @@ static int set_caps(int caps)
return 0;
}

static int set_process_options( void )
{
return (prctl( PR_SET_PDEATHSIG, SIGKILL ));
}

static int set_keys_ownership(char *home, int uid, int gid)
{
char filename[2048];
Expand Down Expand Up @@ -420,10 +425,12 @@ static int child(euca_opts * args, java_home_t * data, uid_t uid, gid_t gid)
__write_pid(GETARG(args, pidfile));
setpgrp();
__limits(GETARG(args,fdlimit));
__die(set_process_options() != 0, "Setting process options failed.");
__die(java_init(args, data) != 1, "Failed to initialize Eucalyptus.");
__die_jni((r = (*env)->CallBooleanMethod(env, bootstrap.instance, bootstrap.init)) == 0, "Failed to init Eucalyptus.");
__abort(4, set_keys_ownership(GETARG(args, home), uid, gid) != 0, "Setting ownership of keyfile failed.");
__abort(4, linuxset_user_group(GETARG(args, user), uid, gid) != 0, "Setting the user failed.");
__abort(4, set_process_options() != 0, "Setting process options failed.");
__die_jni((r = (*env)->CallBooleanMethod(env, bootstrap.instance, bootstrap.load)) == 0, "Failed to load Eucalyptus.");
__die_jni((r = (*env)->CallBooleanMethod(env, bootstrap.instance, bootstrap.start)) == 0, "Failed to start Eucalyptus.");
handle._hup = signal_set(SIGHUP, handler);
Expand Down
1 change: 1 addition & 0 deletions systemd/units/eucalyptus-cloud.service
Expand Up @@ -8,6 +8,7 @@ Type=simple
EnvironmentFile=-/etc/eucalyptus/eucalyptus.conf
ExecStart=/usr/sbin/eucalyptus-cloud $CLOUD_OPTS
KillMode=process
TimeoutStopSec=120
LimitNOFILE=65535
LimitNPROC=infinity
PrivateTmp=true
Expand Down

0 comments on commit 76beb7a

Please sign in to comment.