Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 694362 Details for
Bug 908655
Backport of Puppet race condition bug for 2.6.17
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
patch against fedora distgit
0001-puppet-bug-7165-patch.patch (text/plain), 9.01 KB, created by
Lukas Zapletal
on 2013-02-07 09:36:36 UTC
(
hide
)
Description:
patch against fedora distgit
Filename:
MIME Type:
Creator:
Lukas Zapletal
Created:
2013-02-07 09:36:36 UTC
Size:
9.01 KB
patch
obsolete
>From f71020e54d7e902c44c9c8f768d386007d19e1a9 Mon Sep 17 00:00:00 2001 >From: Lukas Zapletal <lzap+git@redhat.com> >Date: Thu, 7 Feb 2013 10:20:40 +0100 >Subject: [PATCH] puppet bug #7165 patch > >--- > puppet-bug7165.patch | 154 +++++++++++++++++++++++++++++++++++++++++++++++++++ > puppet.spec | 7 ++- > 2 files changed, 160 insertions(+), 1 deletion(-) > create mode 100644 puppet-bug7165.patch > >diff --git a/puppet-bug7165.patch b/puppet-bug7165.patch >new file mode 100644 >index 0000000..49b2947 >--- /dev/null >+++ b/puppet-bug7165.patch >@@ -0,0 +1,154 @@ >+diff -rupN puppet-2.6.17/acceptance/tests/ticket_7165_no_refresh_after_starting_service.rb puppet-2.6.17-bug7165/acceptance/tests/ticket_7165_no_refresh_after_starting_service.rb >+--- puppet-2.6.17/acceptance/tests/ticket_7165_no_refresh_after_starting_service.rb 1970-01-01 01:00:00.000000000 +0100 >++++ puppet-2.6.17-bug7165/acceptance/tests/ticket_7165_no_refresh_after_starting_service.rb 2013-02-07 09:58:48.418569111 +0100 >+@@ -0,0 +1,40 @@ >++test_name "Bug #7165: Don't refresh service immediately after starting it" >++ >++confine :except, :platform => 'windows' >++ >++agents.each do |host| >++ dir = host.tmpdir('7165-no-refresh') >++ >++manifest = %Q{ >++ file { "#{dir}/notify": >++ content => "foo", >++ notify => Service["service"], >++ } >++ >++ service { "service": >++ ensure => running, >++ hasstatus => true, >++ hasrestart => true, >++ status => "test -e #{dir}/service", >++ start => "touch #{dir}/service", >++ stop => "rm -f #{dir}/service", >++ restart => "touch #{dir}/service_restarted", >++ require => File["#{dir}/notify"], >++ } >++} >++ >++ apply_manifest_on(host, manifest) do >++ on(host, "test -e #{dir}/service") >++ # service should not restart, since it wasn't running to begin with >++ on(host, "test -e #{dir}/service_restarted", :acceptable_exit_codes => [1]) >++ end >++ >++ # will trigger a notify next time as the file changes >++ on(host, "echo bar > #{dir}/notify") >++ >++ apply_manifest_on(host, manifest) do >++ on(host, "test -e #{dir}/service") >++ # service should restart this time >++ on(host, "test -e #{dir}/service_restarted") >++ end >++end >+diff -rupN puppet-2.6.17/lib/puppet/parameter/value.rb puppet-2.6.17-bug7165/lib/puppet/parameter/value.rb >+--- puppet-2.6.17/lib/puppet/parameter/value.rb 2012-07-06 23:10:42.000000000 +0200 >++++ puppet-2.6.17-bug7165/lib/puppet/parameter/value.rb 2013-02-07 09:58:48.419569127 +0100 >+@@ -3,7 +3,7 @@ require 'puppet/parameter/value_collecti >+ # An individual Value class. >+ class Puppet::Parameter::Value >+ attr_reader :name, :options, :event >+- attr_accessor :block, :call, :method, :required_features >++ attr_accessor :block, :call, :method, :required_features, :invalidate_refreshes >+ >+ # Add an alias for this value. >+ def alias(name) >+diff -rupN puppet-2.6.17/lib/puppet/property.rb puppet-2.6.17-bug7165/lib/puppet/property.rb >+--- puppet-2.6.17/lib/puppet/property.rb 2012-07-10 02:50:54.000000000 +0200 >++++ puppet-2.6.17-bug7165/lib/puppet/property.rb 2013-02-07 10:01:17.046938618 +0100 >+@@ -132,7 +132,11 @@ class Puppet::Property < Puppet::Paramet >+ >+ # Return a modified form of the resource event. >+ def event >+- resource.event :name => event_name, :desired_value => should, :property => self, :source_description => path >++ attrs = { :name => event_name, :desired_value => should, :property => self, :source_description => path } >++ if should and value = self.class.value_collection.match?(should) >++ attrs[:invalidate_refreshes] = true if value.invalidate_refreshes >++ end >++ resource.event attrs >+ end >+ >+ attr_reader :shadow >+diff -rupN puppet-2.6.17/lib/puppet/transaction/event_manager.rb puppet-2.6.17-bug7165/lib/puppet/transaction/event_manager.rb >+--- puppet-2.6.17/lib/puppet/transaction/event_manager.rb 2012-07-10 02:50:54.000000000 +0200 >++++ puppet-2.6.17-bug7165/lib/puppet/transaction/event_manager.rb 2013-02-07 09:58:48.420569143 +0100 >+@@ -56,6 +56,13 @@ class Puppet::Transaction::EventManager >+ >+ queue_events_for_resource(resource, resource, :refresh, [event]) if resource.self_refresh? and ! resource.deleting? >+ end >++ >++ dequeue_events_for_resource(resource, :refresh) if events.detect { |e| e.invalidate_refreshes } >++ end >++ >++ def dequeue_events_for_resource(target, callback) >++ target.info "Unscheduling #{callback} on #{target}" >++ @event_queues[target][callback] = {} >+ end >+ >+ def queue_events_for_resource(source, target, callback, events) >+diff -rupN puppet-2.6.17/lib/puppet/transaction/event.rb puppet-2.6.17-bug7165/lib/puppet/transaction/event.rb >+--- puppet-2.6.17/lib/puppet/transaction/event.rb 2012-07-10 02:50:54.000000000 +0200 >++++ puppet-2.6.17-bug7165/lib/puppet/transaction/event.rb 2013-02-07 10:01:55.640553743 +0100 >+@@ -7,7 +7,7 @@ class Puppet::Transaction::Event >+ include Puppet::Util::Tagging >+ include Puppet::Util::Logging >+ >+- ATTRIBUTES = [:name, :resource, :property, :previous_value, :desired_value, :historical_value, :status, :message, :file, :line, :source_description, :audited] >++ ATTRIBUTES = [:name, :resource, :property, :previous_value, :desired_value, :historical_value, :status, :message, :file, :line, :source_description, :audited, :invalidate_refreshes] >+ YAML_ATTRIBUTES = %w{@audited @property @previous_value @desired_value @historical_value @message @name @status @time} >+ attr_accessor *ATTRIBUTES >+ attr_writer :tags >+diff -rupN puppet-2.6.17/lib/puppet/type/service.rb puppet-2.6.17-bug7165/lib/puppet/type/service.rb >+--- puppet-2.6.17/lib/puppet/type/service.rb 2012-07-10 02:50:54.000000000 +0200 >++++ puppet-2.6.17-bug7165/lib/puppet/type/service.rb 2013-02-07 09:58:48.421569158 +0100 >+@@ -62,7 +62,7 @@ module Puppet >+ provider.stop >+ end >+ >+- newvalue(:running, :event => :service_started) do >++ newvalue(:running, :event => :service_started, :invalidate_refreshes => true) do >+ provider.start >+ end >+ >+diff -rupN puppet-2.6.17/spec/unit/property_spec.rb puppet-2.6.17-bug7165/spec/unit/property_spec.rb >+--- puppet-2.6.17/spec/unit/property_spec.rb 2012-07-10 02:50:54.000000000 +0200 >++++ puppet-2.6.17-bug7165/spec/unit/property_spec.rb 2013-02-07 09:58:48.421569158 +0100 >+@@ -145,6 +145,17 @@ describe Puppet::Property do >+ @instance.stubs(:path).returns "/my/param" >+ @instance.event.source_description.should == "/my/param" >+ end >++ >++ it "should have the 'invalidate_refreshes' value set if set on a value" do >++ property.stubs(:event_name).returns :my_event >++ property.stubs(:should).returns "foo" >++ foo = mock() >++ foo.expects(:invalidate_refreshes).returns(true) >++ collection = mock() >++ collection.expects(:match?).with("foo").returns(foo) >++ property.class.stubs(:value_collection).returns(collection) >++ property.event.invalidate_refreshes.should be_true >++ end >+ end >+ >+ describe "when shadowing metaparameters" do >+diff -rupN puppet-2.6.17/spec/unit/transaction/event_manager_spec.rb puppet-2.6.17-bug7165/spec/unit/transaction/event_manager_spec.rb >+--- puppet-2.6.17/spec/unit/transaction/event_manager_spec.rb 2012-07-10 02:50:55.000000000 +0200 >++++ puppet-2.6.17-bug7165/spec/unit/transaction/event_manager_spec.rb 2013-02-07 09:58:48.422569174 +0100 >+@@ -101,6 +101,16 @@ describe Puppet::Transaction::EventManag >+ >+ @manager.queue_events(@resource, [@event]) >+ end >++ >++ it "should dequeue events for the changed resource if an event with invalidate_refreshes is processed" do >++ @event2 = Puppet::Transaction::Event.new(:name => :foo, :resource => @resource, :invalidate_refreshes => true) >++ >++ @graph.stubs(:matching_edges).returns [] >++ >++ @manager.expects(:dequeue_events_for_resource).with(@resource, :refresh) >++ >++ @manager.queue_events(@resource, [@event, @event2]) >++ end >+ end >+ >+ describe "when queueing events for a resource" do >diff --git a/puppet.spec b/puppet.spec >index 7fd5f07..dfe19d6 100644 >--- a/puppet.spec >+++ b/puppet.spec >@@ -13,7 +13,7 @@ > > Name: puppet > Version: 2.6.17 >-Release: 2%{?dist} >+Release: 3%{?dist} > Summary: A network tool for managing many disparate systems > License: GPLv2 > URL: http://puppetlabs.com >@@ -26,6 +26,7 @@ Patch0: 0001-9167-Do-not-sent-tagmail-reports-if-no-changes.patch > # https://bugzilla.redhat.com/771097 > Patch1: puppet-2.6.13-augeas-0.10.patch > Patch2: 0001-Preserve-timestamps-when-installing-files.patch >+Patch3: puppet-bug7165.patch > > Group: System Environment/Base > >@@ -88,6 +89,7 @@ The server can also function as a certificate authority and file server. > %patch0 -p1 > %patch1 -p1 > %patch2 -p1 >+%patch3 -p1 > patch -s -p1 < conf/redhat/rundir-perms.patch > > # Fix some rpmlint complaints >@@ -290,6 +292,9 @@ fi > rm -rf %{buildroot} > > %changelog >+* Thu Feb 07 2013 Lukas Zapletal <lzap+rpm[@]redhat.com> - 2.6.17-3 >+- Applying Puppet patch for bug #7165 >+ > * Thu Jul 19 2012 Todd Zullinger <tmz@pobox.com> - 2.6.17-2 > - Corrected CVE list, 2.6 is not affected by CVE-2012-3866 > >-- >1.8.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 908655
:
694362
|
712560
|
733042