Skip to content
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

Update same pod with multiple specs #340

Open
colinkahn opened this issue Feb 26, 2020 · 2 comments
Open

Update same pod with multiple specs #340

colinkahn opened this issue Feb 26, 2020 · 2 comments

Comments

@colinkahn
Copy link

Hi,

I am trying to use multiple specs to update a single pod, something where I have many different local to remote mappings I want to watch/sync.

I've tried this and it doesn't seem to work. Any suggestions?

@grampelberg
Copy link
Collaborator

Hmm, the underlying implementations would allow it. There must be a disconnect somewhere in the stack. Take a look at the syncthing REST client and trace it back up the stack. Must be something strange in that interaction.

@ssoriche
Copy link

ssoriche commented Apr 3, 2020

I too am having an issue with multiple specs to a single pod.

When ksync watch starts it attempts to communicate with syncthing for one spec, it is successful and adds the configuration.

DEBU[0011] [GWGCQ] 15:28:32 INFO: Completed initial scan of sendonly folder "picked-perch-my-test-64b45f7467-cf4xq" (picked-perch-my-test-64b45f7467-cf4xq)  name=syncthing
DEBU[0011] [GWGCQ] 15:28:33 INFO: Established secure connection to KTRE4PS-RYAPCOO-WMEYAN5-VM7WDEQ-6DCMCF4-RQIXIBP-LHBLMLE-UP3OXQO at 127.0.0.1:61379-127.0.0.1:61329/tcp-client/TLS1.3-TLS_AES_128_GCM_SHA256  name=syncthing
DEBU[0011] [GWGCQ] 15:28:33 INFO: Device KTRE4PS-RYAPCOO-WMEYAN5-VM7WDEQ-6DCMCF4-RQIXIBP-LHBLMLE-UP3OXQO client is "syncthing v1.3.4" named "ksync-qt866" at 127.0.0.1:61379-127.0.0.1:61329/tcp-client/TLS1.3-TLS_AES_128_GCM_SHA256  name=syncthing
DEBU[0011] [GWGCQ] 15:28:33 INFO: Device KTRE4PS-RYAPCOO-WMEYAN5-VM7WDEQ-6DCMCF4-RQIXIBP-LHBLMLE-UP3OXQO folder "picked-perch-my-test-64b45f7467-cf4xq" (picked-perch-my-test-64b45f7467-cf4xq) has a new index ID (0x466290F02BCED84D)  name=syncthing
DEBU[0012] [GWGCQ] 15:28:34 INFO: Adding folder "flowing-oyster-my-test-64b45f7467-cf4xq" (flowing-oyster-my-test-64b45f7467-cf4xq)  name=syncthing
DEBU[0012] [GWGCQ] 15:28:34 INFO: No stored folder metadata for "flowing-oyster-my-test-64b45f7467-cf4xq"; recalculating  name=syncthing
DEBU[0012] error copying from local connection to remote stream: read tcp4 127.0.0.1:61329->127.0.0.1:61379: read: connection reset by peer 
DEBU[0012] lost connection to remote                     node=test-node.local pod=my-test-64b45f7467-cf4xq
DEBU[0012] lost connection to remote                     node=test-node.local pod=my-test-64b45f7467-cf4xq
DEBU[0012] [GWGCQ] 15:28:34 INFO: Connection to KTRE4PS-RYAPCOO-WMEYAN5-VM7WDEQ-6DCMCF4-RQIXIBP-LHBLMLE-UP3OXQO at 127.0.0.1:61379-127.0.0.1:61329/tcp-client/TLS1.3-TLS_AES_128_GCM_SHA256 closed: started folder "flowing-oyster-my-test-64b45f7467-cf4xq" (flowing-oyster-my-test-64b45f7467-cf4xq)  name=syncthing
DEBU[0012] [GWGCQ] 15:28:34 INFO: Ready to synchronize "flowing-oyster-my-test-64b45f7467-cf4xq" (flowing-oyster-my-test-64b45f7467-cf4xq) (sendonly)  name=syncthing
DEBU[0012] restarting local syncthing                   
INFO[0012] finished unary call with code OK              grpc.code=OK grpc.method=RestartSyncthing grpc.service=proto.ksync.Ksync grpc.start_time="2020-04-03T15:28:34-04:00" grpc.time_ns=1027543 peer.address="127.0.0.1:61313" span.kind=server system=grpc

At which point syncthing has been told to restart which removes the first spec and adds the second spec.

DEBU[0012] [GWGCQ] 15:28:34 INFO: QUIC listener ([::]:22000) shutting down  name=syncthing
DEBU[0012] RESTY 2020/04/03 15:28:34 ERROR unexpected EOF, Attempt 1 
INFO[0012] folder sync running                           pod=my-test-64b45f7467-cf4xq spec=flowing-oyster
DEBU[0012] RESTY 2020/04/03 15:28:34 ERROR unexpected EOF, Attempt 1 
DEBU[0012] [GWGCQ] 15:28:34 INFO: Failed initial scan of sendonly folder "flowing-oyster-my-test-64b45f7467-cf4xq" (flowing-oyster-my-test-64b45f7467-cf4xq)  name=syncthing
DEBU[0013] [GWGCQ] 15:28:34 INFO: TCP listener ([::]:22000) shutting down  name=syncthing
DEBU[0013] [GWGCQ] 15:28:34 INFO: Exiting                name=syncthing
DEBU[0013] [monitor] 15:28:34 INFO: Syncthing exited: exit status 3  name=syncthing

The syncthing console will sometimes show that the first spec is being seen as a new folder and ask to add or ignore. Clicking add doesn't allow the spec to be saved. Sometimes it doesn't ask at all, just leaves the second spec running.

DEBU[0015] [GWGCQ] 15:28:37 INFO: Ready to synchronize "flowing-oyster-my-test-64b45f7467-cf4xq" (flowing-oyster-my-test-64b45f7467-cf4xq) (sendonly)  name=syncthing
DEBU[0016] [GWGCQ] 15:28:37 INFO: Unexpected folder "picked-perch-my-test-64b45f7467-cf4xq" (picked-perch-my-test-64b45f7467-cf4xq) sent from device "KTRE4PS-RYAPCOO-WMEYAN5-VM7WDEQ-6DCMCF4-RQIXIBP-LHBLMLE-UP3OXQO"; ensure that the folder exists and that this device is selected under "Share With" in the folder configuration.  name=syncthing

Removing both specs, and adding them again works, but once ksync watch is disconnected, the race to register with the local syncthing starts all over again.

I tried starting syncthing on its own to avoid the condition but ksync watch also tries to start it and fails because the port is already in use.

Hopefully this helps, I can create these errors over and over again so if more details or testing is required, please let me know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants