mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-10-29 17:52:32 +00:00
VAULT-12542 Add info encouraging users to upgrade if agent version is different to server (#18684)
* VAULT-12542 Add info encouraging users to upgrade if agent version is different to server * VAULT-12542 Changelog * VAULT-12542 Language update
This commit is contained in:
3
changelog/18684.txt
Normal file
3
changelog/18684.txt
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
```release-note:improvement
|
||||||
|
agent: Add note in logs when starting Vault Agent indicating if the version differs to the Vault Server.
|
||||||
|
```
|
||||||
@@ -250,7 +250,7 @@ func (c *AgentCommand) Run(args []string) int {
|
|||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
// Ignore any setting of agent's address. This client is used by the agent
|
// Ignore any setting of Agent's address. This client is used by the Agent
|
||||||
// to reach out to Vault. This should never loop back to agent.
|
// to reach out to Vault. This should never loop back to agent.
|
||||||
c.flagAgentAddress = ""
|
c.flagAgentAddress = ""
|
||||||
client, err := c.Client()
|
client, err := c.Client()
|
||||||
@@ -261,6 +261,17 @@ func (c *AgentCommand) Run(args []string) int {
|
|||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
serverHealth, err := client.Sys().Health()
|
||||||
|
if err == nil {
|
||||||
|
// We don't exit on error here, as this is not worth stopping Agent over
|
||||||
|
serverVersion := serverHealth.Version
|
||||||
|
agentVersion := version.GetVersion().VersionNumber()
|
||||||
|
if serverVersion != agentVersion {
|
||||||
|
c.UI.Info("==> Note: Vault Agent version does not match Vault server version. " +
|
||||||
|
fmt.Sprintf("Vault Agent version: %s, Vault server version: %s", agentVersion, serverVersion))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// ctx and cancelFunc are passed to the AuthHandler, SinkServer, and
|
// ctx and cancelFunc are passed to the AuthHandler, SinkServer, and
|
||||||
// TemplateServer that periodically listen for ctx.Done() to fire and shut
|
// TemplateServer that periodically listen for ctx.Done() to fire and shut
|
||||||
// down accordingly.
|
// down accordingly.
|
||||||
|
|||||||
Reference in New Issue
Block a user