Closed Asky-GH closed 3 years ago
If you would like us to spend some time helping you to diagnose the problem, please spend some time describing it and, ideally, providing a minimal sample that reproduces the problem.
legacy.zip modern.zip Here are examples. The problem is that when using legacy approach I can see the following message in the console output: 2021-01-20 18:14:25.281 INFO 21488 --- [ main] o.s.v.c.e.LeaseAwareVaultPropertySource : Vault location [secret/app/some-vault-path-with-a-typo] not resolvable: Not found But with the modern approach, such a useful message is absent.
Thanks a lot. The issue is caused by the logging config not being configured yet at the time the Vault interaction is happening. You can use for now spring.cloud.vault.fail-fast=true
to get feedback from the app if the startup of a Vault component fails.
Thanks a lot. The issue is caused by the logging config not being configured yet at the time the Vault interaction is happening. You can use for now
spring.cloud.vault.fail-fast=true
to get feedback from the app if the startup of a Vault component fails.
spring.cloud.vault.fail-fast=true
is already being used but it doesn't provide any useful feedback.
As it looks right now, the lifecycle is controlled from Spring Boot and we don't have any means to do anything useful here. It would make sense to follow up in https://github.com/spring-projects/spring-boot/issues.
After consulting with the Boot Team, we could work around the logging issue by obtaining a specific logger that captures startup logs and prints these later on.
I've opened an issue to help with this on the Boot side: https://github.com/spring-projects/spring-boot/issues/24988. I think that's a prerequisite to fixing this as you need a DeferredLogFactory
, not just a Log
that is deferred.
Depends on spring-projects/spring-vault#636.
After migrating to spring-boot-starter-parent 2.4.2 and spring-cloud-vault-config/spring-cloud-starter-vault-config 3.0.0 LeaseAwareVaultPropertySource no longer logs INFO messages if I intentionally add some non-existing Vault path to spring.config.import. I wanted to ask if it's by design or it's a bug.