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

PropertyList returns true when asked if nil is insync

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Won't Fix
    • Affects Version/s: PUP 3.6.2
    • Fix Version/s: None
    • Component/s: Types and Providers
    • Labels:
    • Template:

      Description

      The insync method for PropertyList starts with the following guard clause:

      def insync?(is)
        return true unless is
        ...
      

      Nil values frequently occur when resources are transitioning from :absent to a managed state as the property hash for an absent resource usually takes the following form:

      {
        ensure => :absent
      }
      

      All other property values will be nil. The behavior of insync? results in PropertyList properties not being synced during resource creation. For some types, notably sparse Solaris zones (PUP-2817), a property must be synced during resource creation in order to take effect.

      In general, nil != a should value that is not nil so the logical return value for insync? is false.

      This behavior also affects the OrderdList and KeyValue property classes.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              kylo Kylo Ginsberg
              Reporter:
              chuck Charlie Sharpsteen
              QA Contact:
              Narmadha Perumal
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Zendesk Support