FAQ
Morning all

I've got an issue when trying to use a defined type which is generating a
cyclic dependency error when running puppet...

The defined type is:
https://gist.github.com/fatmcgav/4722199#file-nfs_mount-pp
There is another defined type called - act::util::linux::nfs_mount - which
looks like this: https://gist.github.com/fatmcgav/4722199#file-remove-pp

The error is:
Error: Could not apply complete catalog: Found 1 dependency cycle:
(File[/data/tier1/oracle/oradata/PUTEST01/controlfiles] =>
Act::Util::Linux::Nfs_mount[PUTEST01_controlfiles] =>
Act::Util::Linux::Nfs_mount[PUTEST01_datafiles] =>
Mount[/data/tier1/oracle/oradata/PUTEST01/datafiles] =>
Act::Util::Linux::Nfs_mount[PUTEST01_datafiles] =>
Act::Util::Linux::Nfs_mount[PUTEST01_redologs] =>
File[/data/tier1/oracle/oradata/PUTEST01/redologs] =>
Act::Util::Linux::Nfs_mount[PUTEST01_redologs] =>
Act::Util::Linux::Nfs_mount[PUTEST01_tempfiles] =>
Mount[/data/tier1/oracle/oradata/PUTEST01/tempfiles] =>
Act::Util::Linux::Nfs_mount[PUTEST01_tempfiles] =>
Act::Util::Linux::Nfs_mount[PUTEST01_archive] =>
Mount[/data/tier2/oracle/archivelogs/PUTEST01] =>
Act::Util::Linux::Nfs_mount[PUTEST01_archive] =>
Act::Util::Linux::Nfs_mount[PUTEST01_diag] =>
Mount[/data/tier2/oracle/diag/PUTEST01] =>
Act::Util::Linux::Nfs_mount[PUTEST01_diag] =>
File[/data/tier1/oracle/oradata/PUTEST01] =>
File[/data/tier1/oracle/oradata/PUTEST01/redologs])
Try the '--graph' option and opening the resulting '.dot' file in
OmniGraffle or GraphViz

I've tried various permeations of the defined type ordering without
success...

Any ideas??

Cheers
Gavin

--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.

