Skip to content

Commit

Permalink
PE: Containers: Use an autoconf variable for the location of pacemake…
Browse files Browse the repository at this point in the history
…r remote
  • Loading branch information
beekhof committed Mar 1, 2017
1 parent 41e182d commit 423d3f4
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 13 deletions.
1 change: 1 addition & 0 deletions configure.ac
Expand Up @@ -1137,6 +1137,7 @@ AC_SUBST(OCF_RA_DIR)

RH_STONITH_DIR="$sbindir"
AC_DEFINE_UNQUOTED(RH_STONITH_DIR,"$RH_STONITH_DIR", Location for Red Hat Stonith agents)
AC_DEFINE_UNQUOTED(SBIN_DIR,"$sbindir", Location for system binaries)

RH_STONITH_PREFIX="fence_"
AC_DEFINE_UNQUOTED(RH_STONITH_PREFIX,"$RH_STONITH_PREFIX", Prefix for Red Hat Stonith agents)
Expand Down
40 changes: 27 additions & 13 deletions lib/pengine/container.c
Expand Up @@ -217,23 +217,37 @@ create_docker_resource(
create_nvp(xml_obj, "run_opts", buffer);
free(buffer);

// TODO: Arrange for these directories to get created on the host
create_nvp(xml_obj, "directory_list", dbuffer);
create_nvp(xml_obj, "mount_points", dbuffer);
free(dbuffer);

if(tuple->child) {
// TODO: Use autoconf var
create_nvp(xml_obj, "run_cmd", "/usr/sbin/pacemaker_remoted");

// TODO: Allow users to specify their own?
create_nvp(xml_obj, "monitor_cmd", "/bin/true"); // We just want to know if the container
// is alive, we'll monitor the child independantly

/* } else if(child && data->untrusted) { */
/* create_nvp(xml_obj, "run_cmd", "/usr/libexec/pacemaker/lrmd"); */
/* create_nvp(xml_obj, "monitor_cmd", "/usr/libexec/pacemaker/lrmd_internal_ctl -c poke"); */
create_nvp(xml_obj, "run_cmd", SBIN_DIR"/pacemaker_remoted");

/* TODO: Allow users to specify their own?
*
* We just want to know if the container is alive, we'll
* monitor the child independantly
*/
create_nvp(xml_obj, "monitor_cmd", "/bin/true");
/* } else if(child && data->untrusted) {
* Support this use-case?
*
* The ability to have resources started/stopped by us, but
* unable to set attributes, etc.
*
* Arguably better to control API access this with ACLs like
* "normal" remote nodes
*
* create_nvp(xml_obj, "run_cmd", "/usr/libexec/pacemaker/lrmd");
* create_nvp(xml_obj, "monitor_cmd", "/usr/libexec/pacemaker/lrmd_internal_ctl -c poke");
*/
} else {
// TODO: Leave blank to use the built-in monitor?
/* TODO: Allow users to specify their own?
*
* We don't know what's in the container, so we just want
* to know if it is alive
*/
create_nvp(xml_obj, "monitor_cmd", "/bin/true");
}


Expand Down

0 comments on commit 423d3f4

Please sign in to comment.