Make SerialDriver available to all driver plugins#2321
Make SerialDriver available to all driver plugins#2321janeczku wants to merge 3 commits intodocker-archive-public:masterfrom janeczku:serial-driver
Conversation
Signed-off-by: Jan Broer <janeczku@yahoo.de>
|
Please sign your commits following these rules: $ git clone -b "serial-driver" git@github.com:janeczku/machine.git somewhere
$ cd somewhere
$ git rebase -i HEAD~3
editor opens
change each 'pick' to 'edit'
save the file and quit
$ git commit --amend -s --no-edit
$ git rebase --continue # and repeat the amend for each commit
$ git push -fAmmending updates the existing PR. You DO NOT need to open a new one. |
|
It's not so simple unfortunately. If other driver plugins are in the wild and they don't have the At any rate, if we're going to break API compatibility and urge driver plugin authors to update, I'd prefer to actually solve some of the problems that we're facing (e.g. rate limits) more elegantly (ideally we should have one "provider" process which can batch requests to APIs if required instead of our current one-driver-per-process model). In that respect, I would really love to see some proposals for a V2 API in the issues. |
Hold on, v0.5.1 in fact broke API compatibility and made v0.5.0 drivers go kaboom. So how is the fact that authors need to recompile their plugins to keep compatibility with the latest machine releases a valid argument for rejecting this PR? They need to do so as it is already.
I don't know what exactly you mean by update. You mean their code?
Thats all very nice. But the one-server-per-machine model causes problems right now. And making the SerialDriver globally available is a perfectly good solution. And above that hardcoding special treatment for certain drivers (like the SerialDriver for virtualbox) kind of contradicts the plugin model anyway. |
How so? I haven't heard any bug report of this. Please file one since it's critical for me to know if 0.5.1 has broken 0.5.0 plugins. I know there were some shakeups during the RCs, but those are RCs. If this happened, it was very unintentional.
Re-compile and re-distribute their plugin binaries. Otherwise their servers won't have this method you're calling here.
I'm not happy about the special treatment for |
This PR enables plugins to enforce being invoked via the
drivers.SerialDriverin order to limit RPC calls to one at a time.Drivers can indicate to machine that they should be invoked with the SerialDriver by implementing this new (optional) method:
Relevance
Currently the SerialDriver is not available for any but VirtualBox instances even though other current or future providers may also have problems with concurrent driver operations.
Example
Because the number of concurrent API calls is a direct function of the number of machines of the same type in the store, violating a cloud providers query limits is a real issue. With the one-rpc-server-per-machine model it's impossible for the driver to control the actual query rate to the providers API when actions are run in parallel.
By enforcing serialization of RCP calls the driver gains control over the query rate.