Search Discussions

  • Gavin Williams at Feb 8, 2013 at 6:44 pm
    John

    Cheers for the response.

    I've added another file to the gist -
    https://gist.github.com/fatmcgav/4722199#file-oracle-pp. This is a snippet
    from the top-level manifest that is responsible for calling the *'remove' *define
    using *'create_resources'*.

    And yes, by "various permutations", I do mean various different
    dependencies...

    I was trying to force the relationship cycle so that all the volumes are
    unmounted and directories removed before removing the parent directory "file
    { $tier1_prefix: ..}"

    Cheers
    Gavin
    On Friday, 8 February 2013 17:49:44 UTC, jcbollinger wrote:


    On Friday, February 8, 2013 11:07:11 AM UTC-6, Gavin Williams wrote:

    Any ideas?
    That would be a lot easier to analyze in the context of the relevant
    manifests, but it looks like you are specifying a lot of unneeded
    relationships. Also, Puppet's output may be a bit misleading because
    although there is only the one group of resources, there are actually at
    least six cycles in it:

    Act::Util::Linux::Nfs_mount[PUTEST01_datafiles] =>
    Mount[/data/tier1/oracle/oradata/PUTEST01/datafiles] =>
    Act::Util::Linux::Nfs_mount[PUTEST01_datafiles]

    Act::Util::Linux::Nfs_mount[PUTEST01_redologs] =>
    File[/data/tier1/oracle/oradata/PUTEST01/redologs] =>
    Act::Util::Linux::Nfs_mount[PUTEST01_redologs]

    Act::Util::Linux::Nfs_mount[PUTEST01_tempfiles] =>
    Mount[/data/tier1/oracle/oradata/PUTEST01/tempfiles] =>
    Act::Util::Linux::Nfs_mount[PUTEST01_tempfiles]

    Act::Util::Linux::Nfs_mount[PUTEST01_archive] =>
    Mount[/data/tier2/oracle/archivelogs/PUTEST01] =>
    Act::Util::Linux::Nfs_mount[PUTEST01_archive]

    Act::Util::Linux::Nfs_mount[PUTEST01_diag] =>
    Mount[/data/tier2/oracle/diag/PUTEST01] =>
    Act::Util::Linux::Nfs_mount[PUTEST01_diag]

    File[/data/tier1/oracle/oradata/PUTEST01/redologs] =>
    Act::Util::Linux::Nfs_mount[PUTEST01_redologs] =>
    Act::Util::Linux::Nfs_mount[PUTEST01_tempfiles] =>
    Mount[/data/tier1/oracle/oradata/PUTEST01/tempfiles] =>
    Act::Util::Linux::Nfs_mount[PUTEST01_tempfiles] =>
    Act::Util::Linux::Nfs_mount[PUTEST01_archive] =>
    Mount[/data/tier2/oracle/archivelogs/PUTEST01] =>
    Act::Util::Linux::Nfs_mount[PUTEST01_archive] =>
    Act::Util::Linux::Nfs_mount[PUTEST01_diag] =>
    Mount[/data/tier2/oracle/diag/PUTEST01] =>
    Act::Util::Linux::Nfs_mount[PUTEST01_diag] =>
    File[/data/tier1/oracle/oradata/PUTEST01] =>
    File[/data/tier1/oracle/oradata/PUTEST01/redologs]

    Be aware that order Puppet parses declarations in your manifests has
    nothing to do with the order in which they are applied to the client node,
    and resource relationships are concerned only with the latter. Physically
    reordering your declarations will never break a dependency cycle.

    On the other hand, if by "I've tried various [permutations]" you meant
    that you had changed where your relationships point, then that further
    supports the proposition that you are specifying relationships that you do
    not need.

    In particular, I'd guess that the problem is not restricted to the body of
    the Act::Util::Linux::Nfs_mount definition, but rather that it also
    involves something in the context where instances of that defined type are
    themselves declared.


    John
    --
    You received this message because you are subscribed to the Google Groups "Puppet Users" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com.
    To post to this group, send email to puppet-users@googlegroups.com.
    Visit this group at http://groups.google.com/group/puppet-users?hl=en.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Gavin Williams at Feb 8, 2013 at 7:43 pm
    Any ideas?

    Cheers
    Gavin
    On Wednesday, 6 February 2013 12:17:04 UTC, Gavin Williams wrote:

    Morning all

    I've got an issue when trying to use a defined type which is generating a
    cyclic dependency error when running puppet...

    The defined type is:
    https://gist.github.com/fatmcgav/4722199#file-nfs_mount-pp
    There is another defined type called - act::util::linux::nfs_mount - which
    looks like this: https://gist.github.com/fatmcgav/4722199#file-remove-pp

    The error is:
    Error: Could not apply complete catalog: Found 1 dependency cycle:
    (File[/data/tier1/oracle/oradata/PUTEST01/controlfiles] =>
    Act::Util::Linux::Nfs_mount[PUTEST01_controlfiles] =>
    Act::Util::Linux::Nfs_mount[PUTEST01_datafiles] =>
    Mount[/data/tier1/oracle/oradata/PUTEST01/datafiles] =>
    Act::Util::Linux::Nfs_mount[PUTEST01_datafiles] =>
    Act::Util::Linux::Nfs_mount[PUTEST01_redologs] =>
    File[/data/tier1/oracle/oradata/PUTEST01/redologs] =>
    Act::Util::Linux::Nfs_mount[PUTEST01_redologs] =>
    Act::Util::Linux::Nfs_mount[PUTEST01_tempfiles] =>
    Mount[/data/tier1/oracle/oradata/PUTEST01/tempfiles] =>
    Act::Util::Linux::Nfs_mount[PUTEST01_tempfiles] =>
    Act::Util::Linux::Nfs_mount[PUTEST01_archive] =>
    Mount[/data/tier2/oracle/archivelogs/PUTEST01] =>
    Act::Util::Linux::Nfs_mount[PUTEST01_archive] =>
    Act::Util::Linux::Nfs_mount[PUTEST01_diag] =>
    Mount[/data/tier2/oracle/diag/PUTEST01] =>
    Act::Util::Linux::Nfs_mount[PUTEST01_diag] =>
    File[/data/tier1/oracle/oradata/PUTEST01] =>
    File[/data/tier1/oracle/oradata/PUTEST01/redologs])
    Try the '--graph' option and opening the resulting '.dot' file in
    OmniGraffle or GraphViz

    I've tried various permeations of the defined type ordering without
    success...

    Any ideas??

    Cheers
    Gavin
    --
    You received this message because you are subscribed to the Google Groups "Puppet Users" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com.
    To post to this group, send email to puppet-users@googlegroups.com.
    Visit this group at http://groups.google.com/group/puppet-users?hl=en.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Fatmcgav at Feb 9, 2013 at 12:16 am
    John

    Cheers again, very helpful...

    Will look at simplifying the relationships as much as possible, and also
    switch to before/requires...

    And yes, do regularly see multiple 'removing_xxx' before any of the
    'removed_xxx' notifications...

    Cheers
    Gav
    On Feb 8, 2013 10:28 PM, "jcbollinger" wrote:


    On Friday, February 8, 2013 12:35:38 PM UTC-6, Gavin Williams wrote:

    John

    Cheers for the response.

    I've added another file to the gist - https://gist.github.com/**
    fatmcgav/4722199#file-oracle-**pp<https://gist.github.com/fatmcgav/4722199#file-oracle-pp>.
    This is a snippet from the top-level manifest that is responsible for
    calling the *'remove' *define using *'create_resources'*.
    Well, you certainly do have more relationships than you need, and
    generally speaking, more than you need is more than you want. It is not
    immediately evident to me why some of the dependencies are being generated,
    but you should start by removing all unnecessary relationships.

    In particular, there is no need to have relationships among the variousact::util::linux::nfs_mount instances, because it doesn't matter in what
    relative order these are applied. Furthermore, not all of them even depend
    on the $tier1_prefix directory, because some of the mount points are
    elsewhere.

    I don't know about File["${oracle_sid}_profile"], Oranfstab[$oracle_sid],
    and Oratab[$oracle_sid], but surely each of these depends on AT MOST one
    of the *::nfs_mount resources. Where there is such a dependency, declare
    that and only that. Alternatively move all the *::nfs_mount mount
    resources to a separate defined type, maybeact::env::oracle::instance::netapp::mount, and declare dependencies to that.

    Consider also declaring your relationships via the 'before' and / or
    'require' resource metaparameters instead of via the chain operator. It *
    shouldn't* make a difference, but perhaps you have stumbled on a bug.

    You do have some needed relationships in there, but it looks like you've
    spent a lot of effort mostly to bracket the operations with "Preparing to
    remove ..." and "Removed ..." messages. That's your prerogative, of
    course, but do you realize that nothing you've written prevents other
    resources from elsewhere being applied between the ones in your chain? If
    you have a large catalog then that's in fact likely to happen, so your
    notification messages have the potential to be deceptive.


    John

    --
    You received this message because you are subscribed to the Google Groups
    "Puppet Users" group.
    To unsubscribe from this group and stop receiving emails from it, send an
    email to puppet-users+unsubscribe@googlegroups.com.
    To post to this group, send email to puppet-users@googlegroups.com.
    Visit this group at http://groups.google.com/group/puppet-users?hl=en.
    For more options, visit https://groups.google.com/groups/opt_out.

    --
    You received this message because you are subscribed to the Google Groups "Puppet Users" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com.
    To post to this group, send email to puppet-users@googlegroups.com.
    Visit this group at http://groups.google.com/group/puppet-users?hl=en.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Jcbollinger at Feb 9, 2013 at 2:21 am

    On Friday, February 8, 2013 12:35:38 PM UTC-6, Gavin Williams wrote:
    John

    Cheers for the response.

    I've added another file to the gist -
    https://gist.github.com/fatmcgav/4722199#file-oracle-pp. This is a
    snippet from the top-level manifest that is responsible for calling the *'remove'
    *define using *'create_resources'*.
    Well, you certainly do have more relationships than you need, and generally
    speaking, more than you need is more than you want. It is not immediately
    evident to me why some of the dependencies are being generated, but you
    should start by removing all unnecessary relationships.

    In particular, there is no need to have relationships among the variousact::util::linux::nfs_mount instances, because it doesn't matter in what
    relative order these are applied. Furthermore, not all of them even depend
    on the $tier1_prefix directory, because some of the mount points are
    elsewhere.

    I don't know about File["${oracle_sid}_profile"], Oranfstab[$oracle_sid],
    and Oratab[$oracle_sid], but surely each of these depends on AT MOST one of
    the *::nfs_mount resources. Where there is such a dependency, declare that
    and only that. Alternatively move all the *::nfs_mount mount resources to
    a separate defined type, maybe act::env::oracle::instance::netapp::mount,
    and declare dependencies to that.

    Consider also declaring your relationships via the 'before' and / or
    'require' resource metaparameters instead of via the chain operator. It *
    shouldn't* make a difference, but perhaps you have stumbled on a bug.

    You do have some needed relationships in there, but it looks like you've
    spent a lot of effort mostly to bracket the operations with "Preparing to
    remove ..." and "Removed ..." messages. That's your prerogative, of
    course, but do you realize that nothing you've written prevents other
    resources from elsewhere being applied between the ones in your chain? If
    you have a large catalog then that's in fact likely to happen, so your
    notification messages have the potential to be deceptive.


    John

    --
    You received this message because you are subscribed to the Google Groups "Puppet Users" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com.
    To post to this group, send email to puppet-users@googlegroups.com.
    Visit this group at http://groups.google.com/group/puppet-users?hl=en.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Jcbollinger at Feb 9, 2013 at 2:57 am

    On Friday, February 8, 2013 11:07:11 AM UTC-6, Gavin Williams wrote:
    Any ideas?
    That would be a lot easier to analyze in the context of the relevant
    manifests, but it looks like you are specifying a lot of unneeded
    relationships. Also, Puppet's output may be a bit misleading because
    although there is only the one group of resources, there are actually at
    least six cycles in it:

    Act::Util::Linux::Nfs_mount[PUTEST01_datafiles] =>
    Mount[/data/tier1/oracle/oradata/PUTEST01/datafiles] =>
    Act::Util::Linux::Nfs_mount[PUTEST01_datafiles]

    Act::Util::Linux::Nfs_mount[PUTEST01_redologs] =>
    File[/data/tier1/oracle/oradata/PUTEST01/redologs] =>
    Act::Util::Linux::Nfs_mount[PUTEST01_redologs]

    Act::Util::Linux::Nfs_mount[PUTEST01_tempfiles] =>
    Mount[/data/tier1/oracle/oradata/PUTEST01/tempfiles] =>
    Act::Util::Linux::Nfs_mount[PUTEST01_tempfiles]

    Act::Util::Linux::Nfs_mount[PUTEST01_archive] =>
    Mount[/data/tier2/oracle/archivelogs/PUTEST01] =>
    Act::Util::Linux::Nfs_mount[PUTEST01_archive]

    Act::Util::Linux::Nfs_mount[PUTEST01_diag] =>
    Mount[/data/tier2/oracle/diag/PUTEST01] =>
    Act::Util::Linux::Nfs_mount[PUTEST01_diag]

    File[/data/tier1/oracle/oradata/PUTEST01/redologs] =>
    Act::Util::Linux::Nfs_mount[PUTEST01_redologs] =>
    Act::Util::Linux::Nfs_mount[PUTEST01_tempfiles] =>
    Mount[/data/tier1/oracle/oradata/PUTEST01/tempfiles] =>
    Act::Util::Linux::Nfs_mount[PUTEST01_tempfiles] =>
    Act::Util::Linux::Nfs_mount[PUTEST01_archive] =>
    Mount[/data/tier2/oracle/archivelogs/PUTEST01] =>
    Act::Util::Linux::Nfs_mount[PUTEST01_archive] =>
    Act::Util::Linux::Nfs_mount[PUTEST01_diag] =>
    Mount[/data/tier2/oracle/diag/PUTEST01] =>
    Act::Util::Linux::Nfs_mount[PUTEST01_diag] =>
    File[/data/tier1/oracle/oradata/PUTEST01] =>
    File[/data/tier1/oracle/oradata/PUTEST01/redologs]

    Be aware that order Puppet parses declarations in your manifests has
    nothing to do with the order in which they are applied to the client node,
    and resource relationships are concerned only with the latter. Physically
    reordering your declarations will never break a dependency cycle.

    On the other hand, if by "I've tried various [permutations]" you meant that
    you had changed where your relationships point, then that further supports
    the proposition that you are specifying relationships that you do not need.

    In particular, I'd guess that the problem is not restricted to the body of
    the Act::Util::Linux::Nfs_mount definition, but rather that it also
    involves something in the context where instances of that defined type are
    themselves declared.


    John

    --
    You received this message because you are subscribed to the Google Groups "Puppet Users" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com.
    To post to this group, send email to puppet-users@googlegroups.com.
    Visit this group at http://groups.google.com/group/puppet-users?hl=en.
    For more options, visit https://groups.google.com/groups/opt_out.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppuppet-users @
categoriespuppet
postedFeb 6, '13 at 12:17p
activeFeb 9, '13 at 2:57a
posts6
users2
websitepuppetlabs.com

2 users in discussion

Fatmcgav: 4 posts Jcbollinger: 2 posts

People

Translate

site design / logo © 2021 Grokbase