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

puppet 6 apply fails if puppet types have been generated

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Normal
    • Resolution: Fixed
    • PUP 6.0.0, PUP 6.4.0
    • PUP 6.18.0
    • None
    • Coremunity
    • Platform Core KANBAN
    • Needs Assessment
    • Reviewed
    • Bug Fix
    • Hide
      Running `puppet apply` could fail if the `puppet generate types` command was run previously as described in Environment Isolation: https://puppet.com/docs/puppet/latest/environment_isolation.html. With this fix, `puppet apply` will ignore resource type in the environment's `.resource_types` directory.
      Show
      Running `puppet apply` could fail if the `puppet generate types` command was run previously as described in Environment Isolation: https://puppet.com/docs/puppet/latest/environment_isolation.html . With this fix, `puppet apply` will ignore resource type in the environment's `.resource_types` directory.
    • Needs Assessment

    Description

      Puppet Version:
      6.4.0
      Puppetserver Version
      6.3.0
      OS Name/Version:
      CentOS 7.5

      Stumbled upon an unusual behavior in Puppet 6 (works as expected on Puppet 5)

      If command puppet generate types has been executed, puppet apply fails.
      Puppet agent works normally.

      [root@master ~]# puppet apply -e 'include bootstrap::master'
      Notice: Compiled catalog for master.localdomain in environment production in 0.81 seconds
      Notice: Applied catalog in 0.89 seconds
       
      [root@master ~]# puppet generate types
      Notice: Generating Puppet resource types.
      Warning: The a2mod provider is deprecated, please use apache::mod instead
      Notice: Generating '/etc/puppetlabs/code/environments/production/.resource_types/a2mod.pp' using 'pcore' format.
      Notice: Generating '/etc/puppetlabs/code/environments/production/.resource_types/concat_file.pp' using 'pcore' format.
      Notice: Generating '/etc/puppetlabs/code/environments/production/.resource_types/concat_fragment.pp' using 'pcore' format.
      Notice: Generating '/etc/puppetlabs/code/environments/production/.resource_types/git_config.pp' using 'pcore' format.
      Notice: Generating '/etc/puppetlabs/code/environments/production/.resource_types/ini_setting.pp' using 'pcore' format.
      Notice: Generating '/etc/puppetlabs/code/environments/production/.resource_types/ini_subsetting.pp' using 'pcore' format.
      Notice: Generating '/etc/puppetlabs/code/environments/production/.resource_types/postgresql_conf.pp' using 'pcore' format.
      Notice: Generating '/etc/puppetlabs/code/environments/production/.resource_types/postgresql_conn_validator.pp' using 'pcore' format.
      Notice: Generating '/etc/puppetlabs/code/environments/production/.resource_types/postgresql_psql.pp' using 'pcore' format.
      Notice: Generating '/etc/puppetlabs/code/environments/production/.resource_types/postgresql_replication_slot.pp' using 'pcore' format.
      Notice: Generating '/etc/puppetlabs/code/environments/production/.resource_types/puppetdb_conn_validator.pp' using 'pcore' format.
      Notice: Generating '/etc/puppetlabs/code/environments/production/.resource_types/anchor.pp' using 'pcore' format.
      Notice: Generating '/etc/puppetlabs/code/environments/production/.resource_types/file_line.pp' using 'pcore' format.
      Notice: Generating '/etc/puppetlabs/code/environments/production/.resource_types/vcsrepo.pp' using 'pcore' format.
       
      [root@master ~]# puppet apply -e 'include bootstrap::master'
      Notice: Compiled catalog for master.localdomain in environment production in 0.75 seconds
      Error: Could not autoload puppet/type/anchor: Attempt to redefine entity 'http://puppet.com/2016.1/runtime/type/anchor'. Set at unknown location
      Error: Could not autoload puppet/type/anchor: Attempt to redefine entity 'http://puppet.com/2016.1/runtime/type/anchor'. Set at unknown location
      
      

      Attachments

        Issue Links

          Activity

            People

              josh Josh Cooper
              vchepkov Vadym Chepkov
              Votes:
              3 Vote for this issue
              Watchers:
              12 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Zendesk Support