Best unofficial Apache Server developers community
Username
Forgot password?
Sign in with Twitter account
Sign in with Facebook account
List archives

Patch to improve Naginator functionality

PATCH/puppet 1/1] Cleanup of plurals and inheritance relationships in AST (fixes [4633])
(56 lines)
PATCH/puppet 1/1] [4638] Cleanup of plurals and inheritance relationships in AST
(54 lines)
Aug 26, 2010
Geek
Geek
This addresses Redmine ticket #4020.

Currently, the Nagios types default to :array_matching=>:first.  That
is a problem if you want to have, say, multiple systems in a
hostgroup.  This patch will enable array_matching=>:all, along with
the requisite helper functions for file verification.  This patch is
against Puppet 0.25.5.

--- puppet-0.25.5/lib/puppet/util/nagios_maker.rb       Thu Aug 26
13:14:52 2010
+++ /var/opt/webstack/ruby/1.8/gem_home/gems/puppet-0.25.5/lib/puppet/
util/nagios_maker.rb      Thu Aug 26 13:22:56 2010
@@ -27,10 +27,49 @@
             # supported.
             next if param.to_s =~ /^[0-9]/

-            type.newproperty(param) do
-                desc "Nagios configuration file parameter."
+           type.newproperty(param, :array_matching => :all) do
+               desc "Nagios array-capable configuration file
parameter."
+               def change_to_s(currentvalue, newvalue)
+                   currentvalue = currentvalue.join(",") if
currentvalue != :absent and currentvalue.is_a?(Array)
+                   currentvalue = currentvalue.to_s() if
currentvalue.is_a?(Symbol)
+                   newvalue = newvalue.join(",") if newvalue.is_a?
(Array)
+                   newvalue = newvalue.to_s() if newvalue.is_a?
(Symbol)
+                   super(currentvalue, newvalue)
             end
+
+               def is_to_s(value)
+                   if value.is_a?(Array)
+                       if value.include?(:absent)
+                           super
+                       else
+                           super(value.join(','))
         end
+                   else
+                       super(value.to_s())
+                   end
+               end
+
+               def should_to_s(value)
+                   if value.is_a?(Array)
+                       if value.include?(:absent)
+                           super
+                       else
+                           super(value.join(','))
+                       end
+                   else
+                       super(value.to_s())
+                   end
+               end
+
+               def insync?(is)
+                   if defined? @should and @should
+                       self.is_to_s(is) == self.should_to_s(@should)
+                   else
+                       false
+                   end
+               end
+           end
+       end

         type.newproperty(:target) do
             desc 'target'





Reply
Tags: enablepatchhostgroup
Messages in this thread
reply Re: Patch to improve Naginator functionality
(108 lines) Aug 31, 2010 14:45
reply Re: Patch to improve Naginator functionality
(119 lines) Oct 4, 2010 14:15
reply Re: Patch to improve Naginator functionality
(119 lines) Oct 4, 2010 14:15
Similar Threads
Created: (SLING-1634) Improve log-in/out functionality on the landing page of launchpad content
Improve log-in/out functionality on the landing page of launchpad content

PATCH/puppet] Improve safety of the file type against disasters.
This series of patches improves the 'file' type to be more careful, and
secure, when it comes to handling files.

By switching to the standard 'tempfile' class shipped with puppet, rather
than
reinventing that, we automatically use platform security tools like O_EXCL
on
open.

This eliminates a TOCTOU race in puppet which could potentially result in
arbitrary files being overwritten by hostile users on Unix platforms
supporting the option (and, presumably, on Win32 also).

We also use the same path for every file operation, which is to write,
flush
to disk, then atomically replace the target file.  This helps assure us
that
we have either the old file or the new file after a crash, and never a
half-way state.

Finally, set file properties correctly before we consider the file ready
to
replace the target.  This ensures that there is no window in which the
target
file will have incorrect modes, ownership, or SELinux security labels.

A final recheck of those permissions is still performed to verify this
after
the rename has been committed.





PATCH/puppet 1/3] conf/redhat: Rebase rundir-perms patch
---
 conf/redhat/rundir-perms.patch |   26 +++++++++++++
PATCH/puppet 1/1] Fix for #4465 -- earlier "feature" patch broke ldap
The patch for #3904 should not have been accepted; it's buggy and the use
case
(supporting having nodes in ldap more than once with the same name but
distinct
records) is ill-conceived.

