Bug 719911 - RHUA config rpm installation failed due to missing </Directory> tag
Summary: RHUA config rpm installation failed due to missing </Directory> tag
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Update Infrastructure for Cloud Providers
Classification: Red Hat
Component: RHUA
Version: 2.0
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
: ---
Assignee: Jay Dobies
QA Contact: wes hayutin
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-07-08 11:29 UTC by Sachin Ghai
Modified: 2012-05-31 12:51 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-05-31 12:51:32 UTC
Target Upstream Version:


Attachments (Terms of Use)
generated pulp.conf after installing rhua config rpm (2.57 KB, application/octet-stream)
2011-07-08 12:57 UTC, Sachin Ghai
no flags Details
Generated pulp.cong after upgrading rhua config rpm (2.47 KB, application/octet-stream)
2011-07-11 12:37 UTC, Sachin Ghai
no flags Details
the pulp.conf file (2.52 KB, application/octet-stream)
2011-07-14 20:24 UTC, Kedar Bidarkar
no flags Details

Description Sachin Ghai 2011-07-08 11:29:54 UTC
Description of problem:
Upgraded the rhui setup with new builds ( rhui-tools 2.0.35 and pulp 0.202)

After updating new build generated rhua config rpm and installed on rhua node.

rpm installation raised following error:

[root@dhcp193-51 ~]# rpm -ivh rh-rhua-config-2.0-2.el6.noarch.rpm 
Preparing...                ########################################### [100%]
   1:rh-rhua-config         ########################################### [100%]
Updating RHUA Server Configuration
grep: pulp.conf: No such file or directory
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: httpd: Syntax error on line 221 of /etc/httpd/conf/httpd.conf: Syntax error on line 80 of /etc/httpd/conf.d/pulp.conf: /etc/httpd/conf.d/pulp.conf:80: <Directory> was not closed.
[FAILED]
warning: %post(rh-rhua-config-2.0-2.el6.noarch) scriptlet failed, exit status 1

Version-Release number of selected component (if applicable):
[root@dhcp193-51 ~]# rpm -qa | grep rhui
rh-rhui-tools-2.0.35-1.el6.noarch
[root@dhcp193-51 ~]# rpm -qa | grep pulp
pulp-common-0.0.204-1.el6.noarch
pulp-client-0.0.204-1.el6.noarch
pulp-0.0.204-1.el6.noarch
[root@dhcp193-51 ~]# 


How reproducible:
everytime

Steps to Reproduce:
1. Generate rhua config rpm
2. Install the rhua config rpm on rhua node
  
Actual results:
[root@dhcp193-51 ~]# rpm -ivh rh-rhua-config-2.0-2.el6.noarch.rpm 
Preparing...                ########################################### [100%]
   1:rh-rhua-config         ########################################### [100%]
Updating RHUA Server Configuration
grep: pulp.conf: No such file or directory
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: httpd: Syntax error on line 221 of /etc/httpd/conf/httpd.conf: Syntax error on line 80 of /etc/httpd/conf.d/pulp.conf: /etc/httpd/conf.d/pulp.conf:80: <Directory> was not closed.
[FAILED]
warning: %post(rh-rhua-config-2.0-2.el6.noarch) scriptlet failed, exit status 1


Expected results:
Installation of rhua config rpm should be successfull.

Additional info:

Comment 1 Sachin Ghai 2011-07-08 12:10:03 UTC
I guess grep command should have the absolute path for pulp.conf in rh-rhua-config.spec file, 

>>LINE_NUM=`grep -n "/pulp/ks" pulp.conf | awk -F":" '{print $1}'`

Comment 2 Jay Dobies 2011-07-08 12:32:37 UTC
Please attach the whole pulp.conf file so I can see how far the RPM script got when trying to remove that entry.

Comment 3 Sachin Ghai 2011-07-08 12:57:16 UTC
Created attachment 511931 [details]
generated pulp.conf after installing rhua config rpm

The complete pulp.conf file is in attachment.

Comment 4 Jay Dobies 2011-07-08 13:26:17 UTC
commit 6eb3ed7a09a6c0d18392d5586824aac4eabc7737
Author: Jay Dobies <jason.dobies>
Date:   Fri Jul 8 09:24:26 2011 -0400

    719911 - Needed full path to pulp.conf

rhui-2.0/tools/etc/rhui/templates/rh-rhua-config.spec

