-
Notifications
You must be signed in to change notification settings - Fork 69
Description
Our SONiC on Ubuntu needs to control the service start sequence with patterns such as: B starts after A has exited.
According to the Pebble documentation on service start order, the suggested pattern is: bash -c 'run-service-a && run-service-b'
However, this approach does not work for fanout dependency patterns where multiple services depend on one service’s completion.
To achieve similar behavior, we currently have to use a workaround as below:
Supervisord config (current SONiC community behavior)
[programstart]
dependent_startup_wait_for=rsyslogd:running
[program:lldpd]
dependent_startup_wait_for=start:exited
[program:lldpmgrd]
dependent_startup_wait_for=start:exited
Pebble config (workaround):
start::
command: bash -c "/usr/bin/start.sh && touch /tmp/start_ok"
after: [ rsyslogd ]
lldpd:
command: bash -c "test -f /tmp/start_ok && exec /usr/sbin/lldpd"
lldpmgrd:
command: bash -c "test -f /tmp/start_ok && exec /usr/bin/lldpmgrd"
This workaround causes excessive error logs because downstream services repeatedly retry and fail until the upstream service exits. It makes troubleshooting difficult. We would like pebble to support a native dependency pattern where a service can start after another service has exited.