Closed amdprophet closed 7 years ago
As a test I built a CentOS 7 0.29.0-3011 RPM with these changes. I installed 0.29.0-7 in a VM and appended FOO=BAR
to /etc/default/sensu
with the expectation that my modifications would be kept in an upgrade. Unfortunately they did not.
[root@localhost vagrant]# cat /etc/default/sensu
EMBEDDED_RUBY=true
[root@localhost vagrant]# echo 'FOO=BAR' >> /etc/default/sensu
[root@localhost vagrant]# cat /etc/default/sensu
EMBEDDED_RUBY=true
FOO=BAR
[root@localhost vagrant]# rpm -Uvh sensu-0.29.0-3011.el7.x86_64.rpm
warning: sensu-0.29.0-3011.el7.x86_64.rpm: Header V4 RSA/SHA1 Signature, key ID 8c2d8ffa: NOKEY
Preparing... ################################# [100%]
Updating / installing...
1:sensu-1:0.29.0-3011.el7 ################################# [ 50%]
Cleaning up / removing...
2:sensu-1:0.29.0-7.el7 ################################# [100%]
[root@localhost vagrant]# cat /etc/default/sensu
EMBEDDED_RUBY=true
[root@localhost vagrant]#
This is probably because the file was an extra package file in the previously installed version. In order to test this we'll need two builds with this fix. Install one and then upgrade to the other. Unfortunately I'm not sure there's anything we'll be able to do to keep modified defaults from builds without this fix.
On Tue, Apr 25, 2017, 8:44 PM Cameron Johnston notifications@github.com wrote:
As a test I built a CentOS 7 0.29.0-3011 RPM with these changes. I installed 0.29.0-7 in a VM and appended FOO=BAR to /etc/default/sensu with the expectation that my modifications would be kept in an upgrade. Unfortunately they did not.
[root@localhost vagrant]# cat /etc/default/sensu EMBEDDED_RUBY=true [root@localhost vagrant]# echo 'FOO=BAR' >> /etc/default/sensu [root@localhost vagrant]# cat /etc/default/sensu EMBEDDED_RUBY=true FOO=BAR [root@localhost vagrant]# rpm -Uvh sensu-0.29.0-3011.el7.x86_64.rpm warning: sensu-0.29.0-3011.el7.x86_64.rpm: Header V4 RSA/SHA1 Signature, key ID 8c2d8ffa: NOKEY Preparing... ################################# [100%] Updating / installing... 1:sensu-1:0.29.0-3011.el7 ################################# [ 50%] Cleaning up / removing... 2:sensu-1:0.29.0-7.el7 ################################# [100%] [root@localhost vagrant]# cat /etc/default/sensu EMBEDDED_RUBY=true [root@localhost vagrant]#
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/sensu/sensu-omnibus/pull/208#issuecomment-297229446, or mute the thread https://github.com/notifications/unsubscribe-auth/AAHXU9VyIX_YAGGT2qhmp2rQFGJuSvs6ks5rzr2vgaJpZM4NH4PP .
@amdprophet makes sense to me. I am building 0.29.0-3012 to test this theory.
@amdprophet still seeing /etc/default/sensu being overwritten:
[root@localhost ~]# rpm -i sensu-0.29.0-3011.el7.x86_64.rpm
warning: sensu-0.29.0-3011.el7.x86_64.rpm: Header V4 RSA/SHA1 Signature, key ID 8c2d8ffa: NOKEY
[root@localhost ~]# cat /etc/default/sensu
EMBEDDED_RUBY=true
[root@localhost ~]# echo "foo=bar" >> /etc/default/sensu
[root@localhost ~]# cat /etc/default/sensu
EMBEDDED_RUBY=true
foo=bar
[root@localhost ~]# rpm -Uvh sensu-0.29.0-3012.el7.x86_64.rpm
warning: sensu-0.29.0-3012.el7.x86_64.rpm: Header V4 RSA/SHA1 Signature, key ID 8c2d8ffa: NOKEY
Preparing... ################################# [100%]
Updating / installing...
1:sensu-1:0.29.0-3012.el7 ################################# [ 50%]
Cleaning up / removing...
2:sensu-1:0.29.0-3011.el7 ################################# [100%]
[root@localhost ~]# cat /etc/default/sensu
EMBEDDED_RUBY=true
[root@localhost ~]#
I think the 3011 and 3012 builds were missing the needed override values for project_revision
to check out these changes. I am also seeing errors related to GPG signing RPMs which we can't quite account for yet. I am going to merge this to master and see if we can get a working build to test.
Should fix #166 for Linux packages only. The packagers on other platforms will likely need some work to specify Omnibus-specified "config_files" as configuration files. This needs to be tested.