Bug 751088 - [RFE] configserver cannot run w/ conductor on the same box
Summary: [RFE] configserver cannot run w/ conductor on the same box
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: CloudForms Cloud Engine
Classification: Retired
Component: aeolus-configserver
Version: 1.0.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: beta3
Assignee: Greg Blomquist
QA Contact: dgao
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-11-03 13:56 UTC by dgao
Modified: 2012-12-04 14:53 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
In order to run Conductor and Configserver on the same server, the administrator must configure Conductor _before_ configuring the Configserver. Specifically, the administrator must: 1) Install aeolus-conductor and aeolus-configserver 2) Run `aeolus-configure` with options for specific providers 3) Run `aeolus-configserver-setup` (no options required) Running `aeolus-configserver-setup` before `aeolus-configure` will not correctly setup the configserver to run alongside conductor.
Clone Of:
Environment:
Last Closed: 2012-12-04 14:53:19 UTC
Embargoed:


Attachments (Terms of Use)
output from aeolus-configserver-setup (1.39 KB, application/octet-stream)
2012-09-28 10:14 UTC, Giulio Fidente
no flags Details
configserver.conf from httpd (557 bytes, application/octet-stream)
2012-09-28 10:14 UTC, Giulio Fidente
no flags Details
audrey.log from target VM (630 bytes, text/x-log)
2012-09-28 17:05 UTC, Giulio Fidente
no flags Details
adding configserver works (79.09 KB, image/png)
2012-10-03 13:58 UTC, dgao
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2012:1516 0 normal SHIPPED_LIVE CloudForms Cloud Engine 1.1 update 2012-12-04 19:51:45 UTC

Description dgao 2011-11-03 13:56:12 UTC
Currently, configserver will not work with conductor if they're both on the same box because they're both going to compete for port 443. We need to amend this issue. 

<weshay_hm> segfault, you guys mentioned that config server and conductor "can not be" or "shouldnt be" on the same server
<segfault> weshay_hm, cannot be, because of a conflict on port 443
<weshay_hm> k.. makes sense
<hewbrocca> segfault: that's gonna be an issue
<segfault> hewbrocca, how so?
<hewbrocca> we're being asked to make everything work on one box

Comment 1 wes hayutin 2011-11-28 01:24:06 UTC
adding ce-sprint-next bugs to ce-sprint tracker for this release

Comment 2 jrd 2011-11-28 18:02:01 UTC
I thought we decided we weren't going to try to support this for 1.0?  Should this really be a blocker?

Comment 3 wes hayutin 2011-11-28 19:58:03 UTC
we'll talk about it next triage

Comment 4 wes hayutin 2011-12-16 17:49:30 UTC
History... 

jrd	2011-12-16 11:20:34 EST	 Status	NEW	ASSIGNED

not good..


moving back to new.. this is a CF-1.0.0 issue

Comment 5 wes hayutin 2011-12-16 17:49:55 UTC
holy type.. I mean CF-1.1.0 sorry.. stupid fingers

Comment 6 wes hayutin 2011-12-16 17:50:53 UTC
holly typo... man I need a new keyboard... 
In summary... Dont mess w/ this bug until we start work on CF-1.1.0

Comment 7 Greg Blomquist 2012-02-01 18:42:43 UTC
Updating version to 1.0 (found in version)

Comment 9 Mike Orazi 2012-08-06 22:26:01 UTC
Think this should have had QE ack.  moving it back.

Comment 10 Greg Blomquist 2012-08-09 21:22:41 UTC
The fix for this bug is to allow the aeolus-configserver-setup tool to configure configserver to setup apache configs in conductor's apache dropfile location, if aeolus-configserver-setup realizes that it's being run on a box where conductor is installed and setup.

The user flow for setting up configserver and conductor on the same box becomes:

1)  install aeolus-all
2)  install aeolus-configserver
3)  run aeolus-configure [-p PROFILE]
4)  run aeolus-configserver-setup

The change for aeolus-configure to create an apache dropfile location will be released with 1.1.  So, upgrading aeolus-configure is a prereq for this to work.

Comment 13 dgao 2012-09-19 18:13:58 UTC
Configuration works, but cannot add the configserver into conductor. The following error is observed:


