Issue #8263 has been updated by James Turnbull.

Status changed from Unreviewed to Needs More Information
Assignee set to Dan Bode


----------------------------------------
Bug #8263: stage setting does not apply to included classes
https://projects.puppetlabs.com/issues/8263

Author: Cristian Ciupitu
Status: Needs More Information
Priority: Normal
Assignee: Dan Bode
Category: stages
Target version: 
Affected Puppet version: 2.6.9
Keywords: 
Branch: 


I want to configure yum ("yum.conf", repos, mount NFS shares) before installing 
packages. For this I'm using the new stages feature.

site.pp:

    stage { "yum": before => Stage["main"] }

nodes.pp:

    node "intovps3.test-vms.tld" {
        ...
        include postfix
        include dovecot
        ...
        class { "yum": stage => yum }
    }

The yum class is part of [this puppet 
module](https://github.com/ciupicri/puppet-yum).

    # puppet agent --test --color=none
    info: Retrieving plugin
    info: Loading facts in mysql_version
    info: Loading facts in mysql_exists
    info: Loading facts in mysql_version
    info: Loading facts in mysql_exists
    info: Caching catalog for intovps3.test-vms.tld
    info: Applying configuration version '1309980613'
    info: create new repo epel in file /etc/yum.repos.d/epel.repo
    notice: /Stage[yum]/Yum::Repos::Epel5/Yumrepo[epel]/descr: descr changed '' 
to 'Extra Packages for Enterprise Linux 5 - $basearch'
    notice: /Stage[yum]/Yum::Repos::Epel5/Yumrepo[epel]/mirrorlist: mirrorlist 
changed '' to 
'http://mirrors.fedoraproject.org/mirrorlist?repo=epel-5&arch=$basearch'
    notice: /Stage[yum]/Yum::Repos::Epel5/Yumrepo[epel]/enabled: enabled 
changed '' to '1'
    notice: /Stage[yum]/Yum::Repos::Epel5/Yumrepo[epel]/gpgcheck: gpgcheck 
changed '' to '1'
    notice: /Stage[yum]/Yum::Repos::Epel5/Yumrepo[epel]/gpgkey: gpgkey changed 
'' to 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL'
    info: changing mode of /etc/yum.repos.d/epel.repo from 600 to 644
    notice: /Stage[main]/Dkim-milter::Install/Package[dkim-milter]/ensure: 
created
    notice: /File[/etc/mail/dkim-milter/keys/default.private]/ensure: defined 
content as '{md5}67e26b82a9196c93f18750e942374fb7'
    info: /File[/etc/mail/dkim-milter/keys]: Scheduling refresh of 
Service[dkim-milter]
    --- /etc/mail/dkim-milter/keys/keylist      2010-02-02 20:44:22.000000000 
+0200
    +++ /tmp/puppet-file.6066.0 2011-07-06 22:55:08.795299087 +0300
    @@ -1,2 +1,3 @@
     # *:example.com:selector
    +*:intovps3.test-vms.tld:/etc/mail/dkim-milter/keys/default
    notice: /File[/etc/mail/dkim-milter/keys/keylist]/content: content changed 
'{md5}ab6bb498c4a4a84026122f15b88b799a' to 
'{md5}8dd5d6216f01ed78f4f3cca731f69a72'
    notice: /File[/etc/mail/dkim-milter/keys/keylist]/mode: mode changed '644' 
to '600'
    info: /File[/etc/mail/dkim-milter/keys]: Scheduling refresh of 
Service[dkim-milter]
    info: /File[/etc/mail/dkim-milter/keys]: Scheduling refresh of 
Service[dkim-milter]
    notice: /File[/var/run/dkim-milter]/mode: mode changed '700' to '750'
    info: /File[/var/run/dkim-milter]: Scheduling refresh of Service[postfix]
    --- /etc/mail/dkim-milter/dkim-filter.conf  2010-02-02 20:44:22.000000000 
+0200
    +++ /tmp/puppet-file.6066.0 2011-07-06 22:55:09.615174447 +0300
    @@ -553,7 +553,7 @@
     ##  The system has its own default which will be used (usually 022).
    -# UMask                    022
    +UMask                      002
     ##         default (none)
    notice: /File[/etc/mail/dkim-milter/dkim-filter.conf]/content: content 
changed '{md5}76310fc7aef3edf31c8a2d4a415ffa56' to 
'{md5}a048231cf05d16700b5ef04e2bac19b0'
    info: /File[/etc/mail/dkim-milter/dkim-filter.conf]: Scheduling refresh of 
Service[dkim-milter]
    notice: /Stage[main]/Dkim-milter::Service/Service[dkim-milter]/ensure: 
ensure changed 'stopped' to 'running'
    notice: /Stage[main]/Dkim-milter::Service/Service[dkim-milter]: Triggered 
'refresh' from 4 events
    info: create new repo media in file /etc/yum.repos.d/media.repo
    notice: /Stage[main]/Yum::Repos::Media::Base/Yumrepo[media]/descr: descr 
changed '' to 'CentOS 5.6 - i386 media'
    notice: /Stage[main]/Yum::Repos::Media::Base/Yumrepo[media]/baseurl: 
baseurl changed '' to 'file:///mnt/misc/CentOS-5.6-i386-DVD'
    notice: /Stage[main]/Yum::Repos::Media::Base/Yumrepo[media]/enabled: 
enabled changed '' to '1'
    notice: /Stage[main]/Yum::Repos::Media::Base/Yumrepo[media]/gpgcheck: 
gpgcheck changed '' to '0'
    notice: /Stage[main]/Yum::Repos::Media::Base/Yumrepo[media]/gpgkey: gpgkey 
changed '' to 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$basearch'
    notice: 
/Stage[main]/Yum::Repos::Media::Base/Yumrepo[media]/metadata_expire: 
metadata_expire changed '' to '-1'
    notice: /Stage[main]/Yum::Repos::Media::Base/Yumrepo[media]/priority: 
priority changed '' to '1'
    notice: /Stage[main]/Yum::Repos::Media::Base/Yumrepo[media]/cost: cost 
changed '' to '500'
    info: changing mode of /etc/yum.repos.d/media.repo from 600 to 644
    notice: 
/Stage[main]/Yum::Repos::Ciupicri::Base/Mount[/mnt/misc/CentOS-ciupicri-repo]/ensure:
 ensure changed 'unmounted' to 'mounted'
    info: 
/Stage[main]/Yum::Repos::Ciupicri::Base/Mount[/mnt/misc/CentOS-ciupicri-repo]: 
Scheduling refresh of Mount[/mnt/misc/CentOS-ciupicri-repo]
    info: Mount[/mnt/misc/CentOS-ciupicri-repo](provider=parsed): Remounting
    notice: 
/Stage[main]/Yum::Repos::Ciupicri::Base/Mount[/mnt/misc/CentOS-ciupicri-repo]: 
Triggered 'refresh' from 1 events
    info: 
/Stage[main]/Yum::Repos::Ciupicri::Base/Mount[/mnt/misc/CentOS-ciupicri-repo]: 
Scheduling refresh of Mount[/mnt/misc/CentOS-ciupicri-repo]
    notice: 
/Stage[main]/Yum::Repos::Media::Base/Mount[/mnt/misc/CentOS-5.6-i386-DVD]/ensure:
 ensure changed 'unmounted' to 'mounted'
    info: 
/Stage[main]/Yum::Repos::Media::Base/Mount[/mnt/misc/CentOS-5.6-i386-DVD]: 
Scheduling refresh of Mount[/mnt/misc/CentOS-5.6-i386-DVD]
    info: Mount[/mnt/misc/CentOS-5.6-i386-DVD](provider=parsed): Remounting
    notice: 
/Stage[main]/Yum::Repos::Media::Base/Mount[/mnt/misc/CentOS-5.6-i386-DVD]: 
Triggered 'refresh' from 1 events
    info: 
/Stage[main]/Yum::Repos::Media::Base/Mount[/mnt/misc/CentOS-5.6-i386-DVD]: 
Scheduling refresh of Mount[/mnt/misc/CentOS-5.6-i386-DVD]
    notice: /Stage[main]/Yum::Cache::Base/Mount[/mnt/misc/yum-packages]/ensure: 
ensure changed 'unmounted' to 'mounted'
    info: /Stage[main]/Yum::Cache::Base/Mount[/mnt/misc/yum-packages]: 
Scheduling refresh of Mount[/mnt/misc/yum-packages]
    info: Mount[/mnt/misc/yum-packages](provider=parsed): Remounting
    notice: /Stage[main]/Yum::Cache::Base/Mount[/mnt/misc/yum-packages]: 
Triggered 'refresh' from 1 events
    info: /Stage[main]/Yum::Cache::Base/Mount[/mnt/misc/yum-packages]: 
Scheduling refresh of Mount[/mnt/misc/yum-packages]
    info: create new repo tmz-puppet in file /etc/yum.repos.d/tmz-puppet.repo
    notice: /Stage[main]/Yum::Repos::Tmz-puppet::El/Yumrepo[tmz-puppet]/descr: 
descr changed '' to 'Puppet for EL $releasever - $basearch'
    notice: 
/Stage[main]/Yum::Repos::Tmz-puppet::El/Yumrepo[tmz-puppet]/baseurl: baseurl 
changed '' to 
'http://tmz.fedorapeople.org/repo/puppet/epel/$releasever/$basearch'
    notice: 
/Stage[main]/Yum::Repos::Tmz-puppet::El/Yumrepo[tmz-puppet]/enabled: enabled 
changed '' to '1'
    notice: 
/Stage[main]/Yum::Repos::Tmz-puppet::El/Yumrepo[tmz-puppet]/gpgcheck: gpgcheck 
changed '' to '1'
    notice: /Stage[main]/Yum::Repos::Tmz-puppet::El/Yumrepo[tmz-puppet]/gpgkey: 
gpgkey changed '' to 'http://tmz.fedorapeople.org/repo/RPM-GPG-KEY-tmz'
    info: changing mode of /etc/yum.repos.d/tmz-puppet.repo from 600 to 644
    notice: /Stage[main]/Dovecot::Install/Package[dovecot]/ensure: created
    --- /etc/dovecot.conf       2009-01-21 10:22:57.000000000 +0200
    +++ /tmp/puppet-file.6066.0 2011-07-06 22:55:26.051675719 +0300
    @@ -18,6 +18,7 @@
     # Protocols we want to be serving: imap imaps pop3 pop3s
     ...
    +  }
     }
     
     # If you wish to use another authentication server than dovecot-auth, you 
can
    notice: /File[/etc/dovecot.conf]/content: content changed 
'{md5}e216b1f63a2c69703b2dad15f39fca25' to 
'{md5}839cee0cdc3dd48f40c53d8feb61d568'
    info: /File[/etc/dovecot.conf]: Scheduling refresh of Service[dovecot]
    notice: /Stage[main]/Dovecot::Service/Service[dovecot]/ensure: ensure 
changed 'stopped' to 'running'
    notice: /Stage[main]/Dovecot::Service/Service[dovecot]: Triggered 'refresh' 
from 1 events
    notice: /Stage[main]/Postfix::Install/Package[postfix]/ensure: created
    notice: /File[/etc/postfix/sender_access]/ensure: defined content as 
'{md5}5a6132594bec1fbe75f1d7dd39381f0f'
    info: /File[/etc/postfix/sender_access]: Scheduling refresh of Exec[postmap 
/etc/postfix/sender_access]
    info: /File[/etc/postfix/sender_access]: Scheduling refresh of 
Service[postfix]
    --- /etc/postfix/master.cf  2011-05-31 19:34:17.000000000 +0300
    +++ /tmp/puppet-file.6066.0 2011-07-06 22:55:45.765678735 +0300
    @@ -7,9 +7,11 @@
     #               (yes)   (yes)   (yes)   (never) (100)
     ...
     #  -o smtpd_tls_wrappermode=yes
    notice: /File[/etc/postfix/master.cf]/content: content changed 