Comment 5 Jay Dobies 2011-07-08 17:43:48 UTC
Fixed in 2.0.36.

Comment 6 Kedar Bidarkar 2011-07-11 05:32:32 UTC
Now rhua config rpm installs successfully.





Loaded plugins: amazon-id, pulp-profile-update, security
Setting up Local Package Process
error: not an rpm package
Cannot open: rh-rhua-config-2.0. Skipping.
Examining rh-rhua-config-2.0-2.el6.noarch.rpm: rh-rhua-config-2.0-2.el6.noarch
Marking rh-rhua-config-2.0-2.el6.noarch.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package rh-rhua-config.noarch 0:2.0-2.el6 set to be updated
--> Processing Dependency: qpid-cpp-server-ssl for package: rh-rhua-config-2.0-2.el6.noarch
--> Running transaction check
---> Package qpid-cpp-server-ssl.x86_64 0:0.10-6.el6 set to be updated
--> Processing Dependency: qpid-cpp-client-ssl = 0.10-6.el6 for package: qpid-cpp-server-ssl-0.10-6.el6.x86_64
--> Processing Dependency: libsslcommon.so.5()(64bit) for package: qpid-cpp-server-ssl-0.10-6.el6.x86_64
--> Running transaction check
---> Package qpid-cpp-client-ssl.x86_64 0:0.10-6.el6 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

=================================================================================================================================================================================
 Package                                     Arch                           Version                               Repository                                                Size
=================================================================================================================================================================================
Installing:
 rh-rhua-config                              noarch                         2.0-2.el6                             /rh-rhua-config-2.0-2.el6.noarch                         111 k
Installing for dependencies:
 qpid-cpp-client-ssl                         x86_64                         0.10-6.el6                            rhui-us-east-rhel-server-updates                         103 k
 qpid-cpp-server-ssl                         x86_64                         0.10-6.el6                            rhui-us-east-rhel-server-updates                          52 k

Transaction Summary
=================================================================================================================================================================================
Install       3 Package(s)
Upgrade       0 Package(s)

Total size: 266 k
Total download size: 155 k
Installed size: 562 k
Downloading Packages:
(1/2): qpid-cpp-client-ssl-0.10-6.el6.x86_64.rpm                                                                                                          | 103 kB     00:00     
(2/2): qpid-cpp-server-ssl-0.10-6.el6.x86_64.rpm                                                                                                          |  52 kB     00:00     
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                            453 kB/s | 155 kB     00:00     
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing     : qpid-cpp-client-ssl-0.10-6.el6.x86_64                                                                                                                     1/3 
  Installing     : qpid-cpp-server-ssl-0.10-6.el6.x86_64                                                                                                                     2/3 
  Installing     : rh-rhua-config-2.0-2.el6.noarch                                                                                                                           3/3 
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  ]
Consumer Id could not be found. Cannot update consumer profile.

Installed:
  rh-rhua-config.noarch 0:2.0-2.el6                                                                                                                                              

Dependency Installed:
  qpid-cpp-client-ssl.x86_64 0:0.10-6.el6                                                 qpid-cpp-server-ssl.x86_64 0:0.10-6.el6                                                

Complete!

Comment 7 Sachin Ghai 2011-07-11 12:37:44 UTC
Created attachment 512202 [details]
Generated pulp.cong after upgrading rhua config rpm

newly generated pulp.conf on 11 July.

Comment 8 Sachin Ghai 2011-07-11 12:50:16 UTC
I generated new rhua config rpm and upgrade it with rpm -Uvh command and this time again I got same error:

[root@dhcp201-111 ~]# rpm -Uvh rh-rhua-config-2.2-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 19 complete
Stopping httpd: [  OK  ]
Stopping Qpid AMQP daemon: [  OK  ]
Stopping mongod: [  OK  ]
Starting mongod: [  OK  ]
Starting Qpid AMQP daemon: [  OK  ]
Starting httpd: httpd: Syntax error on line 221 of /etc/httpd/conf/httpd.conf: Syntax error on line 76 of /etc/httpd/conf.d/pulp.conf: /etc/httpd/conf.d/pulp.conf:76: <Directory> was not closed.
[FAILED]
warning: %post(rh-rhua-config-2.2-2.el6.noarch) scriptlet failed, exit status 1


