Bug 860822

Summary: aeolus-conductor RPM upgrade deletes settings.yml
Product: CloudForms Cloud Engine Reporter: Angus Thomas <athomas>
Component: aeolus-conductorAssignee: John Eckersberg <jeckersb>
Status: CLOSED ERRATA QA Contact: Giulio Fidente <gfidente>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 1.0.0CC: asettle, dmacpher, gfidente, jeckersb, jlaska, lbrindle, morazi, slinaber, sshveta
Target Milestone: beta4Keywords: Triaged
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: aeolus-conductor-0.13.18-1.el6cf Doc Type: Bug Fix
Doc Text:
Upgrading from aeolus-conductor-0.13.6-1.el6cf to aeolus-conductor-0.13.14-1.el6cf removed the /usr/share/aeolus-conductor/config/settings.yml file, which prevented conductor-delayed_job and aeolus-conductor from starting. This fis changes the behavior so that the /usr/share/aeolus-conductor/config/settings.yml file is saved as .rpmsave, and the newer version of the file is installed. Upgrading aeolus-conductor now works as expected and the /usr/share/aeolus-conductor/config/settings.yml file is preserved.
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-12-04 10:21:58 EST Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description Angus Thomas 2012-09-26 15:33:05 EDT
Description of problem:


After upgrade from aeolus-conductor-0.13.6-1.el6cf to aeolus-conductor-0.13.14-1.el6cf, /usr/share/aeolus-conductor/config/settings.yml is gone.

That prevents conductor-delayed_job and aeolus-conductor from starting 

Version-Release number of selected component (if applicable):
aeolus-conductor-0.13.14-1.el6cf

How reproducible:
Always

Steps to Reproduce:
1. Happily run a previous version of CE
2. Upgrade to aeolus-conductor-0.13.14-1.el6cf
3. Run aeolus-restart-services
  
Actual results:
conductor-delayed_job and aeolus-conductor do not start 

Expected results:
They should

Additional info:
Comment 2 John Eckersberg 2012-09-28 19:17:28 EDT
https://github.com/aeolusproject/conductor/pull/80
Comment 3 John Eckersberg 2012-10-04 11:51:20 EDT
On 1.1 as 90c5bfb
Comment 5 Giulio Fidente 2012-10-19 08:46:28 EDT
the old file is now saved as .rpmsave, the newer version is installed.

in doing so, the consumer_key and consumer_secret from the old file are lost but conductor seems to read those from a different file: /usr/share/aeolus-conductor/config/oauth.json

if there is no need to copy those into settings.yml, then I will move the bug to VERIFIED, but please help me on this
Comment 6 Shveta 2012-10-24 18:11:34 EDT
rpm -qa|grep aeolus-conductor
aeolus-conductor-0.13.20-1.el6cf.noarch

=====================================================

