-
Notifications
You must be signed in to change notification settings - Fork 111
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
APP-7128 support modules on windows #4605
base: main
Are you sure you want to change the base?
Conversation
c83405a
to
9f8492c
Compare
43cd2ea
to
6e2e3c4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
has this been tested on a windows machine? also would definitely would want the followup to deal with port exhaustion and reclaming ports
Re testing, has been tested on Windows 10 with gps, wifi sensor, and
viamboat modules.
Modules require minor tweaking to get them to work:
- go.mod replace rdk with this branch
- change filename of executable to .exe extension
…On Fri, Dec 13, 2024, 11:30 AM Cheuk ***@***.***> wrote:
***@***.**** commented on this pull request.
has this been tested on a windows machine? also would definitely would
want the followup to deal with port exhaustion and reclaming ports
------------------------------
In module/modmanager/manager.go
<#4605 (comment)>:
> @@ -1164,12 +1184,14 @@ func (m *module) startProcess(
)
}
}
- err = modlib.CheckSocketOwner(m.addr)
- if errors.Is(err, fs.ErrNotExist) {
- continue
- }
- if err != nil {
- return errors.WithMessage(err, "module startup failed")
+ if !rutils.TCPRegex.MatchString(m.addr) {
leave a comment as to why we're skipping
—
Reply to this email directly, view it on GitHub
<#4605 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABXLTSZLDW5O6FM6W4W3U6L2FMDSPAVCNFSM6AAAAABTEGWS2WVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDKMBQG4YTSMBWGE>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comments only for the moment. I'm nervous about opening up TCP.
@@ -40,6 +41,9 @@ import ( | |||
rutils "go.viam.com/rdk/utils" | |||
) | |||
|
|||
// tcpPortRange is the beginning of the port range. Only used when ViamTCPSockets() = true. | |||
const tcpPortRange = 13500 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happens when a port is occupied?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
when a port is occupied, this breaks; long term, we need a better way to do this. can potentially request an unused port (:0
) and have module report to RDK via the parent socket, but that's more plumbing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm perfectly cool with this. I'd recommend copying that expectation into the documentation:
tcpPortRange is the beginning of the port range. Only used when ViamTCPSockets() = true. If a port is already taken, the server breaks and behaves in an undefined way. Given this is for a pre-production windows release, we're ok with this outcome. The code/algorithm will become more robust in the future.
const SubtypeName = "web" | ||
const ( | ||
SubtypeName = "web" | ||
TCPParentPort = 14998 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happens when this port is occupied?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TCP sockets support breaks
follow-ups ticket APP-7240 will change this to zero to auto-assign
yes -- planning to explore named pipes and unix sockets support as follow-up. best outcome would be for us to solve go-grpc support on windows AF_UNIX so that we can be completely stock |
What changed
addr = "127.0.0.1:14998"
instead ofparent.sock
Why
Windows support on non-WSL machines.
Checklist
Follow-up
ViamTCPSockets()
function