Open cgreenhalgh opened 7 years ago
This happens because databox is run as a docker service, and by default, services are restarted on reboot or docker restart.
This is problematic because the arbiter holds its permissions in memory and the container manager does not reregister all the running components.
There are three solutions as I see it:
cc @mor1 thoughts on how to proceed
I'm not certain if this is related, but I would suggest that the CM private key should definitely persist across restarts (whatever mode it is run in) as otherwise (in the secure UI version) users would have to install the new CA root certificate in their client(s) every time the databox restarted.
Thoughts:
So, @Toshbrown I think that means no to 1, yes to 2 for sure, and I'm not sure I understand 3 correctly...?
@mor1 If its a yes to 2 then 3 is not needed (and now I think about it would not work)
There is a 4 as well (if secrets persist )
We could pass the arbiter its half of the key using secrets rather than an API call (this already happens for core components). Then on restart, it can just reload the keys from /var/run/secrets
@cgreenhalgh the cm CA root certificate is persistent as are the arbiter keys for core components
What we decide here may also have implication for the core-network so ccing @sevenEng just in case
ccing @yousefamar as I may be missing some arbiter implementation details
@Toshbrown Ah! I understand 3 now too :) Yes, 4 seems better than either 2 or 3 to me, assuming secrets passing is indeed secret even for an on-host observer, which it surely must be (?)
What are the core-network
implications you're thinking of? In terms of the configuration state, or something else?
configuration state mainly. It also runs outside of the swarm, and hence is not part of the service so it may not get restarted automatically
@Toshbrown Ok thanks
@sevenEng Auto-restart worth noting as an issue for core-network
?
Fixed in 0.4.0 on Linux (see databox-install-ubuntu-service script) still an issue on macOS.
If docker is restarted (or if host restarts) then the various databox services are re-created, including active drivers and apps, but in general they do not work work. They seem to fail to connect to and/or authenticate correctly with the store(s) they are using. The driver-os-monitor makes repeated attempts (wait for store) then terminates (and is auto-restarted); the app-os-monitor fails but this is only visible in the log (and no data appearing).
Example output from app-os-monitor:
Example out from driver-os-monitor I have see
Invalid API key
but also connection refused: