19889: Update docs.
authorTom Clegg <tom@curii.com>
Wed, 22 Mar 2023 21:15:27 +0000 (17:15 -0400)
committerTom Clegg <tom@curii.com>
Wed, 22 Mar 2023 21:15:27 +0000 (17:15 -0400)
Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tom@curii.com>

doc/admin/config-urls.html.textile.liquid
doc/api/methods/containers.html.textile.liquid
lib/controller/localdb/container_gateway.go

index 500e0d8c8c13aea9a73a9c2a00e9a7e87b381002..2d46a4ca446ea7c02e13623b5844c9fb0e496013 100644 (file)
@@ -36,7 +36,7 @@ table(table table-bordered table-condensed).
 |keepproxy      |yes                    |yes|no ^2^|InternalURLs only used by reverse proxy (e.g. Nginx)|
 |keepstore      |no                     |yes|yes   |All clients connect to InternalURLs|
 |keep-balance   |no                     |yes|no ^3^|InternalURLs only used to expose Prometheus metrics|
-|keep-web       |yes                    |yes|no ^2^|InternalURLs only used by reverse proxy (e.g. Nginx)|
+|keep-web       |yes                    |yes|yes ^5^|InternalURLs used by reverse proxy and container log API|
 |websocket      |yes                    |yes|no ^2^|InternalURLs only used by reverse proxy (e.g. Nginx)|
 |workbench1     |yes                    |no|no     ||
 |workbench2     |yes                    |no|no     ||
@@ -46,6 +46,7 @@ table(table table-bordered table-condensed).
 ^2^ If the reverse proxy (e.g. Nginx) does not run on the same host as the Arvados service it fronts, the @InternalURLs@ will need to be reachable from the host that runs the reverse proxy.
 ^3^ If the Prometheus metrics are not collected from the same machine that runs the service, the @InternalURLs@ will need to be reachable from the host that collects the metrics.
 ^4^ If dispatching containers to HPC (Slurm/LSF) and there are multiple @Controller@ services, they must be able to connect to one another using their InternalURLs, otherwise the "tunnel connections":{{site.baseurl}}/architecture/hpc.html enabling "container shell access":{{site.baseurl}}/install/container-shell-access.html will not work.
+^5^ All URLs in @Services.WebDAVDownload.InternalURLs@ must be reachable by all Controller services. Alternatively, each entry in @Services.Controller.InternalURLs@ must have a corresponding entry in @Services.WebDAVDownload.InternalURLs@ with the same hostname.
 
 When @InternalURLs@ do not need to be reachable from other nodes, it is most secure to use loopback addresses as @InternalURLs@, e.g. @http://127.0.0.1:9005@.
 
index 1d6c415a9edb4633fa2a7d3bce24cf0f418446b7..c63bf4d11372a0356a92ec95211edb4d65118293 100644 (file)
@@ -105,10 +105,12 @@ Required arguments are displayed in %{background:#ccffcc}green%.
 
 Supports federated @get@ and @list@.
 
-h2(#create). create
+h3(#create). create
 
 Create a new Container.
 
+This API requires admin privileges. In normal operation, it should not be used at all.
+
 Arguments:
 
 table(table table-bordered table-condensed).
@@ -161,3 +163,26 @@ Get the api_client_authorization record indicated by this container's auth_uuid,
 table(table table-bordered table-condensed).
 |_. Argument |_. Type |_. Description |_. Location |_. Example |
 {background:#ccffcc}.|uuid|string||path||
+
+h3. log
+
+Get container log data using WebDAV methods.
+
+This API retrieves data from the container's log collection. It can be used at any time in the container lifecycle.
+* While the container is @Queued@ or @Locked@ it returns an empty directory.
+* While the container is @Running@ it returns real-time logging data.
+* While the container is @Complete@ or @Cancelled@ it returns the final log collection.
+
+This API also supports the @Range@ request header, so it can be used to poll for and retrieve logs while the container is running.
+
+Arguments:
+
+table(table table-bordered table-condensed).
+|_. Argument |_. Type |_. Description |_. Location |_. Example |
+|method|string|Read-only WebDAV method|HTTP method|@GET@, @OPTIONS@, @PROPFIND@|
+{background:#ccffcc}.|uuid|string|The UUID of the Container in question.|path||
+|path|string|Path to a file in the log collection.|path|@/stderr.txt@|
+
+Examples:
+* @GET /arvados/v1/containers/zzzzz-dz642-0123456789abcde/log/stderr.txt@
+* @PROPFIND /arvados/v1/containers/zzzzz-dz642-0123456789abcde/log/@
index 4a7920c01ffe4ab2a8b374b4db4cc71bd2ab85bc..6a7b93ce1b2f410d15d1b63ad80a3787c3722b2b 100644 (file)
@@ -157,7 +157,7 @@ func (conn *Conn) serveContainerLogViaKeepWeb(opts arvados.ContainerLogOptions,
        myHostname := u.Hostname()
        var webdavBase arvados.URL
        var ok bool
-       for webdavBase = range conn.cluster.Services.WebDAV.InternalURLs {
+       for webdavBase = range conn.cluster.Services.WebDAVDownload.InternalURLs {
                ok = true
                u := url.URL(webdavBase)
                if h := u.Hostname(); h == "127.0.0.1" || h == "0.0.0.0" || h == "::1" || h == myHostname {