-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
permit sending rpc commands #25
Comments
I like this idea! If I were to implement this, I'd implement subcommands using spf13/cobra, one for the current function (the daemon), one for issueing these commands. It would require a bit of refactoring in
I'm a bit short on time (and typically over-optimistic when it comes to planning), so don't count on it too much, but we could do this command refactoring in the coming two weeks. |
cool! I've already worked with cobra, I'll try to implement that 👍🏼 one key point for me though: can we have multiple I have a feeling it should work out-of-the box with another service, I'm just not sure how the underlying communication happens:
|
hi @jonkerj what's the status here ? shall I take it over? if so could you answer my 2 questions above please ? 🙃 |
Oops, I totally forgot about this. It was on my "yeah, I should look into that soon"-list at some point. Sorry for that, and thanks for reminding me. I dove into the code to answer your questions, and got the feeling some refactoring is overdue. It is definitely not the cleanest I've seen yet. I'm going to see if we can free up some time to refactor/clean it a bit in the next two weeks. If you can wait for this, we can lay the groundwork for implementing additional subcommands in the same go.
Sort of, the connection to the hypervisor happen here, a channel pair is what you're probably looking for.
If you are issuing the commands over the same channel pair that is used by the daemon, it could definately interfere. If you implement your command as a standalone subcommand, it will run as a separate process with its own channel pair, and should not interfere. |
all right. I'll wait for the refactoring then it'll be easier 🙃 |
I've almost completed the refactoring, need to test, dot some i's and cross some t's and we're done. I expect to produce a PR in a few days. |
it would be much appreciated if we were able (from the command line) to issue RPC to VMWare/ESXi. Our use case is something like:
vmtoolsd --cmd="info-get guestinfo.esxhost"
I went through the codebase but am not sure where to implement that. I gave it a shot here but am not sure if that's really the way to go, as I'm not sure if we want/can open a new nanotoolbox.Service or if we should try to reuse the already running vmtoolsd.
Let me know if my code is heading in the right direction, then I'll open a PR and I'll try to build and test it (so far I got some strange error when running
make vmtoolsd...
related toARG {TOOLCHAIN}
so I put that on hold before your reply.)The text was updated successfully, but these errors were encountered: