3ea38a9788
In upgrade scenarios, where config_db.json is not carry forwarded to new image, it could be left w/o TACACS credentials. Added a service to trigger 5 minutes after boot and restore TACACS, if /etc/sonic/old_config/tacacs.json is present. How I did it By adding a service, that would fire 5 mins after boot. This service apply tacacs if available. How to verify it Upgrade and watch status of tacacs.timer & tacacs.service You may create /etc/sonic/old_config/tacacs.json, with updated credentials (before 5mins after boot) and see that appears in config & persisted too.
13 lines
252 B
SYSTEMD
13 lines
252 B
SYSTEMD
[Unit]
|
|
Description=Delays tacacs apply until SONiC has started
|
|
PartOf=tacacs-config.service
|
|
After=updategraph.service
|
|
|
|
[Timer]
|
|
OnUnitActiveSec=0 sec
|
|
OnBootSec=5min 30 sec
|
|
Unit=tacacs-config.service
|
|
|
|
[Install]
|
|
WantedBy=timers.target updategraph.service
|