mirror of https://github.com/sipwise/ngcpcfg.git
Unfortunately git doesn't track POSIX file permissions, which cause perms drop on some git commands like 'git stash/pull/reset', etc. We must be sure 'restore-permissions' always executed at the end of 'ngcpcfg'. Also we must be sure we update .ngcpcfg_perms whenever we start 'ngcpcfg', otherwise we might loose not-yet committed changes in .ngcpcfg_perms. Example during the upgrade mr7.0->mr7.1: 1) JFYI, ngcpcfg mr7.1+ copies perms from source tt2 file to the destination config 2) on mr7.0->mr7.1, ngcp-upgrade installs new package ngcp-templates-pro package with new perms on tt2 files (which are not committed by apt as /etc/ngcp-config is not covered by 'etckeeper', it is by design). 3) later ngcp-upgrade executes 'ngcpcfg build' to build some config. 4) on PRO/Carrier 'ngcpcfg build' executes 'ngcpcfg pull' first to ensure there is no outstanding changes on shared git repo (has been done on Ops request in MT#15803). 5) 'ngcpcfg pull' does 'git stash/pop' before pulling which effectively reset new perms which came from package in step 1 (as git doesn't track perms on files, by design). Summary/fix: whenever we stash something we should ensure perms are stored as well, which means we need to generate new .ngcpcfg_perms and store it in stash together with all the rest local changes. Change-Id: I5292d4433a39ff2751874d63083f093f19b9cfe2changes/21/25021/9
parent
b2c87aa4a9
commit
505d6566d8
Loading…
Reference in new issue