Configuration updates not working in rancher


#1

I am having trouble applying configuration updates to a habitat service running in rancher.
For testing, I have exported redis and postgresql packages to docker:

hab pkg install core/redis core/postgresql
hab pkg export docker core/redis
hab pkg export docker core/postgresql

I am using the following docker-compose.yml file:

redis:
  tty: true
  image: core/redis
  stdin_open: true
  command:
  - "--listen-peer"
  - "0.0.0.0"
  - "--listen-http"
  - "0.0.0.0"
  expose:
    - "9634/udp"
  ports:
    - 9634:9634/udp
postgresql:
  tty: true
  image: core/postgresql
  stdin_open: true
  command:
  - "--listen-peer"
  - "0.0.0.0"
  - "--listen-http"
  - "0.0.0.0"
  - "--peer"
  - "redis"
  links:
  - redis:redis
  expose:
    - "9634/udp"
  environment:
    HAB_POSTGRESQL: initdb_superuser_password="hab"

and rancher-compose.yml

redis:
  scale: 1
postgresql:
  scale: 1

Then running in rancher with:

rancher-compose -p stack1 up

I am exposing the 9634/udp port so that I can run hab config apply to apply configuration updates, e.g.

hab config apply --peer 192.168.99.100 redis.default 1 tmp/redis.config.toml

Applying a configuration update to redis.default works.
Applying a configuration update to postgresql.default does nothing.
I can see in the postgresql container that it has connected to the redis peer:

10/11/2016 12:00:52 PMe[36mhab-supe[0m(e[1;37mMNe[0m): Starting e[1;33mcore/postgresqle[0m
10/11/2016 12:00:52 PMe[36mhab-supe[0m(e[1;37mTPe[0m): Child process will run as user=hab, group=hab
10/11/2016 12:00:52 PMe[36mhab-supe[0m(e[1;37mGSe[0m): Supervisor 0.0.0.0: 9bb9d3a8-cf00-4c1d-a242-e077d4f46ddf
10/11/2016 12:00:52 PMe[36mhab-supe[0m(e[1;37mGSe[0m): Census postgresql.default: e7c35fdd-9f48-4a7f-8edd-fb408bfa4027
10/11/2016 12:00:52 PMe[36mhab-supe[0m(e[1;37mGSe[0m): Starting inbound gossip listener
10/11/2016 12:00:52 PMe[36mhab-supe[0m(e[1;37mGSe[0m): Joining gossip peer at redis:9634
10/11/2016 12:00:52 PMe[36mhab-supe[0m(e[1;37mGSe[0m): Starting outbound gossip distributor
10/11/2016 12:00:52 PMe[36mhab-supe[0m(e[1;37mGSe[0m): Starting gossip failure detector
10/11/2016 12:00:52 PMe[36mhab-supe[0m(e[1;37mCNe[0m): Starting census health adjuster

#2

I found a workaround to this problem:
https://github.com/habitat-sh/habitat/issues/864#issuecomment-253079424