yum update aeolus-conductor
Loaded plugins: product-id, security, subscription-manager
Updating certificate-based repositories.
Unable to read consumer identity
beaker-HighAvailability                                                                                                                                                                                               | 4.0 kB     00:00     
beaker-LoadBalancer                                                                                                                                                                                                   | 3.9 kB     00:00     
beaker-ResilientStorage                                                                                                                                                                                               | 4.0 kB     00:00     
beaker-ScalableFileSystem                                                                                                                                                                                             | 4.0 kB     00:00     
beaker-Server                                                                                                                                                                                                         | 4.0 kB     00:00     
beaker-debuginfo                                                                                                                                                                                                      | 3.0 kB     00:00     
beaker-harness                                                                                                                                                                                                        | 1.2 kB     00:00     
beaker-optional                                                                                                                                                                                                       | 3.8 kB     00:00     
beaker-tasks                                                                                                                                                                                                          | 1.3 kB     00:00     
update                                                                                                                                                                                                                | 1.2 kB     00:00     
Setting up Update Process
No Packages marked for Update
[root@hp-xw8400-01 ~]# vi /etc/yum.repos.d/aeolus_puddle_5.repo 
[root@hp-xw8400-01 ~]# yum update aeolus-conductor
Loaded plugins: product-id, security, subscription-manager
Updating certificate-based repositories.
Unable to read consumer identity
update                                                                                                                                                                                                                | 1.2 kB     00:00     
update/primary                                                                                                                                                                                                        |  67 kB     00:00     
update                                                                                                                                                                                                                               269/269
Setting up Update Process
Resolving Dependencies
--> Running transaction check
---> Package aeolus-conductor.noarch 0:0.13.20-1.el6cf will be updated
--> Processing Dependency: aeolus-conductor = 0.13.20-1.el6cf for package: aeolus-conductor-doc-0.13.20-1.el6cf.noarch
--> Processing Dependency: aeolus-conductor = 0.13.20-1.el6cf for package: aeolus-conductor-daemons-0.13.20-1.el6cf.noarch
---> Package aeolus-conductor.noarch 0:0.13.21-1.el6cf will be an update
--> Running transaction check
---> Package aeolus-conductor-daemons.noarch 0:0.13.20-1.el6cf will be updated
--> Processing Dependency: aeolus-conductor-daemons = 0.13.20-1.el6cf for package: aeolus-all-0.13.20-1.el6cf.noarch
---> Package aeolus-conductor-daemons.noarch 0:0.13.21-1.el6cf will be an update
---> Package aeolus-conductor-doc.noarch 0:0.13.20-1.el6cf will be updated
---> Package aeolus-conductor-doc.noarch 0:0.13.21-1.el6cf will be an update
--> Running transaction check
---> Package aeolus-all.noarch 0:0.13.20-1.el6cf will be updated
---> Package aeolus-all.noarch 0:0.13.21-1.el6cf will be an update
--> Finished Dependency Resolution

Dependencies Resolved

=============================================================================================================================================================================================================================================
 Package                                                             Arch                                              Version                                                       Repository                                         Size
=============================================================================================================================================================================================================================================
Updating:
 aeolus-conductor                                                    noarch                                            0.13.21-1.el6cf                                               update                                            3.1 M
Updating for dependencies:
 aeolus-all                                                          noarch                                            0.13.21-1.el6cf                                               update                                             19 k
 aeolus-conductor-daemons                                            noarch                                            0.13.21-1.el6cf                                               update                                             30 k
 aeolus-conductor-doc                                                noarch                                            0.13.21-1.el6cf                                               update                                             24 k

Transaction Summary
=============================================================================================================================================================================================================================================
Upgrade       4 Package(s)

Total download size: 3.2 M
Is this ok [y/N]: y
Downloading Packages:
(1/4): aeolus-all-0.13.21-1.el6cf.noarch.rpm                                                                                                                                                                          |  19 kB     00:00     
(2/4): aeolus-conductor-0.13.21-1.el6cf.noarch.rpm                                                                                                                                                                    | 3.1 MB     00:00     
(3/4): aeolus-conductor-daemons-0.13.21-1.el6cf.noarch.rpm                                                                                                                                                            |  30 kB     00:00     
(4/4): aeolus-conductor-doc-0.13.21-1.el6cf.noarch.rpm                                                                                                                                                                |  24 kB     00:00     
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                                                                                        6.8 MB/s | 3.2 MB     00:00     
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Updating   : aeolus-conductor-0.13.21-1.el6cf.noarch                                                                                                                                                                                   1/8 
  Updating   : aeolus-conductor-daemons-0.13.21-1.el6cf.noarch                                                                                                                                                                           2/8 
  Updating   : aeolus-conductor-doc-0.13.21-1.el6cf.noarch                                                                                                                                                                               3/8 
  Updating   : aeolus-all-0.13.21-1.el6cf.noarch                                                                                                                                                                                         4/8 
  Cleanup    : aeolus-all-0.13.20-1.el6cf.noarch                                                                                                                                                                                         5/8 
  Cleanup    : aeolus-conductor-daemons-0.13.20-1.el6cf.noarch                                                                                                                                                                           6/8 
  Cleanup    : aeolus-conductor-doc-0.13.20-1.el6cf.noarch                                                                                                                                                                               7/8 
  Cleanup    : aeolus-conductor-0.13.20-1.el6cf.noarch                                                                                                                                                                                   8/8 