This commit reverts the patch (a7884b47) and the previous attempt to fix
it
(e6709da4), restoring the old (0.25.x) behaviour.

Signed-off-by: Markus Roberts <Mark### @reality.com>
---
 lib/puppet/indirector/node/ldap.rb     |   60 ++++
Disabling the SNI functionality?
When I use an application on Windows Vista that communicates with our
server (using Apache 2.2.13 and OpenSSL 0.9.8k), it succeeds if I use the
IP address of the server, but it fails when I use the FQDN of the server. 
When using the FQDN, I noticed that the packet (Client Hello) comes to the
server with the FQDN (server name) in it.  I believe this is part of the
new SNI (Server Name Indication) feature of TLS.

Is there a way, without recompiling Apache or OpenSSL, to disable this SNI
checking on the server?  I tried putting the SSLStrictSNIVHostCheck
directive in the .conf file, but it had no effect.  Also, making the
ServerName directive in the .conf file the same as what is coming across in
the packet, had no effect either.

Or, is there a way within Vista to disable the sending of the server name
in the packet?

Thanks in advance,
Dan



Description of clustertool functionality?
Hi everyone,
Can anyone point me to an  in-depth description of clustertool
functionality?
Specifically interested in the global_snaphot/clear_global_snapshot
options.

The terse --help doesn't tell much.

Thanks in advance!

Carlos


GeoSpatial Indexes Functionality Question
I created a simple python script to test out geospatial indexes which
is located here: http://pastie.org/1112344

Basically, what I'm doing in the script is the following:

Creating a Geo Index for the "location" field.
I add three entries which contain issue and created fields (issue
increases from 0 to 2)
I add three entries which contain issue, created, and location fields
(issue increase from 0 to 2)

1.) I do a find with no query arguments (results are all 6 documents)
- Pass.
2.) I do a find where issue is 0 (results are 2 documents - one
without location, one with location) - Pass.
3.) I do a find with a location near query (results are 3 documents -
the three documents with location) - Pass.
4.) I do a find where issue is 0 (results are 2 documents - one
without location, one with location) - Pass.
5.) I do a find with a location near query and where issue is 0
(results are 1 document - one with location and issue of 0) - Pass.
6.) I do a find with issue is 0 (results are 1 document - one with
location) - FAIL - This should of returned the same thing as query 5
and query 7.
7.) I do a find with no query arguments (results are all 6 documents)
- Pass

What I don't understand is why doing a query with a geo index and
another parameter causes that parameter not to show up in a non-geo
index based query.  In this case, the query described in (6) results
in the wrong output.  It should also return the document that does not
have a location field.

The output of my python program is shown below.  Can be reproduced on
both 1.4.4 and 1.6.1 with PyMongo 1.8.1.  Thanks for your time!

----

Create Geo Index for location
Adding values without location and with location

Print Everything
{u'_id': ObjectId('4c73ce215c59731428000000'), u'issue': u'0',
u'created': datetime.datetime(2010, 8, 24, 13, 50, 25, 778000)}
{u'_id': ObjectId('4c73ce215c59731428000001'), u'issue': u'1',
u'created': datetime.datetime(2010, 8, 24, 13, 50, 25, 778000)}
{u'_id': ObjectId('4c73ce215c59731428000002'), u'issue': u'2',
u'created': datetime.datetime(2010, 8, 24, 13, 50, 25, 778000)}
{u'_id': ObjectId('4c73ce215c59731428000003'), u'issue': u'0',
u'location': [34.0, -118.0], u'created': datetime.datetime(2010, 8,
24, 13, 50, 25, 778000)}
{u'_id': ObjectId('4c73ce215c59731428000004'), u'issue': u'1',
u'location': [34.0, -118.0], u'created': datetime.datetime(2010, 8,
24, 13, 50, 25, 778000)}
{u'_id': ObjectId('4c73ce215c59731428000005'), u'issue': u'2',
u'location': [34.0, -118.0], u'created': datetime.datetime(2010, 8,
24, 13, 50, 25, 779000)}

Print Specific Item where issue is 0
{u'_id': ObjectId('4c73ce215c59731428000000'), u'issue': u'0',
u'created': datetime.datetime(2010, 8, 24, 13, 50, 25, 778000)}
{u'_id': ObjectId('4c73ce215c59731428000003'), u'issue': u'0',
u'location': [34.0, -118.0], u'created': datetime.datetime(2010, 8,
24, 13, 50, 25, 778000)}

