Skip to content

Commit

Permalink
PE: Containers: Switch to comma separated directory lists
Browse files Browse the repository at this point in the history
  • Loading branch information
beekhof committed Mar 1, 2017
1 parent 423d3f4 commit 11bb26d
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions lib/pengine/container.c
Expand Up @@ -171,7 +171,7 @@ create_docker_resource(
create_nvp(xml_obj, "force_kill", "false");
create_nvp(xml_obj, "reuse", "false");

offset += snprintf(buffer+offset, max-offset, "-h %s-%d --rm=true --restart=no ",
offset += snprintf(buffer+offset, max-offset, "-h %s-%d --restart=no ",
data->prefix, tuple->offset);

if(data->docker_network) {
Expand All @@ -186,9 +186,10 @@ create_docker_resource(
char *source = crm_strdup_printf(
"%s/%s-%d", mount->source, data->prefix, tuple->offset);

// '#' should be sufficiently unlikely in a directory
// name and thus safe to use as a separator
doffset += snprintf(dbuffer+doffset, dmax-doffset, "#%s", source);
if(doffset > 0) {
doffset += snprintf(dbuffer+doffset, dmax-doffset, ",");
}
doffset += snprintf(dbuffer+doffset, dmax-doffset, "%s", source);
offset += snprintf(buffer+offset, max-offset, " -v %s:%s", source, mount->target);

} else {
Expand Down

0 comments on commit 11bb26d

Please sign in to comment.