Uploaded image for project: 'Puppet'
  1. Puppet
  2. PUP-10784

Augeas don't handle Deferred values

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Needs Information
    • Priority: Critical
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Functions
    • Labels:
      None
    • Template:
      PUP Bug Template
    • Agent OS:
      CentOS 7
    • Master OS:
      CentOS 7
    • Method Found:
      Needs Assessment
    • QA Risk Assessment:
      Needs Assessment

      Description

      Puppet Version: puppet-agent-6.19.1-1.el7.x86_64
      Puppet Server Version: puppetserver-6.14.1-1.el7.noarch
      OS Name/Version: CentOS 7.9

      The augeas module don't handle Deferred values correct.

      Desired Behavior: That the value of the deferred function in inserted.

      Actual Behavior: Not the value, but the text ''Deferred({" is inserted.

      sample:

      $db_host = Deferred(load_file,[$db_host_file])
      $db_name = Deferred(load_file,[$db_name_file])
      $settings = [
        "set session-factory/property[#attribute/name='hibernate.connection.url']/#text 'jdbc:postgresql://${db_host}/${db_name}'"
      ]
      augeas { 'sql':
       lens => 'Xml.lns',
       incl => "/usr/share/tomcat9/webapps/xwiki/WEB-INF/hibernate.cfg.xml",
       context => "/files/usr/share/tomcat9/webapps/xwiki/WEB-INF/hibernate.cfg.xml/hibernate-configuration",
       changes => $settings,
       require => ...,
       notify => ...
       }

      The used function in Deferred itself will work, because using it for ini_setting it will work there.

       

       

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            puppetTux Frank
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:

                Zendesk Support