habitat-sh / habitat

Modern applications with built-in automation
https://www.habitat.sh
Apache License 2.0
2.6k stars 314 forks source link

Hab sup fails to delete packages on startup with keep latest packages set #8477

Open y-me-y opened 2 years ago

y-me-y commented 2 years ago

Hab sup fails to delete packages on startup with keep latest packages set

OS

Seems to apply to all platforms at this point

Logs

No Debug Turned on

[19][default:/src:0]# sup-run && sup-log
--> Launching the Habitat Supervisor in the background...
    Running: hab sup run 
[1] 461
    * Use 'hab svc start' & 'hab svc stop' to start and stop services
    * Use 'sup-log' to tail the Supervisor's output (Ctrl+c to stop)
    * Use 'sup-term' to terminate the Supervisor
    * To pass custom arguments to run the Supervisor, export
      'HAB_STUDIO_SUP' with the arguments before running
      'hab studio enter'.

--> Tailing the Habitat Supervisor's output (use 'Ctrl+c' to stop)
Logging configuration file '/hab/sup/default/config/log.yml' not found; using default logging configuration
hab-sup(MR): core/hab-sup (core/hab-sup/1.6.420/20211101174842)
hab-sup(MR): Supervisor Member-ID 82bcba64698e4092a5555e5bc977a2b9
hab-sup(MR): Starting gossip-listener on 0.0.0.0:9638
hab-sup(MR): Starting core/nginx (core/nginx/1.21.3/20220201113020)
nginx.default(UCW): Watching user.toml
[2022-03-29T15:15:39Z ERROR habitat_sup::manager] Failed to uninstall 'core/nginx' packages keeping the '2' latest, err: Unable to contact the Supervisor.

If the Supervisor you are contacting is local, this probably means it is not running. You can run a Supervisor in the foreground with:

hab sup run

Or try restarting the Supervisor through your operating system's init process or Windows service.
hab-sup(MR): Starting ctl-gateway on 127.0.0.1:9632
hab-sup(MR): Starting http-gateway on 0.0.0.0:9631
nginx.default(SR): Initializing
nginx.default(SV): Starting service as user=root, group=hab

debug log

https://gist.github.com/y-me-y/76e64422e6fc7fcc6150a310da9f5803 - said body was too long for issue.

Hab Variables

HAB_ORIGIN=js
HAB_LICENSE=accept-no-persist
y-me-y commented 2 years ago

This still applies to core/hab-sup/1.6.477/20220321170739 - meant to update my env before running but the same issues appear on the newer supervisor version as well.

rahulgoel1 commented 2 years ago

Closing this one as another issue will be opened for this issue.

careiley commented 1 year ago

@rahulgoel1 - Did you ever create another issue for this?

rahulgoel1 commented 1 year ago

@careiley Opening this back up. This was my error and it was mostly due to confusion due of the content of the bug. The fact that this was closed does not mean that we were not tracking it. We had an item in our backlog corresponding to the bug.

careiley commented 1 year ago

Thanks, @rahulgoel1 . Let me know if we can provide any additional information. Cheers!