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

Add Crac JDK support (SSM open socket) #1024

Open
tzvetkovg opened this issue Jan 19, 2024 · 4 comments
Open

Add Crac JDK support (SSM open socket) #1024

tzvetkovg opened this issue Jan 19, 2024 · 4 comments

Comments

@tzvetkovg
Copy link

tzvetkovg commented Jan 19, 2024

Type: Feature

I've been experimenting with https://github.com/CRaC/docs. However, when you attempt to do a crac checkpoint and you've got awssdk:ssm dependency in the pom then Crac checkpointing fails with

Suppressed: jdk.internal.crac.mirror.impl.CheckpointOpenSocketException: Socket[addr=ssm.eu-west-1.amazonaws.com/67.220.224.3,port=443,localport=36852]
2024-01-19 09:56:26 at java.base/jdk.internal.crac.JDKSocketResourceBase.lambda$beforeCheckpoint$0(JDKSocketResourceBase.java:68) ~[na:na]
2024-01-19 09:56:26 at java.base/jdk.internal.crac.mirror.Core.checkpointRestore1(Core.java:169) ~[na:na]
2024-01-19 09:56:26 at java.base/jdk.internal.crac.mirror.Core.checkpointRestore(Core.java:286) ~[na:na]
2024-01-19 09:56:26 at java.base/jdk.internal.crac.mirror.Core.checkpointRestore(Core.java:265) ~[na:na]
2024-01-19 09:56:26 at jdk.crac/jdk.crac.Core.checkpointRestore(Core.java:72) ~[jdk.crac:na]
2024-01-19 09:56:26 at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103) ~[na:na]
2024-01-19 09:56:26 at java.base/java.lang.reflect.Method.invoke(Method.java:580) ~[na:na]
2024-01-19 09:56:26 at org.crac.Core$Compat.checkpointRestore(Core.java:141) ~[crac-1.4.0.jar:na]
2024-01-19 09:56:26 ... 13 common frames omitted

as CraC JDK requires no open sockets and files before checkpointing.

Describe the solution you'd like

  1. Spring Cloud AWS to add support for Crac JDK to automatically pause the SSM open socket when checkpointing OR
  2. add an ability to manually stop/restart the SSM socket via a code property at runtime
@maciejwalkowiak
Copy link
Contributor

I think this is more complex than just open socket. On restore, secrets have to be fetched again. If you are able to provide a PR we are happy to look into it.

@tzvetkovg
Copy link
Author

I think an option would be to reload the ssm automatically at runtime with a different profile. In most cases one would take the crac snapshot in a profile like devl but when deploying you would want to switch to QA/PROD when you restore. So is there any way to refresh the ssm config and all related beans at runtime without destroying and recreating the whole app?

@maciejwalkowiak
Copy link
Contributor

@tzvetkovg
Copy link
Author

tzvetkovg commented Apr 5, 2024

yeah but will that update the properties of all related beans. For instance, if you've got mongoDB or Kafka configured with the initial profile I guess you would have to manually re-create these beans with the new properties, it won't do it for you automatically?

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

2 participants