I think we may be missing a key piece of functionality to make Habitat more useful when trying to diagnose package start failures. Consider the following common scenario;
I’m running OSX and I want to load a package that I didn’t create into the supervisor and use it. Let use core/mongodb as an example. Here’s the output I get;
hab svc load core/mongodb
Determining latest version of core/mongodb in the ‘stable’ channel
Install of core/mongodb/3.6.4/20180717024452 complete with 12 new packages installed.
The core/mongodb service was successfully loaded
When I check the status of the supervisior I get this;
hab sup status
package type desired state elapsed (s) pid group
core/mongodb/3.6.4/20180717024452 standalone up down 86 mongodb.default
What happened? Why didn’t this start? I set some suggested debug flags like DEBUG=1 and / or RUST_LOG=debug and I still don’t end up with any indication of what went wrong. I went and looked into a few directories like /hab/pkgs/core/mongodb/3.6.4/20180717024452 and there’s no log of what happened. I suspect that it has something to do with the TOML host_ip being set to 127.0.0.1. OSX maybe looking for 0.0.0.0 and the app is getting confused.
In essence, Habitat is suppressing valuable application debug information. This is not an isolated example and I see people asking about failed loads all the time. What we need is to see the application output, through the loading, starting and into running of the application.
If I look at the core/mongodb run hook;
if [ “$(whoami)” = “root” ]; then
mongod --config /hab/svc/mongodb/config/mongod.conf 2>&1
exec mongod --config /hab/svc/mongodb/config/mongod.conf 2>&1
The start information is being redirected properly, Habitat is just not displaying the information.
In addition, there seems to be no process or mechanism in place to let a user know of the package usage. In this case, it would been helpful to let a user know that if you are running OSX, create an alternate TOML with host_ip=0.0.0.0. I would suggest that information should be displayed with the package on Builder for the consumer.
My concern is that as the Habitat product continues to gain momentum, people are going to be clogging up the issues process and getting frustrated with product without this type of functionality in place.