Project

General

Profile

Actions

Feature #14715

closed

[keepproxy] Use cluster config file

Added by Peter Amstutz almost 6 years ago. Updated almost 5 years ago.

Status:
Resolved
Priority:
Normal
Assigned To:
Eric Biagiotti
Category:
-
Target version:
Story points:
1.0
Release relationship:
Auto

Subtasks 1 (0 open1 closed)

Task #15385: Review 14715-keepprox-configResolvedEric Biagiotti08/12/2019Actions

Related issues 1 (0 open1 closed)

Related to Arvados - Idea #13648: [Epic] Use one cluster configuration file for all componentsResolvedActions
Actions #1

Updated by Peter Amstutz almost 6 years ago

  • Related to Idea #13648: [Epic] Use one cluster configuration file for all components added
Actions #2

Updated by Tom Morris almost 6 years ago

  • Target version changed from To Be Groomed to Arvados Future Sprints
  • Story points set to 1.0
Actions #3

Updated by Tom Morris over 5 years ago

  • Target version changed from Arvados Future Sprints to 2019-07-03 Sprint
Actions #4

Updated by Eric Biagiotti over 5 years ago

  • Assigned To set to Eric Biagiotti
Actions #5

Updated by Eric Biagiotti over 5 years ago

  • Target version changed from 2019-07-03 Sprint to 2019-07-17 Sprint
Actions #6

Updated by Eric Biagiotti over 5 years ago

  • Target version changed from 2019-07-17 Sprint to 2019-07-31 Sprint
Actions #7

Updated by Eric Biagiotti over 5 years ago

  • Status changed from New to In Progress
Actions #8

Updated by Eric Biagiotti over 5 years ago

keepproxy.yml example config dump

    {
      "Client": {
        "Scheme": "",                
        "APIHost": "zzzzz.arvadosapi.com:443",    
        "AuthToken": "",            
        "Insecure": false            
      },        
      "Listen": ":25107",  
      "DisableGet": false,
      "DisablePut": false,
      "DefaultReplicas": 0,
      "Timeout": "15s",
      "PIDFile": "",    
      "Debug": false,    
      "ManagementToken": "" 
    }

We are dropping support for PIDFile. Regarding DisableGet/DisablePut, these will not be implemented in the cluster config and when loading old config files, keepproxy will error out if either are set to True. The remaining config attributes are all available elsewhere in the cluster config, so no keepproxy section is needed.

Actions #9

Updated by Eric Biagiotti over 5 years ago

  • Target version changed from 2019-07-31 Sprint to 2019-08-14 Sprint
Actions #10

Updated by Eric Biagiotti over 5 years ago

Latest at 1166aeb6033725709ded753a0c00f69320a9a873
Tests: https://ci.curoverse.com/view/Developer/job/developer-run-tests/1473/

I noticed that some components (keep-web, ws) have doc.go files. Keepproxy doesn't have one, should I make one?

Actions #11

Updated by Tom Clegg over 5 years ago

Install docs

In config-migration.html this suggests the legacy config won't be used unless you add a -config=... argument, which isn't true:

+The legacy keepproxy config is stored at @/etc/arvados/keepproxy/keepproxy.yml@ and can still be used with the @-config=path/to/legacy/config@ keepproxy command line argument.

In config-migration.html the table uses the notation "Collections:DefaultReplication" -- but I think everywhere else we spell this sort of thing "Collections.DefaultReplication".

Pre-existing bug: keepproxy comes with a systemd unit file so systems that have systemd should skip all the runit stuff. Should update along the lines of dispatch-cloud/keep-balance.

Unclosed span tag:

<pre><code>~$ <span class="userinput">exec keepproxy

In this example there's one "zzzzz" and one "uuid_prefix" -- should probably just choose one. I think most places we use "uuid_prefix", with the userinput span so it stands out.

+  zzzzz:
+    Services:
+      <span class="userinput">Keepproxy:
+        ExternalURL: https://keep.uuid_prefix.your.domain
+        InternalURLs:
+         "http://localhost:25107": {}

Config

Should surely be KeepproxyPath:

+       if legacyConfigArg != "-legacy-keepproxy-config" {
+ ldr.WebsocketPath = ""
+ }

Keepproxy

run() should return errors instead of calling log.Fatal()

I don't think we can use AssertPathExists=/etc/arvados/config.yml yet -- that file might not exist at all until this version instructs the operator to create it.

TestLegacyConfig looks like it's testing the config migration. Could it move to lib/config?

In arvbox this looks like it should say https:

+        ExternalURL: "http://$localip:${services[keepproxy-ssl]}/"
Actions #12

Updated by Eric Biagiotti over 5 years ago

  • Target version changed from 2019-08-14 Sprint to 2019-08-28 Sprint
Actions #13

Updated by Eric Biagiotti over 5 years ago

Latest at 82ef8e6c9b95804159e199d7dd9128da82366a50
Tests: https://ci.curoverse.com/view/Developer/job/developer-run-tests/1484/

Individual commits with fixes detailed inline below.

Tom Clegg wrote:

Install docs

[...]

Documentation fixes in 82ef8e6c9b95804159e199d7dd9128da82366a50
Also removed usage.go to have the same CLI help as other migrated services.

Config

Should surely be KeepproxyPath:

+ if legacyConfigArg != "-legacy-keepproxy-config" {
+ ldr.WebsocketPath = ""
+ }

Keepproxy

run() should return errors instead of calling log.Fatal()

I don't think we can use AssertPathExists=/etc/arvados/config.yml yet -- that file might not exist at all until this version instructs the operator to create it.

The above keepproxy and config issues are fixed at 729c7c95d0d9c8d0357143717d5f2bb8cdd743de

TestLegacyConfig looks like it's testing the config migration. Could it move to lib/config?

Moved in 5ae0a422e60788a4039d17d2d8dfb60f250329c7

In arvbox this looks like it should say https:

+ ExternalURL: "http://$localip:${services[keepproxy-ssl]}/"

Fixed by merging master into my branch at d4ed3e6460469f2766e1f1676c538d6c86e000b6

Actions #14

Updated by Eric Biagiotti over 5 years ago

Actions #15

Updated by Tom Clegg over 5 years ago

LGTM, except I think the "legacy keepproxy config" explanation is misleading:

If the -legacy-keepproxy-config command line argument is provided, this will take precedence over /etc/arvados/keepproxy/keepproxy.yml and the cluster config.

"Takes precedence" implies both files are loaded, which is true for legacy+cluster configs, but not for default/specified legacy config paths.

If migrating to the centralized config, ...

This sounds like migrating to centralized config is optional. I think "if" could change to "after".

How about:

The legacy keepproxy config (loaded from /etc/arvados/keepproxy/keepproxy.yml or a different location specified via -legacy-keepproxy-config command line argument) takes precedence over the centralized config. After you migrate everything from the legacy config to the centralized config, you should delete /etc/arvados/keepproxy/keepproxy.yml and stop using the -legacy-keepproxy-config argument.

(As an aside, it seems like the migration doc is missing the key point that "arvados-server config-check" and "arvados-server config-dump" are the recommended/easy way to migrate legacy configs other than RailsAPI/Workbench1. Not sure which ticket that should belong to, but it seems like the "old/new configs" table here wouldn't have been necessary if we had already done it, so perhaps we should do it soon...?)

Actions #16

Updated by Eric Biagiotti over 5 years ago

Updated documentation at de47033cb700ba5655dc6cfde77b888e8a94e87f

Added a ticket for config migration/upgrade doc improvements at https://dev.arvados.org/issues/15572

Actions #17

Updated by Tom Clegg over 5 years ago

Looks good, thanks. One last thing -- maybe the warning about "if you use DisableGet etc., keepproxy will fail to start" belongs in the "before you upgrade..." page rather than the "migrating your config after upgrading" page.

Actions #18

Updated by Eric Biagiotti over 5 years ago

Tom Clegg wrote:

Looks good, thanks. One last thing -- maybe the warning about "if you use DisableGet etc., keepproxy will fail to start" belongs in the "before you upgrade..." page rather than the "migrating your config after upgrading" page.

Good idea. Fixed in cdc569ed1c4777d3293327ee10b8f1c8bec06c6a

Actions #19

Updated by Tom Clegg over 5 years ago

LGTM, thanks

Actions #20

Updated by Eric Biagiotti over 5 years ago

  • Status changed from In Progress to Resolved
Actions #21

Updated by Peter Amstutz almost 5 years ago

  • Release set to 22
Actions

Also available in: Atom PDF