-
Notifications
You must be signed in to change notification settings - Fork 125
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
SNOW-1552759: Super annoying warning message from gosnowflake every invocation of Hashicorp vault cli under sudo #1182
Comments
hey - thanks for reporting the issue here and sharing the details. Indeed this is nothing but a single logline emitted, nothing else happens. Will look into this. |
|
For now my workaround is to put an sh wrapper around vault in my rpm to set |
change at #1184 is merged and will be part of the next gosnowflake release |
released with gosnowflake v1.11.0 in July 2024 |
Should address a log noise issue; see snowflakedb/gosnowflake#1182.
This message is displayed every time the Hashicorp vault-1.17.2 cli is invoked under sudo to root, at least on RHEL8:
WARN[0000]log.go:244 gosnowflake.(*defaultLogger).Warn DBUS_SESSION_BUS_ADDRESS envvar looks to be not set, this can lead to runaway dbus-daemon processes. To avoid this, set envvar DBUS_SESSION_BUS_ADDRESS=$XDG_RUNTIME_DIR/bus (if it exists) or DBUS_SESSION_BUS_ADDRESS=/dev/null.
This message comes from gosnowflake and was reported in vault at hashicorp/vault#22560 but that issue was closed saying to report here instead. Most of the questions in the standard gosnowflake issue template aren't relevant, but this was compiled with go version 1.22.5, and the go.mod for vault-1.17.2 says it is using github.com/snowflakedb/gosnowflake v1.10.0.
When logged in with ssh to a RHEL8 linux server, DBUS_SESSION_BUS_ADDRESS is set so the warning is not emitted, but the variable does not carry over to
sudo -s
so it is emitted there. However I have never seen any evidence of extra dbus-daemon processes when running vault fromsudo -s
on Rocky8 or Alma8. There is a dbus-daemon process running on the system as thedbus
user and that gets detected by the code added in #1058 so the message is emitted. I tried to reproduce the original problem by unsetting DBUS_SESSION_BUS_ADDRESS and removing $XDG_RUNTIME_DIR/bus but I did not get any extra dbus-daemon processes with either vault or by running select1.go as suggested in #773. Maybe I'm not running the latter test right; it required setting values forSNOWFLAKE_TEST_{ACCOUNT|USER|PASSWORD}
which I set to arbitrary values and it just seemed to hang then when I didgo run cmd/select1/select1.go
in a clone of this git repository.So the message is warning about a non-existent problem as far as I can see, and very annoying. I build an rpm for vault that is used by about a half-dozen other people and I'd rather not have to explain all this to all of them. I guess I will need to add a patch to vault to add
DBUS_SESSION_BUS_ADDRESS=/dev/null
into its environment when the variable isn't set, but I didn't want to do that without reporting the issue here at least, as was suggested in the vault issue. Maybe this warning should be avoided when running as root, but on the other hand since I can't reproduce the runaway dbus problem at all I'm not sure whether it might happen in some situations as root for some people too.The text was updated successfully, but these errors were encountered: