Bug #9629
FOSS tests are not portable to PE environment
| Status: | Needs Decision | Start date: | 09/20/2011 | |
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assignee: | % Done: | 0% | ||
| Category: | - | |||
| Target version: | - | |||
| Patch: | Branch: | |||
| Keywords: | ||||
Description
FEX, on a post-PE install, pe-httpd is running. This test:
on master, puppet_master("--rest_authconfig #{authfile} --manifest #{manifest_file} --daemonize --autosign true") do
run_agent_on(agents, "--no-daemonize --verbose --onetime --node_name_value specified_node_name --server #{master}") do
assert_match(success_message, stdout)
Fails silently with —daemonize in the call to puppet master, as the puppet port is already in use.
History
#1
Updated by Dominic Maraglia over 1 year ago
- Status changed from Unreviewed to Accepted
- Priority changed from High to Normal
This is a larger scale topic to be addressed post Cmdr Keith.
#2
Updated by Nigel Kersten over 1 year ago
- Status changed from Accepted to Needs More Information
- Target version deleted (
PE 2.0 (Cmdr Keith))
Dom, can you set the target version given the latest decision? Is it 2.0.x or Lance?
#3
Updated by Dominic Maraglia over 1 year ago
- Target version set to PE Lance
This will require some serious recoding due to the significant differences in FOSS vs. PE. In fact, the two are so different is so many way I doubt we can actually makes system level tests work (sanely) across both platforms.
#4
Updated by Dominic Maraglia over 1 year ago
- Status changed from Needs More Information to Needs Decision
#5
Updated by Nigel Kersten over 1 year ago
I feel like something is wrong if the differences are that significant.
The only real difference we should see is that port 8140 is in use by the Passenger setup.
If you need to run webrick tests, just do them on another port?
#6
Updated by Dominic Maraglia over 1 year ago
There is a significant difference in PE vs FOSS in regards Puppet Master server; and yes, something is “wrong”. What is “wrong” depends on your perspective: either it is wrong that we have two Puppet Masters that function completely differently, or it was wrong to write a core method in the test harness library that is FOSS specific and makes not attempt to account for PE Masters.
This code snippet is a perfect example of why some tests will never port from FOSS to PE:
def with_master_running_on(host, arg='--daemonize', &block)
on host, puppet_master('--configprint pidfile')
pidfile = stdout.chomp
on host, puppet_master(arg)
poll_master_until(host, :start)
master_started = true
yield if block
ensure
if master_started
on host, "kill $(cat #{pidfile})"
poll_master_until(host, :stop)
end
end
Unfortunately, from an acceptance testing perspective, Puppet has become harder to test, no easier. This needs to be addressed and not by just by writing tests code that works every Puppet permutation.
#7
Updated by Nigel Kersten over 1 year ago
It’s important to note that that example above is not a FOSS vs PE difference.
It’s a webrick vs Passenger difference, regardless of whether you’re using FOSS or PE.
If the majority of our master tests in the suite are relying upon using webrick rather than any other method, then we’re not testing the most common deployment patterns in the FOSS space.
#8
Updated by Dominic Maraglia over 1 year ago
NIgel, thanks for the input and the clarification.
The important thing to note here is that methods have been added that only interacte with the webrick server and completely fail on PE/non-webrick environments. These methods do not contain logic to at least try and detect what type of Puppet master to interact with. We should not add additional code that behaves similarly.
#9
Updated by Justin Stoller over 1 year ago
- Project changed from Quality Assurance to Puppet Acceptance
- Target version deleted (
PE Lance)
I’m moving this to puppet-acceptance project because I do not believe this can be accomplished without altering the harness/dsl.