Could not validate Config Server connection (url: https://hp-sl390s-01.rhts.eng.bos.redhat.com/configserver/). 404: Not Found

One note is that I inputted https://hp-sl390s-01.rhts.eng.bos.redhat.com/configserver/ into the field initially. But when the error occurred, the url modified to https://hp-sl390s-01.rhts.eng.bos.redhat.com/configserver (note, last "/" has been stripped out).

Comment 14 Greg Blomquist 2012-09-27 02:23:48 UTC
Conductor POST: https://github.com/aeolusproject/conductor/pull/79

Configserver COMMIT: https://github.com/aeolusproject/audrey/commit/b3e32376f61d8d33e16c5d4a55f9b188488c020b
Configserver BREWED: https://brewweb.devel.redhat.com/taskinfo?taskID=4913135

The problem was two-fold:

1)  Conductor was not correctly constructing the request to a configserver when the configserver service was not running the server's root context.  In other words, conductor always expected configserver to be running at https://servername/.

2)  If the apache proxy pass for configserver was configured to run at a non-root context (i.e., https://servername/configserver/), then the configserver's service needed to run at the same non-root context (i.e., http://localhost:4567/configserver/) in order to preserve the request's original base path and keep oauth signature verification happy.


With these patches, when the aeolus-configserver-setup script recognizes that the aeolus-configserver service is being installed alongside conductor, it will ensure that the service's root context matches the root context of the proxy pass in the apache configuration for configserver (http://localhost:4567/configserver/ will match https://servername/configserver/).

Additionally, conductor will now correctly construct requests to the configserver even when the configserver is not running at a root context.

Keeping the status of this change on "POST" until the Conductor change is reviewed and merged.

Comment 15 Greg Blomquist 2012-09-27 02:37:39 UTC
Fully testing this fix requires a rather specific setup.

1) Conductor installed and configured for rhev
2) Configserver installed and configured on the same box
3) The configserver added to the rhev provider account in conductor
    a)  ensure that the server URL appears as:
        https://EXTERNAL_SERVER_FQDN/configserver
4) A deployable with services associated with the assembly(ies)
5) Image(s) built for the assembly(ies) in the deployable and pushed to rhev

To test the fix, launch the deployable to the rhev provider account.

Expected results:  the instance(s) start up and configure as expected.

Questions:
Q. Why does it need to be rhev?
A. It needs to be rhev (or vsphere) in order to ensure that the launched instances are able to access the configserver running alongside the conductor box.  Instances launched in EC2 would not be able to reach back into an internal network to see the configserver for configuration data.

Q. Where is a deployable with services?
A. Some examples can be found in github (https://github.com/aeolusproject/audrey/tree/master/examples).  The wordpress example is the most complete example.  However, there are smaller examples in the "deployables" directory.

Q. Where can I get the latest configserver (0.4.11)?
A. Check the brew build location from comment #14.

Q. The aeolus-configserver-setup script says to use "https://FQDN/configserver/" as the server URL.  But the instructions above say to use "https://EXTERNAL_SERVER_FQDN/configserver".  Where's the trailing slash?
A. It's inconsequential whether you add the slash or not.  However, conductor will trim the slash before saving the server URL.

Comment 16 Greg Blomquist 2012-09-27 18:02:35 UTC
Added Doc Text

Comment 17 Giulio Fidente 2012-09-28 10:14:27 UTC
Created attachment 618513 [details]
output from aeolus-configserver-setup

Comment 18 Giulio Fidente 2012-09-28 10:14:50 UTC
Created attachment 618514 [details]
configserver.conf from httpd

Comment 19 Giulio Fidente 2012-09-28 10:15:04 UTC
using aeolus-configserver-0.4.11-1.el6cf I'm still experiencing some troubles with the configserver validation, as per comment 13

"""
Could not validate Config Server connection (url: https://qeblade22.rhq.lab.eng.bos.redhat.com/configserver). 404: Not Found
"""

The missing '/' at the end of the URL parsed from the web form seems to be causing the problem.

btw, the configuration step completes successfully, see the attached aeolus-configserver-setup.out and configureserver.conf

Comment 20 Greg Blomquist 2012-09-28 14:12:24 UTC
Giulio, thanks for looking at this!

did you update your conductor installation with the patch from comment #14:

Conductor POST: https://github.com/aeolusproject/conductor/pull/79

Without that patch, conductor will not be able to correctly connect to the config server running on the same box.

Comment 21 Giulio Fidente 2012-09-28 17:05:24 UTC
Created attachment 618711 [details]
audrey.log from target VM

thanks for the head up, I applied the patch and the validation in conductor is now working

still, instances deployed via conductor are failing in getting the params/values from the configserver; the the audrey.log attached from a target vm

Comment 22 Giulio Fidente 2012-09-28 17:52:15 UTC
works as expected, required a restart of delayed_job, not only thin (thanks Greg)

Comment 23 Tzu-Mainn Chen 2012-09-28 17:59:17 UTC
Unit tests pass; merging and pushing to master/1.1:

commit e302f5ad8c481d1e4cc3b54be2ddd2fc42b854b2
Author: Greg Blomquist <gblomqui>
Date:   Wed Sep 26 21:30:21 2012 -0400

    BZ 751088 (refix): Configserver and conductor on same box
    
    https://bugzilla.redhat.com/show_bug.cgi?id=751088
    
    This patch changes the way conductor builds the request paths when
    talking with configserver.  Previously, conductor assumed that
    configserver ran at the root context of the server (i.e.,
    "http://configserver/").  Now, conductor can adapt to a configserver
    that runs at a non-root context (i.e., "http://servername/configserver").
    (cherry picked from commit 6c6aa269ba5b3fb5e0a13fd4e1442110c510b7af)

Comment 24 dgao 2012-10-03 13:58:05 UTC
Created attachment 620905 [details]
adding configserver works

[root@ibm-x3690x5-01 models]# rpm -qa | grep "conductor"
aeolus-conductor-daemons-0.13.16-1.el6cf.noarch
aeolus-conductor-0.13.16-1.el6cf.noarch
aeolus-conductor-doc-0.13.16-1.el6cf.noarch
[root@ibm-x3690x5-01 models]# rpm -qa | grep "configserver"
aeolus-configserver-0.4.11-1.el6cf.noarch



[root@10-16-120-185 ~]# cat /var/log/audrey.log 
2012-10-03 09:37:58,157 - INFO    : audrey:1351 Invoked audrey_script_main
2012-10-03 09:37:58,281 - INFO    : audrey:1380 
<Instance of: CSClient
	Version: 1
	Config Server Endpoint: https://ibm-x3690x5-01.rhts.eng.bos.redhat.com/configserver
	Config Server oAuth Key: 717b26f6-0d5f-11e2-8cbd-00215e5d12a2
	Config Server oAuth Secret: XCMeAqszN8zt5pVsAGRO0nmQW1E1GHukKcwW8QlebXj5hbikKV
	Config Server Params: 
	Config Server Configs: 
	Temporary Directory: 
	Tarball Name: 
eot>
2012-10-03 09:37:58,282 - INFO    : audrey:952 Invoked CSClient.get_cs_tooling()
2012-10-03 09:37:58,292 - INFO    : audrey:684 Invoked unpack_tooling()
2012-10-03 09:37:58,296 - INFO    : audrey:909 Invoked CSClient.get_cs_configs()
2012-10-03 09:38:33,110 - INFO    : audrey:614 Execute Tooling command: /var/audrey/tooling/user/test/start
2012-10-03 09:38:33,114 - INFO    : audrey:614 return code: 0
2012-10-03 09:38:33,114 - INFO    : audrey:614 
	Start Output of: /var/audrey/tooling/user/test/start >>>
Starting httpd: [  OK  ]
Wordpress should now be available at http://10.16.120.185/wordpress

	<<< End Output
2012-10-03 09:38:33,115 - INFO    : audrey:924 Invoked CSClient.get_cs_params()
2012-10-03 09:38:33,189 - INFO    : audrey:522 Invoked generate_provides()
2012-10-03 09:38:33,678 - INFO    : audrey:939 Invoked CSClient.put_cs_params_values()
[root@10-16-120-185 ~]#

Comment 27 errata-xmlrpc 2012-12-04 14:53:19 UTC
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


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