This happens only in case of config rpm upgrade. if I remove the previously installed rpm with rpm -e and install new generated config rpm then this issue is no loger reproducible.

It could be due to my setup configuarion. But just wanted to share the outcome.

Comment 9 Kedar Bidarkar 2011-07-14 20:10:20 UTC
Facing this issue again on re-installing, the same rpm or Upgrading it.



A clean re-install or Upgrade is desired.

Comment 10 Jay Dobies 2011-07-14 20:15:52 UTC
I don't understand what "A clean re-install or Upgrade is desired" means. Also, what do you mean by "on re-installing, the same rpm or Upgrading it".

Comment 11 Kedar Bidarkar 2011-07-14 20:16:40 UTC
[root@dhcp201-102 rhui]# rpm -Uvh rh-rhua-config-2.1-2.el6.noarch.rpm
Preparing...                ########################################### [100%]
   1:rh-rhua-config         ########################################### [100%]
Updating RHUA Server Configuration
Updating RHUA Repository Authentication Configuration
Updating Apache SSL Configuration
Starting mongod: [  OK  ]
data model in use matches the current version
database migration to version 19 complete
Stopping httpd: [FAILED]
Stopping Qpid AMQP daemon: [FAILED]
Stopping mongod: [  OK  ]
Starting mongod: [  OK  ]
Starting Qpid AMQP daemon: [  OK  ]
Starting httpd: httpd: Syntax error on line 221 of /etc/httpd/conf/httpd.conf: Syntax error on line 79 of /etc/httpd/conf.d/pulp.conf: /etc/httpd/conf.d/pulp.conf:79: <Directory> was not closed.
[FAILED]
warning: %post(rh-rhua-config-2.1-2.el6.noarch) scriptlet failed, exit status 1

Comment 12 Kedar Bidarkar 2011-07-14 20:24:46 UTC
Created attachment 513260 [details]
the pulp.conf file

Comment 13 Jay Dobies 2011-07-14 20:38:23 UTC
Just to be clear. It works fine on the first install of the RHUA config RPM, but anything after that (either uninstalling and reinstalling the same package or installing an upgraded package) causes this, correct?

I think it's an issue in the bash script I'm using to strip out the directory. I'm taking a look now.

Comment 14 Jay Dobies 2011-07-14 20:56:14 UTC
commit 8d063d799a9f0316e04c0185efff41a730ca9971
Author: Jay Dobies <jason.dobies>
Date:   Thu Jul 14 16:49:57 2011 -0400

    719911 - Only attempt to strip off the ks directory if it's there

rhui-2.0/tools/etc/rhui/templates/rh-rhua-config.spec

Comment 15 Jay Dobies 2011-07-14 20:57:30 UTC
Fixed in 2.0.38.

Comment 16 Sachin Ghai 2011-07-18 10:05:33 UTC
verified with new rhui-tools build 2.0.40.

The issue has been fixed. 

I was able to upgrade the rh-rhua-config rpm without any failure. This time I generated the rh-rhua-config rpm of version 2.2.

[root@dhcp201-141 rhui]# rpm -Uvh rh-rhua-config-2.2-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 19 complete
Stopping httpd: [  OK  ]
Stopping Qpid AMQP daemon: [  OK  ]
Stopping mongod: [  OK  ]
Starting mongod: [  OK  ]
Starting Qpid AMQP daemon: [  OK  ]
Starting httpd: [  OK  ]
[root@dhcp201-141 rhui]# 

Even I uninstalled the rhua config rpm and reinstalled it without any issue.

[root@dhcp201-141 rhui]# rpm -e rh-rhua-config
[root@dhcp201-141 rhui]# rpm -qa | grep rh-rhua-config
[root@dhcp201-141 rhui]# rpm -ivh rh-rhua-config-2.2-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 19 complete
Stopping httpd: [  OK  ]
Stopping Qpid AMQP daemon: [  OK  ]
Stopping mongod: [  OK  ]
Starting mongod: [  OK  ]
Starting Qpid AMQP daemon: [  OK  ]
Starting httpd: [  OK  ]
[root@dhcp201-141 rhui]#

Comment 17 wes hayutin 2011-08-01 21:38:31 UTC
moving to release pending

Comment 18 wes hayutin 2012-05-31 12:51:32 UTC
closing out, product released


Note You need to log in before you can comment on or make changes to this bug.