'{md5}d4534eeb2ca247e72ac14d615bd26e3a' to 
'{md5}d297f678311fc3e8e2a650e1f6a1cc6e'
    info: /File[/etc/postfix/master.cf]: Scheduling refresh of Service[postfix]
    --- /etc/postfix/main.cf    2011-05-31 19:34:17.000000000 +0300
    +++ /tmp/puppet-file.6066.0 2011-07-06 22:55:46.505566255 +0300
    @@ -107,7 +107,7 @@
     #inet_interfaces = all
     ...
     +non_smtpd_milters = $smtpd_milters
    notice: /File[/etc/postfix/main.cf]/content: content changed 
'{md5}ea98973368322dcd5358082dc011038b' to 
'{md5}c2b893f924f081a9d0e40e61ce0f1636'
    info: /File[/etc/postfix/main.cf]: Scheduling refresh of Service[postfix]
    notice: 
/Stage[main]/Postfix::Config::Postmaps/Postfix::Postmap_config[sender_access]/Postfix::Postmap[sender_access]/Exec[postmap
 /etc/postfix/sender_access]: Triggered 'refresh' from 1 events
    info: 
/Stage[main]/Postfix::Config::Postmaps/Postfix::Postmap_config[sender_access]/Postfix::Postmap[sender_access]/Exec[postmap
 /etc/postfix/sender_access]: Scheduling refresh of Service[postfix]
    notice: /File[/etc/postfix/sender_login]/ensure: defined content as 
'{md5}d41d8cd98f00b204e9800998ecf8427e'
    info: /File[/etc/postfix/sender_login]: Scheduling refresh of Exec[postmap 
/etc/postfix/sender_login]
    info: /File[/etc/postfix/sender_login]: Scheduling refresh of 
Service[postfix]
    notice: 
/Stage[main]/Postfix::Config::Sasl/Postfix::Postmap_config[sender_login]/Postfix::Postmap[sender_login]/Exec[postmap
 /etc/postfix/sender_login]: Triggered 'refresh' from 1 events
    info: 
/Stage[main]/Postfix::Config::Sasl/Postfix::Postmap_config[sender_login]/Postfix::Postmap[sender_login]/Exec[postmap
 /etc/postfix/sender_login]: Scheduling refresh of Service[postfix]
    notice: /Stage[main]/Postfix::Service/Service[postfix]/ensure: ensure 
changed 'stopped' to 'running'
    notice: /Stage[main]/Postfix::Service/Service[postfix]: Triggered 'refresh' 
from 7 events
    notice: /Stage[main]/Yum::Cache::Base/Mount[/var/cache/yum]/ensure: ensure 
changed 'unmounted' to 'mounted'
    info: /Stage[main]/Yum::Cache::Base/Mount[/var/cache/yum]: Scheduling 
refresh of Mount[/var/cache/yum]
    info: Mount[/var/cache/yum](provider=parsed): Remounting
    notice: /Stage[main]/Yum::Cache::Base/Mount[/var/cache/yum]: Triggered 
'refresh' from 1 events
    info: /Stage[main]/Yum::Cache::Base/Mount[/var/cache/yum]: Scheduling 
refresh of Mount[/var/cache/yum]
    notice: Finished catalog run in 62.04 seconds

As you can see some classes of the **yum** module are run in the **main** stage 
and after some packages have been already installed, e.g. dkim-milter.

I'm using puppet-2.6.9-1.el5 on the client and 
puppet-server-2.6.9-1.fc15.noarch on the server.


-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-bugs?hl=en.

Reply via email to