Description of problem: Upgraded the pulp/RHUI setup from pulp 0.181 to pulp 0.185 rhui-tools 2.0.25 to 2.0.26 I generated all config rpm after updating the new answer file (cause new naswer file has ca_cert entry ). Since I was uusing the existing setup, i removed all previously generated config rpms using "rpm -e <rpm_name>". When I installed new config rpm, I got following: [root@dhcp193-79 ~]# rpm -ivh rh-rhua-config-2.0-2.el6.noarch.rpm Preparing... ########################################### [100%] 1:rh-rhua-config ########################################### [100%] Updating RHUA Server Configuration Updating RHUA Repository Authentication Configuration Updating Apache SSL Configuration data model in use matches the current version database migration to version 14 complete Stopping httpd: [FAILED] Stopping Qpid AMQP daemon: [ OK ] Stopping mongod: [ OK ] Starting mongod: [ OK ] Starting Qpid AMQP daemon: 2011-06-02 12:58:18 critical Unexpected error: Error in configuration file /etc/qpidd.conf: multiple_occurrences Use --help to see valid options [FAILED] warning: %post(rh-rhua-config-2.0-2.el6.noarch) scriptlet failed, exit status 1 [root@dhcp193-79 ~]# This is because qpidd.conf file was already updated with certs. And when I installed new rhua config rpm, this rpm has appended one more entry of ssl certs. This should be a clean process. Version-Release number of selected component (if applicable): pulp 0.185 rhui-tools 2.0.26 How reproducible: always Steps to Reproduce: 1. Generated new config rpms using rhui-installer 2. Remove the existing config rpm from rhua node 3. Install newly generated config rpm Actual results: Starting Qpid AMQP daemon: 2011-06-02 12:58:18 critical Unexpected error: Error in configuration file /etc/qpidd.conf: multiple_occurrences Use --help to see valid options Expected results: should be a clean process; Instead of appending qpidd.conf, it should be overwrite with new ssl certs entries. Additional info:
Good pickup. The qpid configuration is different than pulp's in that it appends to the conf file instead of using sed, which means it's not upgrade safe. I'll take a look.
commit d17be92861244f30c320e5dbe8b18ef5ce37a1e5 Author: Jay Dobies <jason.dobies> Date: Thu Jun 2 09:24:46 2011 -0400 709994 - Need to clean up from a previous RHUA config RPM so we don't get duplicate entries on an upgrade. rhui-2.0/tools/etc/rhui/templates/rh-rhua-config.spec One thing to note, this will _not_ work with existing installs from RHUI Tools 2.0.26 or earlier. Here's why: In order to be able to easily clean up the entries we add, I added a comment to the end of each of them to flag them for a simple sed script. That comment won't be present in configuration generated from 2.0.26 and earlier, so the cleanup won't work. You can simulate it by manually adding those comments to your current qpidd.conf file. Then when you upgrade to the version of RHUI Tools that this fix is included in, it will perform the cleanup. Below is a sample of qpidd.conf with the comments in place: # SSL - Added by RHUI Installer require-encryption=yes # RHUI ssl-require-client-authentication=yes # RHUI ssl-cert-db=/etc/pki/rhua/qpid-nss # RHUI ssl-cert-password-file=/etc/pki/rhua/qpid-nss/password # RHUI ssl-cert-name=broker # RHUI ssl-port=5674 # RHUI Note the "# RHUI" comment at the end of each line. The RHUA config RPM now runs: sed -i -e "s/.*RHUI.*//g" /etc/qpidd.conf Before appending the configuration to qpidd.conf. That way, if those lines are present, they are removed first. If they aren't, nothing happens.
added to rhui-20 tracker
Upgrade is now a clean process. it overwrites instead of appending Examining rh-rhua-config-2.0-2.el6.noarch.rpm: rh-rhua-config-2.0-2.el6.noarch rh-rhua-config-2.0-2.el6.noarch.rpm: does not update installed package. error: not an rpm package Cannot open: rh-rhua-config-2.2. Skipping. Examining rh-rhua-config-2.2-2.el6.noarch.rpm: rh-rhua-config-2.2-2.el6.noarch Marking rh-rhua-config-2.2-2.el6.noarch.rpm as an update to rh-rhua-config-2.0-2.el6.noarch Resolving Dependencies --> Running transaction check ---> Package rh-rhua-config.noarch 0:2.2-2.el6 set to be updated --> Finished Dependency Resolution Dependencies Resolved ================================================================================================================================================================================= Package Arch Version Repository Size ================================================================================================================================================================================= Updating: rh-rhua-config noarch 2.2-2.el6 /rh-rhua-config-2.2-2.el6.noarch 111 k Transaction Summary ================================================================================================================================================================================= Install 0 Package(s) Upgrade 1 Package(s) Total size: 111 k Downloading Packages: Running rpm_check_debug Running Transaction Test Transaction Test Succeeded Running Transaction Updating : rh-rhua-config-2.2-2.el6.noarch 1/2 Updating RHUA Server Configuration Updating RHUA Repository Authentication Configuration Updating Apache SSL Configuration data model in use matches the current version database migration to version 19 complete Stopping httpd: [ OK ] Stopping Qpid AMQP daemon: [ OK ] Stopping mongod: [ OK ] Starting mongod: [ OK ] Starting Qpid AMQP daemon: [ OK ] Starting httpd: [ OK ] Cleanup : rh-rhua-config-2.0-2.el6.noarch 2/2 Consumer Id could not be found. Cannot update consumer profile. Updated: rh-rhua-config.noarch 0:2.2-2.el6 Complete!
moving to release pending
closing out, product released