I got the following error, but there''s no "cycle" I
commented out
File["/dev/sdb3"] and it works, but of course would choke if I ran it
and the requirement were not met
err: Could not apply complete catalog: Found cycles in the following
relationships: File[/dev/sdb1] => Exec[echo -e "0,290\n,290\n," |
sfdisk
/dev/sdb]
Here''s the node:
node testing {
package { "iscsi-initiator-utils":
provider => rpm,
source =>
"/tmp/iscsi-initiator-utils-4.0.3.0-4.x86_64.rpm",
require => Exec["wget
http://osserver.dev.gridapp.com/osprov/media/Linux/RH-4.0-ES-U4-AMD64/Re
dHat/RPMS/iscsi-initiator-utils-4.0.3.0-4.x86_64.rpm -O
/tmp/iscsi-initiator-utils-4.0.3.0-4.x86_64.rpm"];
}
file { "/etc/iscsi.conf":
ensure => present,
source => "puppet:///files/clarity/iscsi.conf",
mode => 600,
require => Package["iscsi-initiator-utils"];
}
service { "iscsi":
ensure => running,
require => Package["iscsi-initiator-utils"];
}
#Create partitions once the iscsi volumes exist
exec { "echo -e \"0,290\\n,290\\n,\" | sfdisk /dev/sdb":
path => ''/usr/bin:/sbin:/bin'',
unless => "fdisk -l | grep /dev/sdb1 && fdisk -l | grep
/dev/sdb2 && fdisk -l | grep /dev/sdb3",
onlyif => "iscsi-rescan && [ -e /dev/sdb ]",
require => Service[''iscsi'']
}
...
exec { "mke2fs /dev/sdb1":
path => ''/sbin'',
unless => "dumpe2fs /dev/sdb1",
require => Exec["echo -e \"0,290\\n,290\\n,\" | sfdisk
/dev/sdb"]
}
...
exec { "mke2fs /dev/sdb3":
path => ''/sbin'',
unless => "dumpe2fs /dev/sdb3",
require => Exec["echo -e \"0,290\\n,290\\n,\" | sfdisk
/dev/sdb"]
}
file { "/dev/sdb1":
owner => ''oracle'',
require => Exec["mke2fs /dev/sdb1"]
}
file { "/dev/sdb3":
owner => ''oracle'',
# require => Exec["mke2fs /dev/sdb3"]
}
Eugene Ventimiglia
Director of Systems
GridApp Systems
e: eventi@gridapp.com
o: 646 452 4081
_______________________________________________
Puppet-users mailing list
Puppet-users@madstop.com
https://mail.madstop.com/mailman/listinfo/puppet-users
On Jan 14, 2008, at 10:19 AM, Eugene Ventimiglia wrote:> exec { "echo -e \"0,290\\n,290\\n,\" | sfdisk /dev/sdb": > path => ''/usr/bin:/sbin:/bin'', > unless => "fdisk -l | grep /dev/sdb1 && fdisk -l | grep /dev/ > sdb2 && fdisk -l | grep /dev/sdb3", > onlyif => "iscsi-rescan && [ -e /dev/sdb ]", > require => Service[''iscsi''] > } > ... > exec { "mke2fs /dev/sdb1": > path => ''/sbin'', > unless => "dumpe2fs /dev/sdb1", > require => Exec["echo -e \"0,290\\n,290\\n,\" | sfdisk /dev/ > sdb"] > } > ... > exec { "mke2fs /dev/sdb3": > path => ''/sbin'', > unless => "dumpe2fs /dev/sdb3", > require => Exec["echo -e \"0,290\\n,290\\n,\" | sfdisk /dev/ > sdb"] > }The issue you''re having makes me think this is a bug (and I actually thought I removed this a while ago), but Puppet sets up automatic relationships between the exec and any files mentioned in either the command or any of the checks. You should see this automatic relationship listed in debug mode on the client. However, you have a manual relationship specified in the correct direction, so Puppet should ignore the automatic relationship that you don''t want. What version of Puppet are you using? -- Brand''s Asymmetry: The past can only be known, not changed. The future can only be changed, not known. --------------------------------------------------------------------- Luke Kanies | http://reductivelabs.com | http://madstop.com
puppet-0.24.1-1.el4 -----Original Message----- From: puppet-users-bounces@madstop.com [mailto:puppet-users-bounces@madstop.com] On Behalf Of Luke Kanies Sent: Tuesday, January 15, 2008 8:32 PM To: Puppet User Discussion Subject: Re: [Puppet-users] Spot the cyclical relationship On Jan 14, 2008, at 10:19 AM, Eugene Ventimiglia wrote:> exec { "echo -e \"0,290\\n,290\\n,\" | sfdisk /dev/sdb": > path => ''/usr/bin:/sbin:/bin'', > unless => "fdisk -l | grep /dev/sdb1 && fdisk -l | grep /dev/ > sdb2 && fdisk -l | grep /dev/sdb3", > onlyif => "iscsi-rescan && [ -e /dev/sdb ]", > require => Service[''iscsi''] > } > ... > exec { "mke2fs /dev/sdb1": > path => ''/sbin'', > unless => "dumpe2fs /dev/sdb1", > require => Exec["echo -e \"0,290\\n,290\\n,\" | sfdisk /dev/ > sdb"] > } > ... > exec { "mke2fs /dev/sdb3": > path => ''/sbin'', > unless => "dumpe2fs /dev/sdb3", > require => Exec["echo -e \"0,290\\n,290\\n,\" | sfdisk /dev/ > sdb"] > }The issue you''re having makes me think this is a bug (and I actually thought I removed this a while ago), but Puppet sets up automatic relationships between the exec and any files mentioned in either the command or any of the checks. You should see this automatic relationship listed in debug mode on the client. However, you have a manual relationship specified in the correct direction, so Puppet should ignore the automatic relationship that you don''t want. What version of Puppet are you using? -- Brand''s Asymmetry: The past can only be known, not changed. The future can only be changed, not known. --------------------------------------------------------------------- Luke Kanies | http://reductivelabs.com | http://madstop.com _______________________________________________ Puppet-users mailing list Puppet-users@madstop.com https://mail.madstop.com/mailman/listinfo/puppet-users
Can you file this as a bug, then? On Jan 16, 2008, at 8:17 AM, Eugene Ventimiglia wrote:> puppet-0.24.1-1.el4 > > -----Original Message----- > From: puppet-users-bounces@madstop.com > [mailto:puppet-users-bounces@madstop.com] On Behalf Of Luke Kanies > Sent: Tuesday, January 15, 2008 8:32 PM > To: Puppet User Discussion > Subject: Re: [Puppet-users] Spot the cyclical relationship > > On Jan 14, 2008, at 10:19 AM, Eugene Ventimiglia wrote: > >> exec { "echo -e \"0,290\\n,290\\n,\" | sfdisk /dev/sdb": >> path => ''/usr/bin:/sbin:/bin'', >> unless => "fdisk -l | grep /dev/sdb1 && fdisk -l | grep /dev/ >> sdb2 && fdisk -l | grep /dev/sdb3", >> onlyif => "iscsi-rescan && [ -e /dev/sdb ]", >> require => Service[''iscsi''] >> } >> ... >> exec { "mke2fs /dev/sdb1": >> path => ''/sbin'', >> unless => "dumpe2fs /dev/sdb1", >> require => Exec["echo -e \"0,290\\n,290\\n,\" | sfdisk /dev/ >> sdb"] >> } >> ... >> exec { "mke2fs /dev/sdb3": >> path => ''/sbin'', >> unless => "dumpe2fs /dev/sdb3", >> require => Exec["echo -e \"0,290\\n,290\\n,\" | sfdisk /dev/ >> sdb"] >> } > > > The issue you''re having makes me think this is a bug (and I actually > thought I removed this a while ago), but Puppet sets up automatic > relationships between the exec and any files mentioned in either the > command or any of the checks. > > You should see this automatic relationship listed in debug mode on the > client. > > However, you have a manual relationship specified in the correct > direction, so Puppet should ignore the automatic relationship that you > don''t want. > > What version of Puppet are you using? > > -- > Brand''s Asymmetry: > The past can only be known, not changed. The future can only be > changed, not known. > --------------------------------------------------------------------- > Luke Kanies | http://reductivelabs.com | http://madstop.com > > _______________________________________________ > Puppet-users mailing list > Puppet-users@madstop.com > https://mail.madstop.com/mailman/listinfo/puppet-users > _______________________________________________ > Puppet-users mailing list > Puppet-users@madstop.com > https://mail.madstop.com/mailman/listinfo/puppet-users >-- Today at work an ethernet switch decided to take the ''N'' out of NVRAM -- Richard Letts --------------------------------------------------------------------- Luke Kanies | http://reductivelabs.com | http://madstop.com