Print Geo Version where location is near 34.12 and -118.12
{u'_id': ObjectId('4c73ce215c59731428000005'), u'issue': u'2',
u'location': [34.0, -118.0], u'created': datetime.datetime(2010, 8,
24, 13, 50, 25, 779000)}
{u'_id': ObjectId('4c73ce215c59731428000004'), u'issue': u'1',
u'location': [34.0, -118.0], u'created': datetime.datetime(2010, 8,
24, 13, 50, 25, 778000)}
{u'_id': ObjectId('4c73ce215c59731428000003'), u'issue': u'0',
u'location': [34.0, -118.0], u'created': datetime.datetime(2010, 8,
24, 13, 50, 25, 778000)}

Print Specific Item where issue is 0
{u'_id': ObjectId('4c73ce215c59731428000000'), u'issue': u'0',
u'created': datetime.datetime(2010, 8, 24, 13, 50, 25, 778000)}
{u'_id': ObjectId('4c73ce215c59731428000003'), u'issue': u'0',
u'location': [34.0, -118.0], u'created': datetime.datetime(2010, 8,
24, 13, 50, 25, 778000)}

Print Geo Sepecic Versions where location is near 34.12 and -118.12
and issue is 0
{u'_id': ObjectId('4c73ce215c59731428000003'), u'issue': u'0',
u'location': [34.0, -118.0], u'created': datetime.datetime(2010, 8,
24, 13, 50, 25, 778000)}

Print Specific Item where issue is 0
{u'_id': ObjectId('4c73ce215c59731428000003'), u'issue': u'0',
u'location': [34.0, -118.0], u'created': datetime.datetime(2010, 8,
24, 13, 50, 25, 778000)}

Print Everything
{u'_id': ObjectId('4c73ce215c59731428000000'), u'issue': u'0',
u'created': datetime.datetime(2010, 8, 24, 13, 50, 25, 778000)}
{u'_id': ObjectId('4c73ce215c59731428000001'), u'issue': u'1',
u'created': datetime.datetime(2010, 8, 24, 13, 50, 25, 778000)}
{u'_id': ObjectId('4c73ce215c59731428000002'), u'issue': u'2',
u'created': datetime.datetime(2010, 8, 24, 13, 50, 25, 778000)}
{u'_id': ObjectId('4c73ce215c59731428000003'), u'issue': u'0',
u'location': [34.0, -118.0], u'created': datetime.datetime(2010, 8,
24, 13, 50, 25, 778000)}
{u'_id': ObjectId('4c73ce215c59731428000004'), u'issue': u'1',
u'location': [34.0, -118.0], u'created': datetime.datetime(2010, 8,
24, 13, 50, 25, 778000)}
{u'_id': ObjectId('4c73ce215c59731428000005'), u'issue': u'2',
u'location': [34.0, -118.0], u'created': datetime.datetime(2010, 8,
24, 13, 50, 25, 779000)}





Jmeter support for functionality Testing.
Hi,
           I have been writing using Jmeter for the past one year for
Perfomance testing and simple functinality testing.
Now i have to automate all testcases for both doing regression and complex
functionality testing of my APP. I want a suggestion on how well Jmter
suitable for Aumation of my APP ( mostly consists of http hits, simple
GUI,
server demon running, db data checking) .

  I am  familier with Jmeter rather Java ,JUnit or selenium tools.  It
seems
for building complex functionality testing i need to learn bean shell
scripting.

Sugetions are welcome which way easy and faster

1. Learing Java and Junit Go aumation (may be more effort is needed to
learn
and build and maintain the suit as well)

or

2. Learing bean shell scripting and more knowledge on Jmeter then Go
automation, if it supports complex functionality testing.






friendly request for heads up on changes to FreeBSD functionality
As the FreeBSD ports maintainer for puppet, it would be nice to get a
heads-up when making 
modifications that affect operation on FreeBSD.

In 2.6.x, it looks like the service provider was rewritten to edit rc.conf
using ad-hoc 
string.sub() manipulations while still preserving the misfeature of using
rc.conf.d. I had 
been working on new service provider that used Agueas for file
transformations and did 
away with the rc.conf.d misfeature all together.

Thanks.






Created: (ARIES-371) Add functionality to allow quiescing of bundles
Add functionality to allow quiescing of bundles

Created: (DERBY-4751) Need disable/enable triggers functionality
Need disable/enable triggers functionality