Installed products updated.
  Verifying  : aeolus-conductor-daemons-0.13.21-1.el6cf.noarch                                                                                                                                                                           1/8 
  Verifying  : aeolus-conductor-0.13.21-1.el6cf.noarch                                                                                                                                                                                   2/8 
  Verifying  : aeolus-all-0.13.21-1.el6cf.noarch                                                                                                                                                                                         3/8 
  Verifying  : aeolus-conductor-doc-0.13.21-1.el6cf.noarch                                                                                                                                                                               4/8 
  Verifying  : aeolus-conductor-0.13.20-1.el6cf.noarch                                                                                                                                                                                   5/8 
  Verifying  : aeolus-conductor-doc-0.13.20-1.el6cf.noarch                                                                                                                                                                               6/8 
  Verifying  : aeolus-conductor-daemons-0.13.20-1.el6cf.noarch                                                                                                                                                                           7/8 
  Verifying  : aeolus-all-0.13.20-1.el6cf.noarch                                                                                                                                                                                         8/8 

Updated:
  aeolus-conductor.noarch 0:0.13.21-1.el6cf                                                                                                                                                                                                  

Dependency Updated:
  aeolus-all.noarch 0:0.13.21-1.el6cf                                   aeolus-conductor-daemons.noarch 0:0.13.21-1.el6cf                                   aeolus-conductor-doc.noarch 0:0.13.21-1.el6cf                                  

Complete!
====================================================
[root@hp-xw8400-01 ~]# aeolus-restart-services 

# service ntpd stop ...
 Success

# service imagefactory stop ...
 Success

# service conductor-dbomatic stop ...
 Success

# service conductor-delayed_job stop ...
/usr/share/aeolus-conductor/app/util/deployable_xml.rb:210: warning: already initialized constant DEPLOYABLE_VERSION
 Success

# service aeolus-conductor stop ...
 Success

# service libvirtd stop ...
 Success

# service deltacloud-core stop ...
 Success

# service httpd stop ...
 Success

# service postgresql stop ...
 Success

# service iwhd stop ...
 Success

# service mongod stop ...
 Success

# service mongod start ...
 Success

# service iwhd start ...
 Success

# service postgresql start ...
 Success

# service httpd start ...
 Success

# service deltacloud-core start ...
 Success

# service libvirtd start ...
 Success

# service aeolus-conductor start ...
 Success

# service conductor-delayed_job start ...
/usr/share/aeolus-conductor/app/util/deployable_xml.rb:210: warning: already initialized constant DEPLOYABLE_VERSION
 Success

# service conductor-dbomatic start ...
 Success

# service imagefactory start ...
 Success

# service ntpd start ...
 Success

# service mongod status ...
 Success

===========================================================================

cat /usr/share/aeolus-conductor/config/settings.yml
:default_deltacloud_url: http://localhost:3002/api

:auth:
  # supported strategies: database, ldap
  :strategy: database
:groups:
  # allows locally-managed groups
  :enable_local: true
  # allows ldap-managed groups
  :enable_ldap: true
:iwhd:
  :url: http://localhost:9090
  :oauth:
    :consumer_key: +hRMFTublD/4/Qjzg+0FCTuNp8sIn6CL
    :consumer_secret: s469crSEPhgBuprnWPG8F4Pv7cDGaKsa
 
:imagefactory:
  :url: https://localhost:8075/imagefactory
  :oauth:
    :consumer_key: noU2dklK5L4vTR2o6SvZA2i1zxQh44IH
    :consumer_secret: bxmNr4mj5/Yw0k6yOfyZR/HegpQsJfb2

:session:
  :timeout: 15 # minutes
==================================================================

So upgraded aeolus-conductor ..
/usr/share/aeolus-conductor/config/settings.yml file is safe ..
Moving it to verified
Comment 8 errata-xmlrpc 2012-12-04 10:21:58 EST
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHEA-2012-1516.html