Commit 9a3697de authored by David Johnson's avatar David Johnson

loadinfo: if docker vnode and docker-format image, also send the PATH.

(The image path in the docker case is a pointer to a full-qualified
image -- registryhost[:port]/repo/si/tory/image:tag .)
parent d10f5a5e
...@@ -5964,7 +5964,8 @@ COMMAND_PROTOTYPE(doloadinfo) ...@@ -5964,7 +5964,8 @@ COMMAND_PROTOTYPE(doloadinfo)
" i.imageid,prepare,i.imagename,p.pid,g.gid,iv.path," " i.imageid,prepare,i.imagename,p.pid,g.gid,iv.path,"
" ov.version,pa.`partition`,iv.size," " ov.version,pa.`partition`,iv.size,"
" iv.lba_low,iv.lba_high,iv.lba_size,iv.relocatable," " iv.lba_low,iv.lba_high,iv.lba_size,iv.relocatable,"
" UNIX_TIMESTAMP(iv.updated),r.imageid_version " " UNIX_TIMESTAMP(iv.updated),r.imageid_version,"
" iv.format "
"from current_reloads as r " "from current_reloads as r "
"left join images as i on i.imageid=r.image_id " "left join images as i on i.imageid=r.image_id "
"left join image_versions as iv on " "left join image_versions as iv on "
...@@ -5980,7 +5981,7 @@ COMMAND_PROTOTYPE(doloadinfo) ...@@ -5980,7 +5981,7 @@ COMMAND_PROTOTYPE(doloadinfo)
" pa.node_id=r.node_id and " " pa.node_id=r.node_id and "
" pa.osid=iv.default_osid and loadpart=0 " " pa.osid=iv.default_osid and loadpart=0 "
"where r.node_id='%s' order by r.idx", "where r.node_id='%s' order by r.idx",
20, reqp->nodeid); 21, reqp->nodeid);
if (!res) { if (!res) {
error("doloadinfo: %s: DB Error getting loading address!\n", error("doloadinfo: %s: DB Error getting loading address!\n",
...@@ -6313,6 +6314,17 @@ COMMAND_PROTOTYPE(doloadinfo) ...@@ -6313,6 +6314,17 @@ COMMAND_PROTOTYPE(doloadinfo)
} }
} }
} }
/* If this is a Docker vnode, hand back the path too. */
if (reqp->isvnode && row[20] && row[20][0]
&& strcmp("docker",row[20]) == 0) {
if (row[10])
bufp += OUTPUT(bufp,ebufp - bufp,
" PATH=%s",row[10]);
else
bufp += OUTPUT(bufp,ebufp - bufp," PATH=");
}
/* Tack on the newline, finally */ /* Tack on the newline, finally */
bufp += OUTPUT(bufp, ebufp - bufp, "\n"); bufp += OUTPUT(bufp, ebufp - bufp, "\n");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment