Uploaded image for project: 'Modules'
  1. Modules
  2. MODULES-6060

tomcat::config::server::realm doesn't work if resource title contains spaces.

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Normal
    • Resolution: Fixed
    • None
    • None
    • tomcat
    • Needs Assessment

    Description

      Basic Info
      Module Version: 2.1.0
      Puppet Version: 4.10.9
      OS Name/Version: CentOS 7.4

      Describe your issue in as much detail as possible...

      I have multiple tomcat instances, so I tried to declare the realm resources a bit like this (to avoid duplicate resource issues).

      tomcat::config::server::realm { "LockOutRealm for ${catalina_base}":
          catalina_base => $catalina_base,
          class_name    => 'org.apache.catalina.realm.LockOutRealm',
      }
      

      Desired Behavior:
      Module produces valid Realm configuration.

      Actual Behavior:
      The augeas goes wrong and produces this.

      <Realm puppetName="LockOutRealm"></Realm>
      <Realm className="org.apache.catalina.realm.LockOutRealm">
      </Realm>
      

      puppetName is supposed to be an attribute of the actual Realm (and is supposed to equal to the resource title, not just the title up until the first space).

      In my code I've worked around the issue by replacing the spaces with underscores. Dunno if the module should sanitise the resource title itself, or whether it just needs some extra quotes or escape characters somewhere.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              alexjfisher Alexander Fisher
              Votes:
              2 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Zendesk Support