-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Inconsistent date format in Vault Agent debug logs #9816
Comments
I'm thinking if this could be ISO formating set local to VM? @mikegreen - can you provide grep -v '#' /etc/locale.gen && printf '___\n' && locale -a && printf '___\n' && locale ; |
Darwin doesn't seem to have /etc/locale.gen ? $ locale |
@mikegreen - can you try setting and running again to see if it impacts anything:
Otherwise I think it might actually be related to consul-template. |
Like this part specifically with the logger maybe |
@mikegreen - please also output: uname -a
# Linux hsm1-vault1 4.19.0-9-amd64 #1 SMP Debian 4.19.118-2 (2020-04-29) x86_64 GNU/Linux
locale -k LC_TIME
# ...
# date_fmt="%a %d %b %Y %r %Z"
# // in the case of my MacOs for example:
locale -k LC_TIME
# ...
# t_fmt_ampm="%I:%M:%S %p"
# era=""
# era_d_fmt=""
# era_t_fmt=""
# era_d_t_fmt=""
# alt_digits=""
# d_t_fmt="%a %b %e %X %Y"
# d_fmt="%m/%d/%Y"
# t_fmt="%H:%M:%S" |
|
Thanks for the input. For clarity the My observations (UTC / 2 hour difference from other log entries)
|
I've observed this as well, and it comes from the fact that the template server outputs logs in a format that is different to the rest of the agent's logs. We pass in the same writer to the template server, but it instantiates its own logger and thus adheres to its own logging format. I'll mark this as an enhancement for Agent, thanks for the report! |
I've created the following PR on Consul-Template which seems to fix the issue (not sure I broke anything else)
|
@calvn @mikegreen @aphorise Based on the last comment on this issue, can this be considered fixed? If yes, we can close the issue. |
@vishalnayak - I'm not sure if the latest 1.6.0 build of Vault is with the updated version that included the merged hashicorp/consul-template#1412. It needs checking. The output looks the same atm and issue is not yet resolved. |
We are currently using consul-template 0.25.1, and the change will be released in 0.25.2. The consul-template folks are planning a release at which point we'll be able to update our dependency. I'll keep bumping the milestone on this so I can keep checking for new releases. |
Consul-template has released 0.25.2, and we'll be using it in 1.7. |
Describe the bug
Vault agent log output is inconsistent in the date format when running in debug.
Some are YYYY/MM/DD, while others are YYYY-MM-DD
And that correlates to some being in server time (ie, the ones with timezone T) and some zulu.
To Reproduce
Run Vault in agent mode, ie
Expected behavior
Log format to be consistent, can be slash or dash delimited, but not mixed.
Environment:
vault status
): Vault v1.5.0vault version
): Vault v1.4.2+premThe text was updated successfully, but these errors were encountered: