Packaging issue with CTA 4.7.8-1/4.7.9-1

Summary

Upgrading some rpms from 4.7.8-1 to 4.7.9-1 deleted configuration files on preproduction.

[root@cta-frontend01 ~]# yum distro-sync 'cta-*' 'ctaops-*' 'xrootd-*' 'eos-*'
...
Resolving Dependencies
--> Running transaction check
---> Package cta-catalogueutils.x86_64 0:4.7.8-1.el7.cern will be updated
---> Package cta-catalogueutils.x86_64 0:4.7.9-1.el7.cern will be an update
---> Package cta-cli.x86_64 0:4.7.8-1.el7.cern will be updated
---> Package cta-cli.x86_64 0:4.7.9-1.el7.cern will be an update
---> Package cta-common.x86_64 0:4.7.8-1.el7.cern will be updated
---> Package cta-common.x86_64 0:4.7.9-1.el7.cern will be an update
---> Package cta-debuginfo.x86_64 0:4.7.8-1.el7.cern will be updated
---> Package cta-debuginfo.x86_64 0:4.7.9-1.el7.cern will be an update
---> Package cta-frontend.x86_64 0:4.7.8-1.el7.cern will be updated
---> Package cta-frontend.x86_64 0:4.7.9-1.el7.cern will be an update
---> Package cta-lib.x86_64 0:4.7.8-1.el7.cern will be updated
---> Package cta-lib.x86_64 0:4.7.9-1.el7.cern will be an update
---> Package cta-lib-catalogue.x86_64 0:4.7.8-1.el7.cern will be updated
---> Package cta-lib-catalogue.x86_64 0:4.7.9-1.el7.cern will be an update
---> Package cta-lib-common.x86_64 0:4.7.8-1.el7.cern will be updated
---> Package cta-lib-common.x86_64 0:4.7.9-1.el7.cern will be an update
---> Package cta-objectstore-tools.x86_64 0:4.7.8-1.el7.cern will be updated
---> Package cta-objectstore-tools.x86_64 0:4.7.9-1.el7.cern will be an update
--> Finished Dependency Resolution
Beginning Kernel Module Plugin
Finished Kernel Module Plugin

Dependencies Resolved

=========================================================================================
 Package                     Arch         Version                 Repository        Size
=========================================================================================
Updating:
 cta-catalogueutils          x86_64       4.7.9-1.el7.cern        cta-ci-cta       180 k
 cta-cli                     x86_64       4.7.9-1.el7.cern        cta-ci-cta       1.5 M
 cta-common                  x86_64       4.7.9-1.el7.cern        cta-ci-cta       8.7 k
 cta-debuginfo               x86_64       4.7.9-1.el7.cern        cta-ci-cta        42 M
 cta-frontend                x86_64       4.7.9-1.el7.cern        cta-ci-cta       995 k
 cta-lib                     x86_64       4.7.9-1.el7.cern        cta-ci-cta       2.4 M
 cta-lib-catalogue           x86_64       4.7.9-1.el7.cern        cta-ci-cta       1.1 M
 cta-lib-common              x86_64       4.7.9-1.el7.cern        cta-ci-cta       329 k
 cta-objectstore-tools       x86_64       4.7.9-1.el7.cern        cta-ci-cta       180 k

Transaction Summary
=========================================================================================
Upgrade  9 Packages

Total download size: 49 M
Is this ok [y/d/N]: y
Downloading packages:
No Presto metadata available for cta-ci-cta
cta-catalogueutils-4.7.9-1.el7.cern.x86_64.rpm                    | 180 kB  00:00:00     
cta-cli-4.7.9-1.el7.cern.x86_64.rpm                               | 1.5 MB  00:00:00     
cta-common-4.7.9-1.el7.cern.x86_64.rpm                            | 8.7 kB  00:00:00     
cta-debuginfo-4.7.9-1.el7.cern.x86_64.rpm                         |  42 MB  00:00:00     
cta-frontend-4.7.9-1.el7.cern.x86_64.rpm                          | 995 kB  00:00:00     
cta-lib-4.7.9-1.el7.cern.x86_64.rpm                               | 2.4 MB  00:00:00     
cta-lib-catalogue-4.7.9-1.el7.cern.x86_64.rpm                     | 1.1 MB  00:00:00     
cta-lib-common-4.7.9-1.el7.cern.x86_64.rpm                        | 329 kB  00:00:00     
cta-objectstore-tools-4.7.9-1.el7.cern.x86_64.rpm                 | 180 kB  00:00:00     
-----------------------------------------------------------------------------------------
Total                                                        44 MB/s |  49 MB  00:01     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Updating   : cta-lib-common-4.7.9-1.el7.cern.x86_64                               1/18 
  Updating   : cta-lib-catalogue-4.7.9-1.el7.cern.x86_64                            2/18 
  Updating   : cta-lib-4.7.9-1.el7.cern.x86_64                                      3/18 
  Updating   : cta-common-4.7.9-1.el7.cern.x86_64                                   4/18 
  Updating   : cta-frontend-4.7.9-1.el7.cern.x86_64                                 5/18 
  Updating   : cta-objectstore-tools-4.7.9-1.el7.cern.x86_64                        6/18 
  Updating   : cta-catalogueutils-4.7.9-1.el7.cern.x86_64                           7/18 
  Updating   : cta-cli-4.7.9-1.el7.cern.x86_64                                      8/18 
  Updating   : cta-debuginfo-4.7.9-1.el7.cern.x86_64                                9/18 
  Cleanup    : cta-frontend-4.7.8-1.el7.cern.x86_64                                10/18 
warning: /etc/cta/cta-frontend-xrootd.conf saved as /etc/cta/cta-frontend-xrootd.conf.rpmsave
  Cleanup    : cta-objectstore-tools-4.7.8-1.el7.cern.x86_64                       11/18 
  Cleanup    : cta-catalogueutils-4.7.8-1.el7.cern.x86_64                          12/18 
  Cleanup    : cta-lib-catalogue-4.7.8-1.el7.cern.x86_64                           13/18 
  Cleanup    : cta-lib-4.7.8-1.el7.cern.x86_64                                     14/18 
  Cleanup    : cta-cli-4.7.8-1.el7.cern.x86_64                                     15/18 
warning: /etc/cta/cta-cli.conf saved as /etc/cta/cta-cli.conf.rpmsave
  Cleanup    : cta-common-4.7.8-1.el7.cern.x86_64                                  16/18 
  Cleanup    : cta-debuginfo-4.7.8-1.el7.cern.x86_64                               17/18 
  Cleanup    : cta-lib-common-4.7.8-1.el7.cern.x86_64                              18/18 
  Verifying  : cta-lib-common-4.7.9-1.el7.cern.x86_64                               1/18 
  Verifying  : cta-catalogueutils-4.7.9-1.el7.cern.x86_64                           2/18 
  Verifying  : cta-lib-catalogue-4.7.9-1.el7.cern.x86_64                            3/18 
  Verifying  : cta-cli-4.7.9-1.el7.cern.x86_64                                      4/18 
  Verifying  : cta-objectstore-tools-4.7.9-1.el7.cern.x86_64                        5/18 
  Verifying  : cta-lib-4.7.9-1.el7.cern.x86_64                                      6/18 
  Verifying  : cta-debuginfo-4.7.9-1.el7.cern.x86_64                                7/18 
  Verifying  : cta-common-4.7.9-1.el7.cern.x86_64                                   8/18 
  Verifying  : cta-frontend-4.7.9-1.el7.cern.x86_64                                 9/18 
  Verifying  : cta-catalogueutils-4.7.8-1.el7.cern.x86_64                          10/18 
  Verifying  : cta-common-4.7.8-1.el7.cern.x86_64                                  11/18 
  Verifying  : cta-lib-catalogue-4.7.8-1.el7.cern.x86_64                           12/18 
  Verifying  : cta-objectstore-tools-4.7.8-1.el7.cern.x86_64                       13/18 
  Verifying  : cta-lib-4.7.8-1.el7.cern.x86_64                                     14/18 
  Verifying  : cta-lib-common-4.7.8-1.el7.cern.x86_64                              15/18 
  Verifying  : cta-frontend-4.7.8-1.el7.cern.x86_64                                16/18 
  Verifying  : cta-cli-4.7.8-1.el7.cern.x86_64                                     17/18 
  Verifying  : cta-debuginfo-4.7.8-1.el7.cern.x86_64                               18/18 

Updated:
  cta-catalogueutils.x86_64 0:4.7.9-1.el7.cern                                           
  cta-cli.x86_64 0:4.7.9-1.el7.cern                                                      
  cta-common.x86_64 0:4.7.9-1.el7.cern                                                   
  cta-debuginfo.x86_64 0:4.7.9-1.el7.cern                                                
  cta-frontend.x86_64 0:4.7.9-1.el7.cern                                                 
  cta-lib.x86_64 0:4.7.9-1.el7.cern                                                      
  cta-lib-catalogue.x86_64 0:4.7.9-1.el7.cern                                            
  cta-lib-common.x86_64 0:4.7.9-1.el7.cern                                               
  cta-objectstore-tools.x86_64 0:4.7.9-1.el7.cern                                        

Complete!
[root@cta-frontend01 ~]# cta-admin dr ls
Error from XRootD SSI Framework: Failed to open /etc/cta/cta-cli.conf
[root@cta-frontend01 ~]# ls /etc/cta/cta-frontend-xrootd.conf
ls: cannot access /etc/cta/cta-frontend-xrootd.conf: No such file or directory

Looks like the Cleanup step moved files to <filename>.rpmsave:

  Updating   : cta-frontend-4.7.9-1.el7.cern.x86_64                                 5/18 
  Cleanup    : cta-frontend-4.7.8-1.el7.cern.x86_64                                10/18 
warning: /etc/cta/cta-frontend-xrootd.conf saved as /etc/cta/cta-frontend-xrootd.conf.rpmsave

and:

  Updating   : cta-cli-4.7.9-1.el7.cern.x86_64                                      8/18 
  Cleanup    : cta-cli-4.7.8-1.el7.cern.x86_64                                     15/18 
warning: /etc/cta/cta-cli.conf saved as /etc/cta/cta-cli.conf.rpmsave

The frontend is active as the new binary is started when /etc/cta/cta-frontend-xrootd.conf still exists, but all cta-admin commands that we are using during the deployment are broken as it misses /etc/cta/cta-cli.conf.

Steps to reproduce

Just type the previous command.

What is the current bug behaviour?

Configuration files are disappearing and only recreated at the next puppet run.

What is the expected correct behaviour?

Existing configuration files should be kept and not moved around or modified by installed CTA RPMs.

Edited by Julien Leduc