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

undefined method `argument_mismatch'

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Cannot Reproduce
    • Affects Version/s: PUP 4.10.0
    • Fix Version/s: None
    • Component/s: None
    • Labels:
    • Environment:

      debian jessie

    • Template:
    • QA Risk Assessment:
      Needs Assessment

      Description

      after a while i run `puppet agent --test` on my server and got a:

      Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Evaluation Error: Error while evaluating a Resource Statement, undefined method `argument_mismatch' for #<Class:0x4ecb4598> at /etc/puppetlabs/code/environments/production/site/profile/manifests/base.pp:4:3 on node example.com
      

      i think it has something to do with the puppet agen version, last time i checked the version i had a 4.8.x version but currently i haven't pinned the version, so it looks like unattended upgrade updated to version 4.10.0

      root@host01 ~ # puppet agent --version
      4.10.0
      

      is it normal that things break in a minor version?
      also the error message is not really helpful.

      related with
      https://tickets.puppetlabs.com/browse/PUP-7369
      https://tickets.puppetlabs.com/browse/PUP-7368
      ?

      using hiera3

      tried to remove argument types from some classes but the error is still there (it moves to the next usage of a typed parameter.

      this is the code from which causes the error:

      base.pp
       
      1 class profile::base (
      2 ) {
      3   class { '::profile::runstages': }
      4   class { '::profile::lvm': }
      .......
       
       
      lvm.pp
      class profile::lvm (
        Boolean $enabled = false,
      ) {
        if ($enabled) {
          class { '::lvm': stage => one }
          ->
          file_line { '/etc/fstab_remove_swap':
            ensure            => absent,
            path              => '/etc/fstab',
            line              => '/dev/mapper/vg_main-swap	none	swap	sw	0	0',
            match             => '^/dev/mapper/vg_main-swap',
            match_for_absence => true,
          }
        }
      }
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              c33s Julian
              Reporter:
              c33s Julian
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Zendesk Support